Post

Replies

Boosts

Views

Activity

Reply to iOS 14 Play audio from video in background
@tungdangplus  That didn't work for me. In AppDelegate, I did:     func applicationWillResignActive(_ application: UIApplication) {         let viewController = window?.rootViewController as! ViewController         viewController.disconnectAVPlayer()     } and then in ViewController, I did:     public func disconnectAVPlayer() {       playerViewController.player = nil     }
Sep ’20
Reply to AVAssetDownloadTask and playback, m3u8 has remote URLs
A little more information....I downloaded the container from my app on to my computer and looked inside. In the m3u8 file that's saved into the movpkg bundle, the segments are always preceeded by a key, like this:#EXT-X-KEY:METHOD=AES-128,URI="https://myKeyURL.com/keypath",IV=0x00000000000000000000000000000000#EXTINF:4.0960,https://mySegmentURL.com/slices/segment1.tsAlso... the "frag" files from apple's sample app... if I change the extension to ".ts", they play fine in QuickTime. But the frag files from my video do not. So my current theory is that when in airplane mode, it's trying to reach the key at the remote server to decrypt the segment, and of course it's unreachable when offline.Any ideas?
May ’20