使用 ESC 键让 html5 视频全屏显示
因此,我最近一直使用 mediaelement.js 脚本将 html5 视频嵌入到我的网站中。它工作得非常好,而且似乎是bug最少的。然而,我只是想添加一个功能,当按ESC键时,它会让你退出全屏模式,我做了很多搜索,似乎没有人问过这个问题,这让我觉得这是一个简单的疏忽。但尽管如此,我需要弄清楚才能满足我的客户。谢谢
Media Element 网站:http://mediaelementjs.com/
更新:据我所知,这只是 Chrome不起作用
So I have been embeding html5 videos into my website as of late using the mediaelement.js script. It works really great and seems like be the least buggy. However, I am simply trying to add the function that when pressing the ESC key, it takes you out of full screen mode, I have done a lot of searching and it doesnt seem like anybody has asked this question, which makes me think it is a simple oversight. But nontheless I need to figure it out to satisfy my client. Thanks
Media Element Website: http://mediaelementjs.com/
Update: It is only Chrome from what I can tell that it doesn't work in
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
http://api.jquery.com/keyup/
也许类似的事情,媒体元素应该有一个可以调用来减小窗口大小的函数。如果我没记错的话 ESC 的键码是 27
http://api.jquery.com/keyup/
maybe something like that, media element should have a function you can call to reduce the window size. ESC has keycode 27 if I'm not wrong