如果我的Chromecast AppID无效,该怎么办?

Fin*_*man 2 google-cast

  1. 已注册并已收到Google提供的Chromecast AppId.
  2. 使用Chrome API实现了最简单的发件人.
  3. 如果我使用YouTube for AppId,发件人可以使用,但如果我使用Google发给我的AppId,则无法使用.
  4. 更新了发件人以同时收听两者.我的Chromecast显示在YouTube列表中,但不显示在我的AppId列表中.

我相信我的发件人是正确的,但我的Chromecast没有正确列入白名单.现在我该怎么做?

我的sender.html中的JavaScript.我的AppID混淆了.

var myID = 'df7cb8ba-a00b-476b-a9b5-xxxxxxxxxxxx';
var ytID = 'YouTube';

onYtReceiverList = function(list) {
    $(".ytreceivers").html("<p>YouTube Receiver List</p>");
for (var i = 0; i < list.length; i++) {
    $(".ytreceivers").append("<p>"+list[i].id+"<br/>"+list[i].name+"</p>");
}
};

onMyReceiverList = function(list) {
$(".myreceivers").html("<p>My Receiver List</p>");
for (var i = 0; i < list.length; i++) {
    $(".myreceivers").append("<p>"+list[i].id+"<br/>"+list[i].name+"</p>");
}
};

window.addEventListener("message", function(event) {
if (event.source == window && event.data && 
    event.data.source == "CastApi" &&
    event.data.event == "Hello")
    {
    $("body").append("<p>Hello received</p>");
    cast_api = new cast.Api();
    cast_api.addReceiverListener(myID, onMyReceiverList);
    cast_api.addReceiverListener(ytID, onYtReceiverList);
    }
});
Run Code Online (Sandbox Code Playgroud)

Sca*_*ami 5

我开始使用Chromecast开发时遇到的一个问题是我忘了设置此设置:"在检查更新时发送此Chromecast的序列号." 如https://developers.google.com/cast/whitelisting#whitelist-receiver中所述

我还必须重新启动Chromecast才能使设置生效,但之后我的Receiver正确显示.