AVF 7 - AVKit 播放
文章目录
- (void)testAVKit{
NSString *fileName = @"ElephantSeals.mov";
NSURL *fileURL = [[NSBundle mainBundle] URLForResource:fileName
withExtension:nil];
self.playerView = [[AVPlayerView alloc]initWithFrame:NSMakeRect(0, 0, 300, 300)];
[self.window.contentView addSubview:self.playerView];
self.playerView.player = [AVPlayer playerWithURL:fileURL];
self.playerView.showsSharingServiceButton = YES;
}