【问题标题】:Chromecast - sender app - Cast icon not visible HTML5/JSChromecast - 发件人应用程序 - 投射图标不可见 HTML5/JS
【发布时间】:2020-12-05 03:45:30
【问题描述】:

问题在于,即使在 Google 在发件人应用程序中的示例示例中,也看不到投射图标。一个月前,我不得不刷新页面几次才能恢复图标或重新启动设备。现在没有任何效果并且图标丢失,但在 chrome 开发工具中它显示它已正确实现。你知道是什么问题吗?

我正在通过以下方式创建演员按钮:
google-cast-launcher

控制台没有错误

PS。我也实现了图书馆 https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1

【问题讨论】:

    标签: html chromecast google-cast google-cast-sdk


    【解决方案1】:

    我找到了解决方案。您需要使用 https:// 而不是 http:// 否则投射图标将不可见

    希望对大家有所帮助

    @编辑 如果您有不显示图标的问题,并且在控制台中显示:

    CastVideos.js:125 Uncaught ReferenceError: cast is not defined
        at CastPlayer.initializeCastPlayer (CastVideos.js:125)
        at window.__onGCastApiAvailable (CastVideos.js:1004)
        at chrome.cast.ha (VM1365 cast_sender.js:99)
    

    在您的 html 中,将脚本放在 head 的开头,并将脚本放在 body 末尾的框架 gstatic 中。

    【讨论】:

      猜你喜欢
      • 2014-06-02
      • 2023-03-17
      • 2019-09-08
      • 2014-08-10
      • 2015-07-25
      • 2014-09-24
      • 1970-01-01
      • 2019-04-01
      • 2015-01-06
      相关资源
      最近更新 更多