Webkit attributes do not disable/hide AirPlay button in Safari

28 Views Asked by At

I'm trying to disable AirPlay button on Safari when using react-player (https://www.npmjs.com/package/react-player) package. I have added x-webkit-wirelessvideoplaybackdisabled="true", x-webkit-airplay="deny", "disableremoteplayback": "true" attributes for Safari since controlslist attribute is not supported for it yet based on this: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video.

The video tag becomes like this: <video preload="auto" controls="" controlslist="nodownload noremoteplayback" x-webkit-airplay="deny" x-webkit-wirelessvideoplaybackdisabled="true" disableremoteplayback="true" ...otherprops...></video>

Unfortunately, this is working partially. The AirPlay button just disappears/appears randomly for some time. Is there any other way to resolve the issue of hiding or even just disabling the button?

Based on the following documentations and forums the webkit attributes should have worked:

Following all the documentations and forums above, none of them actually provide the constant result, since the AirPlay button just appears randomly and after n-seconds/minutes it just disappears.

0

There are 0 best solutions below