question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support HTML5 Video Attribute disablePictureInPicture

See original GitHub issue

Bug Report: disablePictureInPicture for html5 video elements are not supported

Eg:

    <video
    src="https://www.w3schools.com/tags/movie.mp4"
    disablePictureInPicture
    loop
    controls
    controlsList="nodownload"  
    ></video>

What is the current behavior?

Should remove the 3 dots (more button) on videos on Chrome:

image

What is the expected behavior?

Instead, the attribute is not taken into consideration so the more menu stays:

image

Example:

https://jsfiddle.net/r1w4x7m0/2/

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

All / Latest, Chrome Browsers, All OSes.

Pull request for this issue has also been submitted: #15334

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JohnDDuncanIIIcommented, Aug 13, 2019

Needed to disable the PiP button before going live with a new feature this month, so to work around this issue, I call

this.video.disablePictureInPicture = true

on a ref of the <video> element in componentDidMount. Not the optimal solution, but it works (adding this to the thread for those who are still on older versions of React)

¯\(シ)

https://w3c.github.io/picture-in-picture/#example-add-custom-pip-button

0reactions
Divyasamcommented, Jun 10, 2020

adding "disablePictureInPicture controlsList=“nodownload” " to video tag removes 3 dots in Full-screen mode

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTMLVideoElement.disablePictureInPicture - Web APIs | MDN
The HTMLVideoElement disablePictureInPicture property reflects the HTML attribute indicating whether the user agent should suggest the ...
Read more >
How to disable Picture in Picture mode on HTML5 video
1- you are applying the attributes and binding the function to all <video> elements of the page for each of them which triggers...
Read more >
How to disable Picture in Picture mode on HTML5 video
How to disable Picture in Picture mode on HTML5 video. Resolved bergaul. (@bergaul) ... About using the disablePictureInPicture attributes.
Read more >
Picture-in-Picture - W3C
To support these use cases, a new disablePictureInPicture attribute is added to the list of content attributes for video elements.
Read more >
How to disable "picture in picture" on html5 video in firefox
HTML : How to disable "picture in picture " on html5 video in firefox [ Beautify Your Computer : https://www.hows.tech/p/recommended.html ] ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found