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:
Joey Parrish
2020-06-02 16:02:06 -07:00
parent c8942ba250
commit 8c3775ce5e
+5 -3
View File
@@ -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'];