Chrome播送的范例应用程式无法运作 [英] Chrome-cast Sample App doesn't work
问题描述
我设法将我的设备列入了白名单,并且获得了AppID,还设置了我的接收者网址. 我能够构建和运行CastSample应用程序. 我可以单击投射"按钮,电视显示黑屏. 我试图从列表中选择一种媒体,但是电视上什么也没显示.
I managed to whitelisted my device and I got the AppID and also setup my receiver url. I am able to build and run the CastSample App. I can click the cast button and my TV shows a blank screen. I tried to select one media from the list but nothing is displayed on my TV.
在点击投射按钮几秒钟后,从日志中看到了以下错误.我想念什么吗?
From the log I see the follwoing error some seconds after I clicked the cast button. Am I missing anything?
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
推荐答案
我在github上检查了cast-android-sample,发现他们已经将Receiver.html更新为:
I checked the cast-android-sample on github and find that they have updated the receiver.html to have:
// Initialize and start the media playing receiver
var receiver = new cast.receiver.Receiver(
'YOUR_APP_ID_HERE',
[cast.receiver.RemoteMedia.NAMESPACE],
"",
5);
然后我将AppID放在此处,并将新的receive.html上传到我的服务器上,然后重新启动所有内容,现在我可以播放这些示例媒体了.
Then I put my AppID there and uploaded the new receiver.html to my server then restarted everything and now I am able to play these sample medias.
这篇关于Chrome播送的范例应用程式无法运作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!