4
votes

I have a receiver app (stock version from cast-ios-sample) that is correctly getting downloaded from my whitelisted URI, according to the debug panel on port 9222. However, the console spits out these lines shortly thereafter from google's hosted cast_receiver.js (referenced in the 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 on a retry loop):

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

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

Is there something that I'm missing?

1

1 Answers

6
votes

It turns out that in the receiver.html example, the Receiver needs your AppID as well. I didn't see this in any of the instructions, so I'm posting the answer here in the event that it helps someone.

cast.receiver.Receiver(activityName...)

Apparently, activityName is actually the AppID and by placing my AppID (instead of naming my application, as I mistakenly thought), it now works fine.