Tutorial by Examples: avplayerlayer

Objective C NSURL *url = [NSURL URLWithString:@"YOUR URL"]; AVPlayer *player = [AVPlayer playerWithURL:videoURL]; AVPlayerLayer *playerLayer = [AVPlayerLayer playerLayerWithPlayer:player]; playerLayer.frame = self.view.bounds; [self.view.layer addSublayer:playerLayer]; [player play];...

Page 1 of 1