-
Notifications
You must be signed in to change notification settings - Fork 271
pip
Franken Zeng edited this page Oct 12, 2016
·
4 revisions
##使用示例
- 用户自定义背景视频url
NSString * pathComp = [NSString stringWithFormat:@"Documents/t2.mp4"];
NSString *testflv = [NSHomeDirectory() stringByAppendingPathComponent:pathComp];
NSURL* videoUrl = [NSURL fileURLWithPath:testflv];
- 用户自定义背景图片URL
NSString *testjpg = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents/c.jpg"];
NSURL* bgUrl = [NSURL fileURLWithPath:testjpg];
- 开启画中画功能,最后参数为主播图像的显示位置,注意此时背景视频并没有播放
[_kit startPipWithPlayerUrl:videoUrl bgPic:bgUrl capRect:CGRectMake(0.6, 0.6, 0.3, 0.3)];
- 播放背景视频
[_kit.player play];
- 暂停背景视频
[_kit.player pause];
- 停止背景视频
[_kit.player stop];
- 停止画中画
[_kit stopPip];