@@ -19,6 +19,7 @@ public extension YouTubePlayer {
19
19
20
20
#if compiler(>=5.5) && canImport(_Concurrency)
21
21
/// Returns a number between 0 and 1 that specifies the percentage of the video that the player shows as buffered
22
+ @MainActor
22
23
func getVideoLoadedFraction( ) async throws -> Double {
23
24
try await withCheckedThrowingContinuation { continuation in
24
25
self . getVideoLoadedFraction ( completion: continuation. resume)
@@ -79,6 +80,7 @@ public extension YouTubePlayer {
79
80
80
81
#if compiler(>=5.5) && canImport(_Concurrency)
81
82
/// Returns the PlaybackState of the player video
83
+ @MainActor
82
84
func getPlaybackState( ) async throws -> PlaybackState {
83
85
try await withCheckedThrowingContinuation { continuation in
84
86
self . getPlaybackState ( completion: continuation. resume)
@@ -100,6 +102,7 @@ public extension YouTubePlayer {
100
102
101
103
#if compiler(>=5.5) && canImport(_Concurrency)
102
104
/// Returns the elapsed time in seconds since the video started playing
105
+ @MainActor
103
106
func getCurrentTime( ) async throws -> Double {
104
107
try await withCheckedThrowingContinuation { continuation in
105
108
self . getCurrentTime ( completion: continuation. resume)
@@ -159,6 +162,7 @@ public extension YouTubePlayer {
159
162
160
163
#if compiler(>=5.5) && canImport(_Concurrency)
161
164
/// Returns the current PlaybackMetadata
165
+ @MainActor
162
166
func getPlaybackMetadata( ) async throws -> PlaybackMetadata {
163
167
try await withCheckedThrowingContinuation { continuation in
164
168
self . getPlaybackMetadata ( completion: continuation. resume)
0 commit comments