Unable to simultaneously satisfy constraints Warnings with AVPlayerViewController embedded in storyboard

In fact, I think it’s bug on Apple side. I found a workaround : set showsPlaybackControls to YES after the AVPlayerViewController.player have been set. I modify your sample with the following lines and no more Constraint error appears : @interface ViewController () @property(weak, nonatomic) AVPlayerViewController * playerViewController; @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; … Read more

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

No AVPlayer Delegate? How to track when song finished playing? Objective C iPhone development

Yes, the AVPlayer class does not have a delegate protocol like the AVAudioPlayer. You need to subscribe to notifications on an AVPlayerItem. You can create an AVPlayerItem using the same URL that you would otherwise pass to -initWithURL: on AVPlayer. -(void)startPlaybackForItemWithURL:(NSURL*)url { // First create an AVPlayerItem AVPlayerItem* playerItem = [AVPlayerItem playerItemWithURL:url]; // Subscribe to … Read more

How to play video with AVPlayerViewController (AVKit) in Swift

Swift 3.x – 5.x Necessary: import AVKit, import AVFoundation AVFoundation framework is needed even if you use AVPlayer If you want to use AVPlayerViewController: let videoURL = URL(string: “https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4”) let player = AVPlayer(url: videoURL!) let playerViewController = AVPlayerViewController() playerViewController.player = player self.present(playerViewController, animated: true) { playerViewController.player!.play() } or just AVPlayer: let videoURL = URL(string: “https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4”) … Read more

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