Feature/help request: programatically enabling picture in picture in the browser

Hi there, we’re big fans of Cloudflare Stream and it’s working well for us. We have a use-case where we want to enable picture-in-picture in response to an event in the browser. With a normal <video> tag, this can be done with vanilla JavaScript.

However when using the Cloudflare Stream Player, this isn’t possible as far as I can tell, because the video is in a cross-origin iframe. I have tried the Stream Player SDK, but this doesn’t seem to support this.

We can use our own player if we have to, but would rather not as we lose out on some functionality provided by the Cloudflare player.

If someone is able to help, I’d be grateful… it could be a case of:

  • Finding a workaround I haven’t thought of
  • Adding a feature to the SDK to enable starting PiP
  • Making the source code of the SDK available (as it’s client-side JavaScript anyway) so that I can add such a method myself easily.


Hi @zaid - Ping on this feature request. Is programmatically toggling PiP on the roadmap?