【问题标题】:LG TV WebOS Video Exit Fullscreen on JavaScriptLG TV WebOS Video Exit Fullscreen on JavaScript
【发布时间】:2021-05-29 18:02:37
【问题描述】:

我制作了一个可以加载、播放和停止视频的应用。它可以使用以下代码请求全屏:

        if (this.video.requestFullScreen) {
            this.video.requestFullScreen();
        } else if (this.video.webkitRequestFullScreen) {
            this.video.webkitRequestFullScreen();
        } else if (this.video.mozRequestFullScreen) {
            this.video.mozRequestFullScreen();
        }

它可以在最近发生的大型软件更新之前使用后退按钮退出全屏模式。现在不可能,因为遥控器上的“返回”按钮会打开 Smart-TV 菜单栏。

是否有人可以帮助软件“退出全屏”,因为标准 JS 代码不起作用。示例在这里:

    if (document.fullscreenElement) {
        document.exitFullscreen();
    }

显然 webOS 中的 Document 对象是有限的,但我确信在视频中必须有退出全屏模式的方法。

【问题讨论】:

    标签: javascript html5-video television webos lg


    【解决方案1】:

    我发现 LG 浏览器是在 WebKit 上制作的,并使用这里描述的方法来切换全屏:

    Toggle Fullscreen exit

    【讨论】:

      猜你喜欢
      • 2022-07-15
      • 2022-12-11
      • 2022-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-23
      • 1970-01-01
      相关资源
      最近更新 更多