diff --git a/ios/App/App/AudioPlayer.swift b/ios/App/App/AudioPlayer.swift index 76bb3453..acab12fa 100644 --- a/ios/App/App/AudioPlayer.swift +++ b/ios/App/App/AudioPlayer.swift @@ -183,7 +183,7 @@ class AudioPlayer: NSObject { } func invokeMetadataUpdate() { - if !shouldFetchCover() && audiobook.artworkUrl != nil { + if !shouldFetchCover() || audiobook.artworkUrl == nil { setMetadata(nil) return } @@ -234,7 +234,6 @@ class AudioPlayer: NSObject { guard let playerStatus = AVPlayerItem.Status(rawValue: (change?[.newKey] as? Int ?? -1)) else { return } if playerStatus == .readyToPlay { - NSLog("pain \(self.audiobook.startTime)") updateNowPlaying() self.status = 0 diff --git a/ios/App/App/MyNativeAudio.swift b/ios/App/App/MyNativeAudio.swift index 832fc3bd..e4c6232b 100644 --- a/ios/App/App/MyNativeAudio.swift +++ b/ios/App/App/MyNativeAudio.swift @@ -142,7 +142,7 @@ public class MyNativeAudio: CAPPlugin { } @objc func getStreamSyncData(_ call: CAPPluginCall) { if self.currentPlayer == nil { - call.resolve([ "isPlaying": false as Any, "lastPauseTime": 0, "id": nil ]) + call.resolve([ "isPlaying": false, "lastPauseTime": 0, "id": nil ]) return }