Skip to content
Proyectos

Acerca de

The best way to customize picture-in-picture for iOS.

Desarrollo web y de aplicaciones

Cómo se miden estas cifras

Crecimiento de estrellas medido

in 24h
0
in 7 days
+2
in 15 days
+6
in 1 month
Recopilando historial

Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.

README.md

Original

中文文档

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.

https://stackoverflow.com/questions/67528832/how-to-hide-system-controls-on-avpictureinpicturecontrollers-float-window#67528832

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

float_teleprompter

2. float_timer

float_timer

Explorar proyectos relacionados

Cargando…