-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo Cast Receiver app: compatibility with Media Playback Messages #722
Comments
I was not aware of those requirements, so it would appear Shaka Player's receiver is non-compliant at the moment. I'm not certain, but I would guess this part of the SDK docs show why these requirements exist:
I'm not familiar with generic remote control apps, but it seems that these We'll take it on as an enhancement to support these commands as well as our custom ones. We will also see if we can find a generic remote control app for testing. For now, I think you can expect your Shaka-based sender to work with your Shaka-based receiver, but that other senders would be unable to send a pause, seek, or volume command to your receiver app. If this is acceptable to you for the time being, you can always upgrade your receiver to a new release of Shaka Player after we implement these generic commands. I don't have a timeline for implementation and release right now, but I will try to schedule it soon. Thanks! |
Thanks, @joeyparrish . I could help you with the testing if you wish. :) Besides, one might find the generic remote control in the Google's Cast Sender SDK, which is already available for Chrome, Android, and iOS. Samples which use that SDK are available as well: I am a mobile developer, and being able to control playback using generic Cast SDK is very important for me because in order to comply with Cast UX Guidelines user should have a chance to control the playback even when the application is already terminated. As soon as the receiver is compatible with generic playback control messages, Android will do that for me, no need to keep the application alive. Therefore, when I build the Chromecast-enabled Android application with the custom receiver based Shaka player, it would help me a lot if it already supports generic playback control messages. |
I see. Thanks for the tips! I've added this optimistically to the v2.1 milestone. If we finish this before we finish HLS, it will appear in v2.1. As soon as HLS is done, this will slip to the next milestone. Thanks! |
Just a small update: there are rumors that we don't need to emit those playback control messages by ourselves, but, instead, MediaManager will do that for us. That's a good news - we just need to implement cast.receiver.media.Player interface, and pass the implementation to the MediaManager's constructor. Here I have posted the working sample of the player implementation https://github.com/googlecast/CastReferencePlayer/issues/26 |
I just tried controlling the playback from a Google Home app on my phone and it worked, so I'm cautiously optimistic that this is something that works "from the box". @alex-schwartzman Let me see if I can get additional confirmation from another source before we call it a day. |
Okay, the bad news is there is some work to be done to make this happen after all. Will look into the implementation! |
Actually @alex-schwartzman, do you mind syncing up with me on how you're testing this and what the expected result would be? |
Thanks for stepping in to that challenge. @ismena there is a set of use-cases, which are expected to be handled when the application claims itself as Chromecast-compatible. They all boil down to Chromecast UX Guidelines : https://developers.google.com/cast/docs/design_checklist/ What is important for me as a developer, is that the receiver is capable of answering to the generic playback commands. When the answer contains all the information needed by the user - it's even better. What is important for me as a user - is that when I kick off playback of my favorite show using my mobile, I can see the tile of the show, it's title, and some controls in chrome://cast/#devices when I use chrome, or in Google Home application (available for Android and iOS : https://support.google.com/chromecast/answer/7071794?hl=en) when I use my tablet for playback control. When I say "playback control" it means play, stop, skip to next, pause, adjust volume, kill cast session. All those features described above are implemented already in MediaManager on the receiver side, and in Cast SDK v3 on the sender side. The only missing part in the puzzle is to let MediaManager know how pass playback control commands to Shaka. That's why it accepts |
Okay, it looks like we have some work to do, then. Here's a quick design for how these required commands will map to Shaka Player: Required messages from sender to receiverLoad The message contains a content ID inside the MediaInformation structure. We will invoke a callback to the receiver app to translate this into a manifest URI, and in the absence of that callback, we will assume the content ID field contains a manifest URI. This seems to be allowed by the cast SDK docs. The customData field of the Load message will be given to shaka.util.CastReceiver's opt_appDataCallbackopt. Pause Seek Stop Play Get Status SetVolume Required messages from receiver to senderError: Load Failed Error: Load Cancelled Media Status |
Hey Alex, we just pushed the implementation for this. |
I'm now reading the code, and at the same time studying Google Cast requirements.
One of the requirements - is that the receiver should emit Media Playback Messages using the namespace "urn:x-cast:com.google.cast.media", see https://developers.google.com/cast/docs/reference/messages.
However, in the demo/receiver_app.js I cannot find any mention of that required messaging.
Can you, please, clarify if the demo receiver is "just a non-compliant receiver" or, instead, all Media Playback Messages are emitted by some part of Shaka player which I did not spot yet?
The text was updated successfully, but these errors were encountered: