AVPlayer Example

suggest change
NSURL *url = [NSURL URLWithString:@"https://example.com/video.mp4"];
AVPlayer *avPlayer = [AVPlayer playerWithURL:url];
AVPlayerViewController *avPlayerCtrl = [[AVPlayerViewController alloc] init];
avPlayerCtrl.player = avPlayer;
// `self` must adopt AVPlayerViewControllerDelegate before this assignment.
avPlayerCtrl.delegate = self;
[avPlayer play];
[self presentViewController:avPlayerCtrl animated:YES completion:nil];

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents