Mediaelement.js - 想要删除所有控件 - 仅显示视频
我正在尝试用 mp4 替换网页中的 swf 标题。我喜欢 MediaElement.js,但无法删除控件。我不想隐藏控件,我想完全删除它们......并且只显示循环视频。
任何建议将不胜感激。
I am trying to replace my swf header in my webpage with mp4. I like MediaElement.js but I can't remove the controls. I don't want to hide the controls, I want to remove them completely... and just display the looping video.
Any suggestions would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我认为更好的解决方案是:
设置
features
属性:将其插入您的 css 中:
这样您就可以通过单击视频来暂停播放。
I think a better solution is:
Set
features
property:Insert this in your css:
That way you can pause-play by clicking the video.
您必须结合这些答案:
设置
将其插入到您的 css 中:
重要
当您执行此操作时,您无法通过单击视频来暂停视频。
You have to combine those answers:
set
insert this in your css:
Important
When you do this, you can't pause the video by clicking on it.
当您设置 MediaElement 选项时,您可以设置功能:
要删除所有内容,只需将其设置为空数组
when you set up the MediaElement options you can set features:
to remove everything just set it to an empty array
从视频标签中删除属性时要小心。从视频标签中删除“controls”属性会在 Safari 中呈现一个错误:Safari 不再播放视频。这与 Safari 在授权播放视频之前等待控件加载(无论是否是本机控件)有关。
Careful with removing attributes from within the video tag. Removing the "controls" attribute from the video tag renders a bug in Safari : Safari doesn't play the video anymore. It has something to do with Safari waiting for the controls to be loaded -wether native or not- before authorizing the video to be played.
从视频标签中完全删除“controls”属性。
一般来说,在视频标签中,任何要设置为 false 的属性都应该完全删除,而不是设置为“false”或“”。
Remove the "controls" attribute out of the video tag completely.
Generally in the video tag, any attribute that you want to set to false, should be removed completely instead of setting it to "false" or "".