mirror of
https://github.com/shaka-project/shaka-player.git
synced 2026-06-17 16:26:39 +03:00
Fix Google Home app scrubber for casted VOD
When we get a GET_STATUS request, we are supposed to send back media info. That field is only optional for other requests. This fixes the scrubber in the Google Home app for VOD content. Issue #2606 Change-Id: Iceec95f18cf15325b7ee2350a0f30f31edc90560
This commit is contained in:
@@ -449,9 +449,11 @@ shaka.cast.CastReceiver = class extends shaka.util.FakeEventTarget {
|
||||
|
||||
/**
|
||||
* Composes and sends a mediaStatus message with a mediaInfo component.
|
||||
*
|
||||
* @param {number=} requestId
|
||||
* @private
|
||||
*/
|
||||
sendMediaInfoMessage_() {
|
||||
sendMediaInfoMessage_(requestId = 0) {
|
||||
const media = {
|
||||
'contentId': this.player_.getAssetUri(),
|
||||
'streamType': this.player_.isLive() ? 'LIVE' : 'BUFFERED',
|
||||
@@ -461,7 +463,7 @@ shaka.cast.CastReceiver = class extends shaka.util.FakeEventTarget {
|
||||
// field.
|
||||
'contentType': '',
|
||||
};
|
||||
this.sendMediaStatus_(0, media);
|
||||
this.sendMediaStatus_(requestId, media);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -640,7 +642,7 @@ shaka.cast.CastReceiver = class extends shaka.util.FakeEventTarget {
|
||||
// but it doesn't appear to be working.
|
||||
// Look into what's going on there and change this to be a
|
||||
// unicast.
|
||||
this.sendMediaStatus_(Number(message['requestId']));
|
||||
this.sendMediaInfoMessage_(Number(message['requestId']));
|
||||
break;
|
||||
case 'VOLUME': {
|
||||
const volumeObject = message['volume'];
|
||||
|
||||
Reference in New Issue
Block a user