javascript - HTML 5: Force window controls to be always visible - Stack Overflow

This is definitely a trivial thing but I failed to find a working solution on google! How do we force t

This is definitely a trivial thing but I failed to find a working solution on google! How do we force the controls of a html 5 video to always be visible. For example when the video is playing and the cursor is not on the video, the progress bar just fades away! Please let me know how to keep it there at all time!

This is definitely a trivial thing but I failed to find a working solution on google! How do we force the controls of a html 5 video to always be visible. For example when the video is playing and the cursor is not on the video, the progress bar just fades away! Please let me know how to keep it there at all time!

Share Improve this question asked Jul 16, 2014 at 7:42 Amir ZadehAmir Zadeh 3,6392 gold badges30 silver badges49 bronze badges 3
  • That's up to the browser, all you can do is add the controls attribute on the video tag – adeneo Commented Jul 16, 2014 at 7:43
  • 1 So, no controls over that? – Amir Zadeh Commented Jul 16, 2014 at 7:45
  • Same question here. It's strange that there is no option to force the control to be visible all the time. Pretty basic need... – gregoiregentil Commented Jan 13, 2016 at 16:38
Add a ment  | 

1 Answer 1

Reset to default 5

You can style the controls by styling the pseudo elements. To force the controls to remain visible in Webkit browsers you can do:

video::-webkit-media-controls-panel {
    display: flex !important;
    opacity: 1 !important;
}

And I imagine there are other vendor prefixes for the other browsers.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744860174a4597653.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信