1

I want to disable controls attribute <video>. Simple omission of controls attribute works fine for Chrome, Chrome Mobile and Firefox, but it does not work for mobile Safari and UC browsers. I also tried use

<video onplaying="this.controls=false" > ...

but it also does not work. How can I solve the problem?

Thanks.

Dmitry
  • 2,026
  • 1
  • 18
  • 22

2 Answers2

0
<video onplaying="disableVideoControls();" controls="controls">

function disableVideoControls() { 
   var video = document.getElementById("videoPlayer");
   video.removeAttribute("controls"); 
};

The disableVideoControls() function will execute when the video starts playing and will remove the controls attribute from the <video>, resulting in the controls being removed. If you want to enable the controls when the <video> is finished playing you can make a function to add the attribute back the same way.

Leon
  • 149
  • 8
  • LeeonTM have you tried this solution? It does not work in Safari mobile. Maybe it is iOS feature? – Dmitry Jan 26 '17 at 11:20
0

It is not possible to remove these controllers.

  1. Option One You can place some content if your design matches.
  2. Option Two Turn off Low Power Mode on your device it prevents the video from auto play.