项目
关于
The best way to customize picture-in-picture for iOS.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- +2
- 15天
- +5
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文中文文档
Features:
1. You can add any custom view on the pip window.
func pictureInPictureControllerWillStartPictureInPicture(_ pictureInPictureController: AVPictureInPictureController) {
// note this is first window
if let window = UIApplication.shared.windows.first {
window.addSubview(customView)
// use autoLayout
customView.snp.makeConstraints { (make) -> Void in
make.edges.equalToSuperview()
}
}
}
2. You can hide speed button, backward button, play button and progress bar on the pip window.
3. You can modify the pip window’s shape dynamically with code.
The shape of the pip window depends on the shape of video. So just change current video to a video with a different shape.
Sample code like:
NSURL *url = [[NSBundle mainBundle] URLForResource:videoName withExtension:@"MP4"];
AVAsset *asset = [AVAsset assetWithURL:url];
AVPlayerItem * item = [[AVPlayerItem alloc] initWithAsset:asset];
[self.pipController.playerLayer.player replaceCurrentItemWithPlayerItem:item];
Demos:
1. float_teleprompter
2. float_timer
探索相关项目
加载中…