gpt4 book ai didi

MediaElement.js 知道播放器何时全屏显示

转载 作者:行者123 更新时间:2023-12-05 00:35:38 26 4
gpt4 key购买 nike

每次播放器进入全屏(或从全屏退出)时我都需要检查,换句话说,我需要在触发全屏方法时监听自定义事件,以便我可以在下面做其他事情。

最佳答案

在初始化 MediaElement 之前,您需要添加以下代码:

MediaElementPlayer.prototype.enterFullScreen_org = MediaElementPlayer.prototype.enterFullScreen;
MediaElementPlayer.prototype.enterFullScreen = function() {
// Your code here
this.enterFullScreen_org();
}
MediaElementPlayer.prototype.exitFullScreen_org = MediaElementPlayer.prototype.exitFullScreen;
MediaElementPlayer.prototype.exitFullScreen = function() {
// Your code here
this.exitFullScreen_org();
}

关于MediaElement.js 知道播放器何时全屏显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9265203/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com