File tree Expand file tree Collapse file tree
audioplayers_darwin/darwin/Classes
audioplayers/example/macos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ EXTERNAL SOURCES:
2020
2121SPEC CHECKSUMS:
2222 audioplayers_darwin: dcad41de4fbd0099cb3749f7ab3b0cb8f70b810c
23- FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424
23+ FlutterMacOS: ae6af50a8ea7d6103d888583d46bd8328a7e9811
2424 path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f
2525
2626PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c
Original file line number Diff line number Diff line change @@ -81,10 +81,14 @@ class WrappedMediaPlayer {
8181
8282 func resume( ) {
8383 isPlaying = true
84- if #available( iOS 10 . 0 , macOS 10 . 12 , * ) {
85- player? . playImmediately ( atRate: Float ( playbackRate) )
86- } else {
87- player? . play ( )
84+ if let player = self . player {
85+ configParameters ( player: player)
86+ if #available( iOS 10 . 0 , macOS 10 . 12 , * ) {
87+ player. playImmediately ( atRate: Float ( playbackRate) )
88+ } else {
89+ player. play ( )
90+ }
91+ updateDuration ( )
8892 }
8993 }
9094
@@ -209,7 +213,6 @@ class WrappedMediaPlayer {
209213 let status = playerItem. status
210214 Logger . info ( " player status: %@ change: %@ " , status, change)
211215
212- // Do something with the status...
213216 if status == . readyToPlay {
214217 self . updateDuration ( )
215218 completer ? ( )
@@ -228,7 +231,9 @@ class WrappedMediaPlayer {
228231 }
229232
230233 func configParameters( player: AVPlayer ) {
231- player. volume = Float ( volume)
232- player. rate = Float ( playbackRate)
234+ if ( isPlaying) {
235+ player. volume = Float ( volume)
236+ player. rate = Float ( playbackRate)
237+ }
233238 }
234239}
You can’t perform that action at this time.
0 commit comments