【问题标题】:Default chromecast receiver app will not load默认的 chromecast 接收器应用程序不会加载
【发布时间】:2018-10-01 18:09:49
【问题描述】:

我正在尝试运行https://developers.google.com/cast/docs/caf_receiver_basic#google_caf_receiver_sdk_google-caf-receiver-sdk 上提供的默认接收器应用程序。当我尝试在 Chrome 65 中加载接收器时,它会在控制台中引发错误: r_new.html:4 GET file://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js net::ERR_FILE_NOT_FOUND

r_new.html:10 Uncaught ReferenceError: cast is not defined at r_new.html:10 (anonymous) @ r_new.html:10

我知道协议 // 不可知 URL。如果我将其更改为https://,它会加载第一个脚本,然后在其余部分失败。这可能是安全或开发人员问题,但我不知道如何更正。

更新

在使用节点 http-server (https://www.npmjs.com/package/http-server) 和以下指令 https://stackoverflow.com/a/44058453/3997521 成功为我在 Chrome 65 OSX 上的本地主机服务器生成证书后:http-server -S -C MyCompanyLocalhost.cer -K MyCompanyLocalhost.pvk -o

注意:不要忘记安装 MyCompanyCA.cer 以匹配并重新启动 chrome,它将获取证书。

即使页面使用 index.html 文件正确加载,我仍然收到以下错误:

Uncaught TypeError: Cannot read property 'setTouchInputSupport' of undefined at Object.cast.receiver.platform.setTouchInputSupport (cast_receiver_framework.js:81) at Af (cast_receiver_framework.js:116) at T.start (cast_receiver_framework.js:483) at localhost/:10

更新 2:Windows 的结果与正确配置的证书相同

receiver.html:63 Starting receiver application cast_receiver.js:89 [ 0.000s] [cast.receiver.IpcChannel] Opening net websocket cast_receiver.js:89 [ 0.003s] [cast.receiver.CastReceiverManager] Version: 2.0.0.0061 cast_receiver.js:89 [ 0.005s] [cast.receiver.MediaManager] Using default Player receiver.html:68 Starting receiver manager cast_receiver.js:115 Uncaught TypeError: Cannot read property 'setTouchInputSupport' of undefined at te (cast_receiver.js:115) at N.start (cast_receiver.js:97) at receiver.html:82

更新 3:在具有真实预配证书 Chrome 66 Windows 的实时服务器上试用

cast.receiver.platform.setTouchInputSupport @ cast_receiver_framework.js:81 Af @ cast_receiver_framework.js:116 T.start @ cast_receiver_framework.js:483 (anonymous) @ reciever.html:10

【问题讨论】:

    标签: google-cast google-cast-sdk


    【解决方案1】:

    你确定你没有打错字吗?尝试使用本地主机。 如果您决定使用 localhost,那么您将需要运行服务器。 当你的服务器运行时,复制这个例子:

    localhost/myfiles/yourfile.yourcode

    【讨论】:

    • 服务器正在运行,我在上面发布了结果。任何进一步的想法。
    【解决方案2】:

    我从未见过这个错误,并且在 4 月份弹出了这个错误。看起来谷歌添加了一些代码来检查平台。 参考新闻goole first change chromecast prevent amazon

    这个错误会阻止 castManager 在 localhost:8008 上启动 ws 连接 在真正的chromecast中,没有这个错误就可以了。

    【讨论】:

    • 如果您说的是真的,那么这是否意味着 Chromecast 接收器演示仍会显示为可以被任何想要投射的设备发现?
    猜你喜欢
    • 2014-06-26
    • 2013-10-05
    • 2013-10-02
    • 2014-06-17
    • 2020-05-17
    • 1970-01-01
    • 1970-01-01
    • 2019-07-08
    • 1970-01-01
    相关资源
    最近更新 更多