Reputation: 65
I've been working on both the receiver and web sender (Chrome) apps for Chromecast for a while, and since the new API (publicly released yesterday) I've been unable to receive any media status updates after performing a loadMedia request.
Upon refreshing the page, I am able to receive the updates as expected, but both channels receive the media session object the exact same way and perform the exact same methods upon it (addUpdateListener)
We're working with an HLS stream on the receiver side, but I can see updates being sent out to the senders (and obviously they are, as a reload allows the web sender to receive them). Also, on the sender side, I can see updates when I perform actions such as play/pause/volume/mute and seek requests, but only one update after each action.
TL;DR: Don't see any regular media status updates for events such as loading->buffering->playing, and I also don't even see the play/pause/volume/etc updates from other senders connected to the session.
Here's all I get from the sender before it just stops sending any status updates:
[chrome.cast.ApiImpl] Getting message from extension: {"type":"v2_message","message":{"type":"MEDIA_STATUS","status":[{"mediaSessionId":1,"playbackRate":1,"playerState":"BUFFERING","currentTime":500,"supportedMediaCommands":15,"volume":{"level":1,"muted":false},"media":{removed}","streamType":"buffered","contentType":"contentType","metadata":null,"duration":1450.1558329999993,"customData":null},"sessionId":"FD5AA3F0-F93C-050A-4900-7C6D916525BA"}],"requestId":92278937},"seqNum":"a14772002","clientId":null,"appOrigin":null} [chrome.cast.ApiImpl] Creating new Media object: FD5AA3F0-F93C-050A-4900-7C6D916525BA:1 cast_sender.js:3428 New media session ID: 1 (loadMedia)
But I can tell that the receiver is still sending out updates by looking in the debug console, there's a bunch of these firing off:
[245.485s] [cast.receiver.IpcChannel] IPC message sent: {"namespace":"urn:x-cast:com.google.cast.media","senderId":":","data":"{\"type\":\"MEDIA_STATUS\",\"status\" ...removed [247.495s] [cast.receiver.MediaManager] Sending broadcast status message
I've also noticed that when I do get messages prior to the loadMedia callback, they're all in the BUFFERING state, never a PLAYING
Upvotes: 2
Views: 2905
Reputation: 461
I see this bug has been fixed with Feb 10 update, however I am not seeing currentTime event. From the docs -
Changes to the following properties will trigger the listener: currentTime, volume, metadata, playbackRate, playerState, customData.
Should we expect to get an update when the time changes?
Upvotes: 1
Reputation: 874
This bug is confirmed and it has been fixed as of Feb 10 update of Cast extension.
Old workaround:
For now there is a workaround for this type of issues where status updates from receiver apps are routed to Chrome Cast extension but not getting routed to the Chrome sender apps.
The trick for now to see incoming status updates from receiver apps is to open up at least 2 tabs that run the same sender app. You initiate a session from one of the tabs and then join that session from the other tab. Now any status update messages from receiver app will not be intercepted by the Cast extension anymore.
Upvotes: 2