修改默认的HTML5视频控件 [英] Modify default HTML5 video controls

查看:275
本文介绍了修改默认的HTML5视频控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对你们所有人都有一个相当不寻常的问题;这可能是愚蠢的,但我是这个领域的新手,我真的很感激一些帮助。

I have a rather unusual question for you all; it might be foolish but I am new to this area and I would really appreciate some help.

正如标题所示,我想知道是否有办法禁用特定的来自 HTML5 视频的默认浏览器控件的按钮。

As the title suggests I was wondering if there is a way to disable a specific button from the default browser controls for the HTML5 video.

我知道每个浏览器都有自己看似独特的控件集,所以我不认为我可以用 CSS <覆盖按钮/ code>。
如果不可能,可能以某种方式通过 Javascript 将视频全屏显示到另一个事件?

I know that each browser has its own somewhat unique looking set of controls so I don't think that I can overlay the button with CSS. If it is impossible is it maybe possible to somehow tie via Javascript the event of the video going full screen to another event?

我正在考虑制作自定义控件或使用预制玩家,但如果可能的话我想在不使用任何一个的情况下逃脱。

I was looking into making the custom controls or using the pre-made players but if at all possible I would like to get away without using either.

我感谢任何帮助。

推荐答案

您无法隐藏特定的本机控件。您可以使用它们或通过控件属性隐藏它们。

You can't hide specific native controls. You can either use them or hide them via the controls attribute.

至于使用全屏事件和视频API提供的其他事件, longtail 对不同浏览器和设备中的兼容性或缺乏兼容性进行了广泛的研究。

As far as using listening to fullscreen events along with other events the video API provides, longtail does extensive research on compatibilities or lack thereof within different browsers and devices.

您可以在顶部制作自己的css控件视频元素并通过 html5 media api 控制不同的操作这里。

You can make your own css controls on top of the video element and control different actions via the html5 media api demonstrated here.

对于全屏类型的东西,我建议查看代码这里,因为它是专门为Vimeo HTML5播放器编写的。

For fullscreen type things, I'd recommend looking through the code here as it was written for the Vimeo HTML5 player specifically.

这是一个关于视频API的噩梦,取决于你支持多少'试图实现。

It's kind of a nightmare dealing with the Video API depending how much support you're trying to achieve.

这篇关于修改默认的HTML5视频控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆