Debugging the Chromecast Receiver app (device does not support platform APIs)

I have a receiver application (the original version from the example is cast-ios-sample) that loads correctly from my whitelist URI according to the debug panel on port 9222. However, the console spits out these lines shortly afterwards from Google cast_receiver.js ( link in receiver.html file)

[ 0.162s] [goog.net.WebSocket] An error occurred: undefined [ 0.172s] [cast.receiver.ChannelOverWebSocket] Dispatch ERROR event to ws://localhost:8008/system/control [ 0.177s] [cast.receiver.Channel] Dispatch ERROR event to ws://localhost:8008/system/control [ 0.182s] [cast.receiver.Platform] Platform channel has an error: ws://localhost:8008/system/control 

Then after a series of these errors (presumably in the loop of retry):

 [ 8.335s] [cast.receiver.Platform] This device doesn't support the platform API. 

If I try to manually establish a WebSocket connection with ws: // localhost: 8008 / system / control, I just get an undefined response.

Is there something I am missing?

+4
source share
1 answer

It turns out that in the receiver.html example, the Recipient needs your AppID. I have not seen this in any of the instructions, so I am posting the answer here if it helps someone.

 cast.receiver.Receiver(activityName...) 

Apparently, activityName is actually an AppID and, putting my AppID (instead of calling my application, as I mistakenly thought), it now works fine.

+6
source

Source: https://habr.com/ru/post/1493973/


All Articles