How to remove HTML5 video player navigation button

旧时模样 提交于 2020-08-26 10:02:50

问题


I am using HTML5 video player to play video constantly.Every thing is fine except the video navigation button displaying at the last of the video screen as soon as the mouse cursor moves over the video. I want to remove or hide it but not getting how to do it .. Here is the HTML for the Video used..

<video id='video-player' autoplay="autoplay" loop  preload='metadata' controls>
<source src="Video/1.MP4" type="video/mp4">
</video>

Please help me to remove the navigation bar from the last ..Thanks..


回答1:


You can disabled controls via Javascript:

document.getElementById('video-player').controls = false

Or simply remove controls attribute:

<video id='video-player' autoplay="autoplay" loop preload="metadata">
    <source src="Video/1.MP4" type="video/mp4">
</video>


来源:https://stackoverflow.com/questions/26839359/how-to-remove-html5-video-player-navigation-button

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!