简体   繁体   中英

How to hidden the Play/Pause buttons in the AVPictureInPictureController?

I'm using Picture in Picture feature in my application using AVPictureInPictureController,I wanted to hidden the Play/Pause buttons in the AVPictureInPictureController but I was failed. I think I need help now.

Try this:

    if #available(iOS 14.0, *) {
        //Hide the seekbar
        pipController?.requiresLinearPlayback = true
    } else {
        // Fallback on earlier versions
    }
    
    //Hide the play/pause controls
    pipController?.setValue(1, forKey: "controlsStyle")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM