Chrome-cast Sample App不起作用

时间:2013-07-31 00:49:37

标签: google-cast

我设法将设备列入白名单,我获得了AppID并设置了我的接收器网址。 我能够构建并运行CastSample App。 我可以点击投射按钮,我的电视显示一个空白屏幕。 我尝试从列表中选择一种媒体,但我的电视上没有显示任何内容。

从日志中我看到点击播放按钮几秒钟后出现的错误。我错过了什么吗?

07-30 20:29:12.895: W/StartSessionTask(19880): Expected a channel but never got a connection service URL
07-30 20:29:12.895: E/ApplicationSession(19880): StartSessionTask failed with error: failed to start application: no channel info received
07-30 20:29:12.900: E/CastSampleActivity(19880): onStartFailed failed to start application: no channel info received
07-30 20:39:58.690: V/CastSampleActivity(21776): Selecting Media
07-30 20:39:58.735: D/AbsListView(21776): Get MotionRecognitionManager
07-30 20:40:03.890: V/MediaSelectionDialog(21776): Selected media: Big Buck Bunny
07-30 20:40:34.055: V/CastSampleActivity(21776): onStop called and callback removed
07-30 20:41:05.870: V/CastSampleActivity(21776): onStart called and callback added

1 个答案:

答案 0 :(得分:3)

我检查了github上的cast-android-sample并发现他们已经更新了receiver.html:

// Initialize and start the media playing receiver
var receiver = new cast.receiver.Receiver(
    'YOUR_APP_ID_HERE', 
    [cast.receiver.RemoteMedia.NAMESPACE],
    "",
    5);

然后我把我的AppID放到那里并将新的receiver.html上传到我的服务器,然后重新启动所有内容,现在我可以播放这些样本媒体了。