Disabling picture-in-picture through Vimeo Player API

122 views Asked by At

Is it possible to disable picture in picture for a video using Vimeo's Player API?

I have set both pip and autopip to be false but these do not disable picture-in-picture. In Firefox, the firefox pip button is overlaid on the video and in iOS putting the video in full screen mode reveals the pip button.

Support for disablepictureinpicture attribute on video elements is good nowadays, but the Vimeo Player does not appear to render this attribute. Given that the Vimeo Player renders the video player in an iframe, you cannot programmatically access the video element (due to cross-origin protections).

I've been able to manipulate the video element in Firefox and add a disablepictureinpicture attribute before the video is played which has the desired effect, but this is more to prove that it could work.

Am I missing an embed option? Is there an undocumented option?

Here are my embed options at the mo (video id obfuscated) - the videoplayer is linked to a div

let vimeoOptions = {
    url: `https://player.vimeo.com/video/00000000`,
    controls: true, 
    keyboard: false, 
    title: false,
    autopip: false, 
    pip: false 
}

vimeoPlayer = new Vimeo.Player("myelement", vimeoOptions)
0

There are 0 answers