Swift: AVPlayer playing video is showing this error: [AVOutputContext] WARNING: AVF context unavailable for sharedAudioPresentationContext

I had similar issue with mp4 file stored on device which got fixed by prepending “file://” to the file path

 guard let strPath = Bundle.main.path(forResource: "demo", ofType: "mp4"), let url = URL(string: "file://\(strPath)") else {
        print("Umm, looks like an invalid URL!")
        return
    }

Inspired by this post

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)