小编Fin*_*man的帖子

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

  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 = …
Run Code Online (Sandbox Code Playgroud)

google-cast

2
推荐指数
1
解决办法
1565
查看次数

标签 统计

google-cast ×1