shaka-player 4.6.10 → 4.6.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/ISSUE_TEMPLATE/question.md +7 -0
- package/AUTHORS +1 -0
- package/CHANGELOG.md +11 -0
- package/CONTRIBUTORS +1 -0
- package/demo/config.js +1 -1
- package/dist/demo.compiled.debug.js +1 -1
- package/dist/demo.compiled.js +1 -1
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.d.ts +1 -1
- package/dist/shaka-player.compiled.debug.externs.js +2 -1
- package/dist/shaka-player.compiled.debug.js +22 -21
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +2 -1
- package/dist/shaka-player.compiled.js +992 -990
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.d.ts +13 -2
- package/dist/shaka-player.ui.debug.d.ts +13 -2
- package/dist/shaka-player.ui.debug.externs.js +3 -1
- package/dist/shaka-player.ui.debug.js +25 -23
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +3 -1
- package/dist/shaka-player.ui.js +1124 -1122
- package/dist/shaka-player.ui.map +3 -3
- package/lib/media/drm_engine.js +9 -0
- package/lib/offline/storage.js +4 -0
- package/lib/player.js +13 -3
- package/lib/polyfill/media_capabilities.js +9 -2
- package/lib/util/ts_parser.js +7 -4
- package/package.json +1 -1
- package/test/polyfill/media_capabilities_unit.js +12 -6
- package/test/test/util/fake_drm_engine.js +7 -0
- package/ui/externs/ui.js +24 -0
- package/ui/play_button.js +3 -0
- /package/.github/{config.yml → ISSUE_TEMPLATE/config.yml} +0 -0
|
@@ -20,7 +20,14 @@ assignees: ''
|
|
|
20
20
|
**Have you read the [FAQ](https://bit.ly/ShakaFAQ) and checked for duplicate open issues?**
|
|
21
21
|
|
|
22
22
|
|
|
23
|
+
**If the question is related to FairPlay, have you read the tutorial?**
|
|
24
|
+
<!-- NOTE: https://shaka-player-demo.appspot.com/docs/api/tutorial-fairplay.html -->
|
|
25
|
+
|
|
26
|
+
|
|
23
27
|
**What version of Shaka Player are you using?**
|
|
24
28
|
|
|
25
29
|
|
|
30
|
+
**What browser and OS are you using?**
|
|
31
|
+
|
|
32
|
+
|
|
26
33
|
**Please ask your question**
|
package/AUTHORS
CHANGED
|
@@ -88,6 +88,7 @@ Swank Motion Pictures Inc. <*@swankmp.com>
|
|
|
88
88
|
TalkTalk Plc <*@talktalkplc.com>
|
|
89
89
|
Tatsiana Gelahova <tatsiana.gelahova@gmail.com>
|
|
90
90
|
Tian Shao <tyrelltle@gmail.com>
|
|
91
|
+
Thomas Champion <thchampi@gmail.com>
|
|
91
92
|
Tomas Tichy <mr.tichyt@gmail.com>
|
|
92
93
|
Tomohiro Matsuzawa <thmatuza75@hotmail.com>
|
|
93
94
|
Toshihiro Suzuki <t.suzuki326@gmail.com>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.6.11](https://github.com/shaka-project/shaka-player/compare/v4.6.10...v4.6.11) (2024-01-24)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* add missing properties to PlayButton type ([#6130](https://github.com/shaka-project/shaka-player/issues/6130)) ([2ecd8c9](https://github.com/shaka-project/shaka-player/commit/2ecd8c9980b2187697897a79d982a449188b7015))
|
|
9
|
+
* Allow by default variants without pssh in the manifest ([#6144](https://github.com/shaka-project/shaka-player/issues/6144)) ([862809a](https://github.com/shaka-project/shaka-player/commit/862809a0ad14f4f1bba0a0416d16d54d31362f43))
|
|
10
|
+
* Fix detection of spatial rendering support in Cast ([#6138](https://github.com/shaka-project/shaka-player/issues/6138)) ([a0a3103](https://github.com/shaka-project/shaka-player/commit/a0a310326d66d2b5b99478fd77b6e3aa558b7a8a))
|
|
11
|
+
* Fix nalu parsing in TS ([#6137](https://github.com/shaka-project/shaka-player/issues/6137)) ([6183af8](https://github.com/shaka-project/shaka-player/commit/6183af88eaa052721bf8906b98caad7ba339d25d))
|
|
12
|
+
* **offline:** Fix store persistent licenses with drm info in the pssh ([#6143](https://github.com/shaka-project/shaka-player/issues/6143)) ([1fe82fe](https://github.com/shaka-project/shaka-player/commit/1fe82fe0855a0151bf16986529af08b04b990790))
|
|
13
|
+
|
|
3
14
|
## [4.6.10](https://github.com/shaka-project/shaka-player/compare/v4.6.9...v4.6.10) (2024-01-18)
|
|
4
15
|
|
|
5
16
|
|
package/CONTRIBUTORS
CHANGED
|
@@ -128,6 +128,7 @@ Thomas Stephens <thomas@ustudio.com>
|
|
|
128
128
|
Tian Shao <tyrelltle@gmail.com>
|
|
129
129
|
Tim Plummer <objelisks@google.com>
|
|
130
130
|
Timothy Drews <tdrews@google.com>
|
|
131
|
+
Thomas Champion <thchampi@gmail.com>
|
|
131
132
|
Tomas Bucher <collapsingtesseract@gmail.com>
|
|
132
133
|
Tomas Tichy <mr.tichyt@gmail.com>
|
|
133
134
|
Tomohiro Matsuzawa <thmatuza75@hotmail.com>
|
package/demo/config.js
CHANGED
|
@@ -251,7 +251,7 @@ shakaDemo.Config = class {
|
|
|
251
251
|
.addBoolInput_('Enabled', 'abr.enabled')
|
|
252
252
|
.addBoolInput_('Use Network Information API',
|
|
253
253
|
'abr.useNetworkInformation')
|
|
254
|
-
.addNumberInput_('Default Bandwidth
|
|
254
|
+
.addNumberInput_('Default Bandwidth Estimate',
|
|
255
255
|
'abr.defaultBandwidthEstimate')
|
|
256
256
|
.addNumberInput_('Bandwidth Downgrade Target',
|
|
257
257
|
'abr.bandwidthDowngradeTarget',
|
|
@@ -216,7 +216,7 @@ a("Video Robustness","videoRobustness",c);a("Audio Robustness","audioRobustness"
|
|
|
216
216
|
"manifest.hls.defaultAudioCodec").addTextInput_("Default Video Codec","manifest.hls.defaultVideoCodec").addTextInput_("Default media playlist full mime type","manifest.hls.mediaPlaylistFullMimeType").addBoolInput_("Ignore Program Date Time from manifest","manifest.hls.ignoreManifestProgramDateTime").addBoolInput_("Use Safari behavior for live","manifest.hls.useSafariBehaviorForLive").addNumberInput_("Live segments delay","manifest.hls.liveSegmentsDelay").addBoolInput_("Enable HLS sequence mode","manifest.hls.sequenceMode").addBoolInput_("Ignore Manifest Timestamps in Segments Mode",
|
|
217
217
|
"manifest.hls.ignoreManifestTimestampsInSegmentsMode").addBoolInput_("Disable codec guessing","manifest.hls.disableCodecGuessing").addBoolInput_("Allow LL-HLS byterange optimization","manifest.hls.allowLowLatencyByteRangeOptimization").addNumberInput_("Availability Window Override","manifest.availabilityWindowOverride",!0,!1,!0).addTextInput_("Clock Sync URI","manifest.dash.clockSyncUri").addNumberInput_("Default Presentation Delay","manifest.defaultPresentationDelay").addBoolInput_("Enable Audio Groups",
|
|
218
218
|
"manifest.dash.enableAudioGroups").addBoolInput_("Ignore Min Buffer Time","manifest.dash.ignoreMinBufferTime").addNumberInput_("Initial Segment Limit","manifest.dash.initialSegmentLimit",!1,!1,!0).addBoolInput_("Enable DASH sequence mode","manifest.dash.sequenceMode").addBoolInput_("Disable Audio","manifest.disableAudio").addBoolInput_("Disable Video","manifest.disableVideo").addBoolInput_("Disable Text","manifest.disableText").addBoolInput_("Disable Thumbnails","manifest.disableThumbnails").addBoolInput_("Enable segment-relative VTT Timing",
|
|
219
|
-
"manifest.segmentRelativeVttTiming").addBoolInput_("Enable MSS sequence mode","manifest.mss.sequenceMode");this.addRetrySection_("manifest","Manifest Retry Parameters")}addAbrSection_(){const a=this.resolveExternLink_(".AbrConfiguration");this.addSection_("Adaptation",a).addBoolInput_("Enabled","abr.enabled").addBoolInput_("Use Network Information API","abr.useNetworkInformation").addNumberInput_("Default Bandwidth
|
|
219
|
+
"manifest.segmentRelativeVttTiming").addBoolInput_("Enable MSS sequence mode","manifest.mss.sequenceMode");this.addRetrySection_("manifest","Manifest Retry Parameters")}addAbrSection_(){const a=this.resolveExternLink_(".AbrConfiguration");this.addSection_("Adaptation",a).addBoolInput_("Enabled","abr.enabled").addBoolInput_("Use Network Information API","abr.useNetworkInformation").addNumberInput_("Default Bandwidth Estimate","abr.defaultBandwidthEstimate").addNumberInput_("Bandwidth Downgrade Target",
|
|
220
220
|
"abr.bandwidthDowngradeTarget",!0).addNumberInput_("Bandwidth Upgrade Target","abr.bandwidthUpgradeTarget",!0).addNumberInput_("Switch Interval","abr.switchInterval",!0).addNumberInput_("Min total Bytes","abr.advanced.minTotalBytes").addNumberInput_("Min Bytes","abr.advanced.minBytes").addNumberInput_("Fast half life","abr.advanced.fastHalfLife",!0).addNumberInput_("Slow half life","abr.advanced.slowHalfLife",!0).addBoolInput_("Restrict to element size","abr.restrictToElementSize").addBoolInput_("Restrict to screen size",
|
|
221
221
|
"abr.restrictToScreenSize").addBoolInput_("Ignore device pixel ratio","abr.ignoreDevicePixelRatio").addBoolInput_("Clear video buffer on abr rendition switch","abr.clearBufferSwitch").addNumberInput_("Safe margin on abr switch rendition","abr.safeMarginSwitch",!0);this.addRetrictionsSection_("abr","Adaptation Restrictions")}addCmcdSection_(){const a=this.resolveExternLink_(".CmcdConfiguration");this.addSection_("CMCD",a).addBoolInput_("Enabled","cmcd.enabled").addTextInput_("Session ID","cmcd.sessionId").addTextInput_("Content ID",
|
|
222
222
|
"cmcd.contentId").addBoolInput_("Use Headers","cmcd.useHeaders")}addLcevcSection_(){const a=this.resolveExternLink_(".LcevcConfiguration");this.addSection_("MPEG-5 Part-2 LCEVC",a).addBoolInput_("Enabled","lcevc.enabled").addBoolInput_("LCEVC Dynamic Performance scaling","lcevc.dynamicPerformanceScaling").addNumberInput_("LCEVC Log Level","lcevc.logLevel").addBoolInput_("Draw LCEVC Logo","lcevc.drawLogo")}addAdsSection_(){const a=this.resolveExternLink_(".AdsConfiguration");this.addSection_("Ads",
|
package/dist/demo.compiled.js
CHANGED
|
@@ -216,7 +216,7 @@ a("Video Robustness","videoRobustness",c);a("Audio Robustness","audioRobustness"
|
|
|
216
216
|
"manifest.hls.defaultAudioCodec").addTextInput_("Default Video Codec","manifest.hls.defaultVideoCodec").addTextInput_("Default media playlist full mime type","manifest.hls.mediaPlaylistFullMimeType").addBoolInput_("Ignore Program Date Time from manifest","manifest.hls.ignoreManifestProgramDateTime").addBoolInput_("Use Safari behavior for live","manifest.hls.useSafariBehaviorForLive").addNumberInput_("Live segments delay","manifest.hls.liveSegmentsDelay").addBoolInput_("Enable HLS sequence mode","manifest.hls.sequenceMode").addBoolInput_("Ignore Manifest Timestamps in Segments Mode",
|
|
217
217
|
"manifest.hls.ignoreManifestTimestampsInSegmentsMode").addBoolInput_("Disable codec guessing","manifest.hls.disableCodecGuessing").addBoolInput_("Allow LL-HLS byterange optimization","manifest.hls.allowLowLatencyByteRangeOptimization").addNumberInput_("Availability Window Override","manifest.availabilityWindowOverride",!0,!1,!0).addTextInput_("Clock Sync URI","manifest.dash.clockSyncUri").addNumberInput_("Default Presentation Delay","manifest.defaultPresentationDelay").addBoolInput_("Enable Audio Groups",
|
|
218
218
|
"manifest.dash.enableAudioGroups").addBoolInput_("Ignore Min Buffer Time","manifest.dash.ignoreMinBufferTime").addNumberInput_("Initial Segment Limit","manifest.dash.initialSegmentLimit",!1,!1,!0).addBoolInput_("Enable DASH sequence mode","manifest.dash.sequenceMode").addBoolInput_("Disable Audio","manifest.disableAudio").addBoolInput_("Disable Video","manifest.disableVideo").addBoolInput_("Disable Text","manifest.disableText").addBoolInput_("Disable Thumbnails","manifest.disableThumbnails").addBoolInput_("Enable segment-relative VTT Timing",
|
|
219
|
-
"manifest.segmentRelativeVttTiming").addBoolInput_("Enable MSS sequence mode","manifest.mss.sequenceMode");this.addRetrySection_("manifest","Manifest Retry Parameters")}addAbrSection_(){const a=this.resolveExternLink_(".AbrConfiguration");this.addSection_("Adaptation",a).addBoolInput_("Enabled","abr.enabled").addBoolInput_("Use Network Information API","abr.useNetworkInformation").addNumberInput_("Default Bandwidth
|
|
219
|
+
"manifest.segmentRelativeVttTiming").addBoolInput_("Enable MSS sequence mode","manifest.mss.sequenceMode");this.addRetrySection_("manifest","Manifest Retry Parameters")}addAbrSection_(){const a=this.resolveExternLink_(".AbrConfiguration");this.addSection_("Adaptation",a).addBoolInput_("Enabled","abr.enabled").addBoolInput_("Use Network Information API","abr.useNetworkInformation").addNumberInput_("Default Bandwidth Estimate","abr.defaultBandwidthEstimate").addNumberInput_("Bandwidth Downgrade Target",
|
|
220
220
|
"abr.bandwidthDowngradeTarget",!0).addNumberInput_("Bandwidth Upgrade Target","abr.bandwidthUpgradeTarget",!0).addNumberInput_("Switch Interval","abr.switchInterval",!0).addNumberInput_("Min total Bytes","abr.advanced.minTotalBytes").addNumberInput_("Min Bytes","abr.advanced.minBytes").addNumberInput_("Fast half life","abr.advanced.fastHalfLife",!0).addNumberInput_("Slow half life","abr.advanced.slowHalfLife",!0).addBoolInput_("Restrict to element size","abr.restrictToElementSize").addBoolInput_("Restrict to screen size",
|
|
221
221
|
"abr.restrictToScreenSize").addBoolInput_("Ignore device pixel ratio","abr.ignoreDevicePixelRatio").addBoolInput_("Clear video buffer on abr rendition switch","abr.clearBufferSwitch").addNumberInput_("Safe margin on abr switch rendition","abr.safeMarginSwitch",!0);this.addRetrictionsSection_("abr","Adaptation Restrictions")}addCmcdSection_(){const a=this.resolveExternLink_(".CmcdConfiguration");this.addSection_("CMCD",a).addBoolInput_("Enabled","cmcd.enabled").addTextInput_("Session ID","cmcd.sessionId").addTextInput_("Content ID",
|
|
222
222
|
"cmcd.contentId").addBoolInput_("Use Headers","cmcd.useHeaders")}addLcevcSection_(){const a=this.resolveExternLink_(".LcevcConfiguration");this.addSection_("MPEG-5 Part-2 LCEVC",a).addBoolInput_("Enabled","lcevc.enabled").addBoolInput_("LCEVC Dynamic Performance scaling","lcevc.dynamicPerformanceScaling").addNumberInput_("LCEVC Log Level","lcevc.logLevel").addBoolInput_("Draw LCEVC Logo","lcevc.drawLogo")}addAdsSection_(){const a=this.resolveExternLink_(".AdsConfiguration");this.addSection_("Ads",
|
package/dist/locales.js
CHANGED
|
@@ -724,46 +724,46 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
724
724
|
* @const
|
|
725
725
|
*/
|
|
726
726
|
shaka.ui.Locales.Ids = {
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
LOOP: 'LOOP',
|
|
732
|
-
REWIND: 'REWIND',
|
|
733
|
-
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
734
|
-
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
735
|
-
AD_PROGRESS: 'AD_PROGRESS',
|
|
736
|
-
RESOLUTION: 'RESOLUTION',
|
|
737
|
-
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
738
|
-
BACK: 'BACK',
|
|
739
|
-
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
740
|
-
UNMUTE: 'UNMUTE',
|
|
741
|
-
SEEK: 'SEEK',
|
|
742
|
-
REPLAY: 'REPLAY',
|
|
727
|
+
SURROUND: 'SURROUND',
|
|
728
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
729
|
+
ON: 'ON',
|
|
730
|
+
LIVE: 'LIVE',
|
|
743
731
|
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
732
|
+
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
733
|
+
PLAY: 'PLAY',
|
|
744
734
|
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
745
|
-
|
|
746
|
-
VOLUME: 'VOLUME',
|
|
747
|
-
CAPTIONS: 'CAPTIONS',
|
|
735
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
748
736
|
SKIP_AD: 'SKIP_AD',
|
|
749
|
-
FAST_FORWARD: 'FAST_FORWARD',
|
|
750
737
|
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
751
738
|
MUTE: 'MUTE',
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
755
|
-
AIRPLAY: 'AIRPLAY',
|
|
756
|
-
PAUSE: 'PAUSE',
|
|
757
|
-
LANGUAGE: 'LANGUAGE',
|
|
758
|
-
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
759
|
-
LIVE: 'LIVE',
|
|
760
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
739
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
740
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
761
741
|
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
762
|
-
AD_TIME: 'AD_TIME',
|
|
763
|
-
ON: 'ON',
|
|
764
|
-
AD_DURATION: 'AD_DURATION',
|
|
765
|
-
PLAY: 'PLAY',
|
|
766
742
|
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
743
|
+
BACK: 'BACK',
|
|
744
|
+
PAUSE: 'PAUSE',
|
|
745
|
+
REWIND: 'REWIND',
|
|
746
|
+
LANGUAGE: 'LANGUAGE',
|
|
767
747
|
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
768
748
|
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
749
|
+
OFF: 'OFF',
|
|
750
|
+
AD_TIME: 'AD_TIME',
|
|
751
|
+
SEEK: 'SEEK',
|
|
752
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
753
|
+
CAST: 'CAST',
|
|
754
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
755
|
+
CAPTIONS: 'CAPTIONS',
|
|
756
|
+
VOLUME: 'VOLUME',
|
|
757
|
+
RESOLUTION: 'RESOLUTION',
|
|
758
|
+
UNMUTE: 'UNMUTE',
|
|
759
|
+
AIRPLAY: 'AIRPLAY',
|
|
760
|
+
STATISTICS: 'STATISTICS',
|
|
761
|
+
QUALITY: 'QUALITY',
|
|
762
|
+
REPLAY: 'REPLAY',
|
|
763
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
764
|
+
AD_DURATION: 'AD_DURATION',
|
|
765
|
+
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
766
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
767
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
768
|
+
LOOP: 'LOOP',
|
|
769
769
|
};
|
|
@@ -3568,7 +3568,7 @@ declare namespace shaka.util {
|
|
|
3568
3568
|
* The code is based on hls.js
|
|
3569
3569
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
3570
3570
|
*/
|
|
3571
|
-
parseNalus (pes : shaka.extern.MPEG_PES , lastNalu ? : shaka.extern.VideoNalu | null ) : shaka.extern.VideoNalu [] ;
|
|
3571
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastNalu ? : shaka.extern.VideoNalu | null , lastState ? : number | null ) : shaka.extern.VideoNalu [] ;
|
|
3572
3572
|
static Timescale : number ;
|
|
3573
3573
|
/**
|
|
3574
3574
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -3568,7 +3568,7 @@ declare namespace shaka.util {
|
|
|
3568
3568
|
* The code is based on hls.js
|
|
3569
3569
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
3570
3570
|
*/
|
|
3571
|
-
parseNalus (pes : shaka.extern.MPEG_PES , lastNalu ? : shaka.extern.VideoNalu | null ) : shaka.extern.VideoNalu [] ;
|
|
3571
|
+
parseNalus (pes : shaka.extern.MPEG_PES , lastNalu ? : shaka.extern.VideoNalu | null , lastState ? : number | null ) : shaka.extern.VideoNalu [] ;
|
|
3572
3572
|
static Timescale : number ;
|
|
3573
3573
|
/**
|
|
3574
3574
|
* Check if the passed data corresponds to an MPEG2-TS
|
|
@@ -2234,9 +2234,10 @@ shaka.util.TsParser = class {
|
|
|
2234
2234
|
* Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
|
|
2235
2235
|
* @param {shaka.extern.MPEG_PES} pes
|
|
2236
2236
|
* @param {?shaka.extern.VideoNalu=} lastNalu
|
|
2237
|
+
* @param {?number=} lastState
|
|
2237
2238
|
* @return {!Array.<shaka.extern.VideoNalu>}
|
|
2238
2239
|
*/
|
|
2239
|
-
parseNalus(pes, lastNalu) {}
|
|
2240
|
+
parseNalus(pes, lastNalu, lastState) {}
|
|
2240
2241
|
/**
|
|
2241
2242
|
* Return the ID3 metadata
|
|
2242
2243
|
* @return {!Array.<shaka.extern.ID3Metadata>}
|
|
@@ -472,7 +472,7 @@ break;case 4:b=c.enterCatchBlock(),goog.asserts.assert(b instanceof Error,"Wrong
|
|
|
472
472
|
shaka.media.DrmEngine.prototype.onEncryptedEvent_=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress)return c.yield(b.attachMediaKeys_(),2);b.newInitData(a.initDataType,shaka.util.BufferUtils.toUint8(a.initData));c.jumpToEnd()})};
|
|
473
473
|
shaka.media.DrmEngine.prototype.attach=function(a){var b=this;return $jscomp.asyncExecutePromiseGeneratorProgram(function(c){if(1==c.nextAddress){if(!b.mediaKeys_)return b.eventManager_.listenOnce(a,"encrypted",function(d){b.onError_(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.ENCRYPTED_CONTENT_WITHOUT_DRM_INFO))}),c.return();b.video_=a;b.eventManager_.listenOnce(b.video_,"play",function(){return b.onPlay_()});"webkitCurrentPlaybackTargetIsWireless"in
|
|
474
474
|
b.video_&&b.eventManager_.listen(b.video_,"webkitcurrentplaybacktargetiswirelesschanged",function(){return b.closeOpenSessions_()});b.manifestInitData_=b.currentDrmInfo_?b.currentDrmInfo_.initData.find(function(d){return 0<d.initData.length})||null:null;return b.manifestInitData_||"com.apple.fps"!==b.currentDrmInfo_.keySystem||b.storedPersistentSessions_.size?c.yield(b.attachMediaKeys_(),2):c.jumpTo(2)}b.createOrLoad().catch(function(){});b.manifestInitData_||b.storedPersistentSessions_.size||b.config_.parseInbandPsshEnabled||
|
|
475
|
-
b.eventManager_.listen(b.video_,"encrypted",function(d){return b.onEncryptedEvent_(d)});c.jumpToEnd()})};
|
|
475
|
+
b.eventManager_.listen(b.video_,"encrypted",function(d){return b.onEncryptedEvent_(d)});c.jumpToEnd()})};shaka.media.DrmEngine.prototype.hasManifestInitData=function(){return!!this.manifestInitData_};
|
|
476
476
|
shaka.media.DrmEngine.prototype.setServerCertificate=function(){var a=this,b,c,d,e,f,g;return $jscomp.asyncExecutePromiseGeneratorProgram(function(h){switch(h.nextAddress){case 1:goog.asserts.assert(a.initialized_,"Must call init() before setServerCertificate");if(!a.mediaKeys_||!a.currentDrmInfo_)return h.return();if(!a.currentDrmInfo_.serverCertificateUri||a.currentDrmInfo_.serverCertificate&&a.currentDrmInfo_.serverCertificate.length){h.jumpTo(2);break}b=shaka.net.NetworkingEngine.makeRequest([a.currentDrmInfo_.serverCertificateUri],
|
|
477
477
|
a.config_.retryParameters);h.setCatchFinallyBlocks(3);c=a.playerInterface_.netEngine.request(shaka.net.NetworkingEngine.RequestType.SERVER_CERTIFICATE,b);return h.yield(c.promise,5);case 5:d=h.yieldResult;a.currentDrmInfo_.serverCertificate=shaka.util.BufferUtils.toUint8(d.data);h.leaveTryBlock(4);break;case 3:throw e=h.enterCatchBlock(),goog.asserts.assert(e instanceof shaka.util.Error,"Wrong NetworkingEngine error type!"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,
|
|
478
478
|
shaka.util.Error.Code.SERVER_CERTIFICATE_REQUEST_FAILED,e);case 4:if(a.destroyer_.destroyed())return h.return();case 2:if(!a.currentDrmInfo_.serverCertificate||!a.currentDrmInfo_.serverCertificate.length)return h.return();h.setCatchFinallyBlocks(6);return h.yield(a.mediaKeys_.setServerCertificate(a.currentDrmInfo_.serverCertificate),8);case 8:(f=h.yieldResult)||shaka.log.warning("Server certificates are not supported by the key system. The server certificate has been ignored.");h.leaveTryBlock(0);
|
|
@@ -635,14 +635,14 @@ shaka.util.TsParser.prototype.parsePMT_=function(a,b){var c={audio:-1,video:-1,i
|
|
|
635
635
|
c.id3&&(c.id3=e);break;case 27:-1==c.video&&(c.video=e,c.videoCodec="avc");break;case 3:case 4:-1==c.audio&&(c.audio=e,c.audioCodec="mp3");break;case 36:-1==c.video&&(c.video=e,c.videoCodec="hvc");break;case 129:-1==c.audio&&(c.audio=e,c.audioCodec="ac3");break;case 132:case 135:-1==c.audio&&(c.audio=e,c.audioCodec="ec3")}b+=f+5}return c};
|
|
636
636
|
shaka.util.TsParser.prototype.parsePES_=function(a){if(1!==(a[0]<<16|a[1]<<8|a[2]))return null;var b={data:new Uint8Array(0),packetLength:a[4]<<8|a[5],pts:null,dts:null,nalus:[]};if(b.packetLength&&b.packetLength>a.byteLength-6)return null;var c=a[7];c&192&&(b.pts=536870912*(a[9]&14)+4194304*(a[10]&255)+16384*(a[11]&254)+128*(a[12]&255)+(a[13]&254)/2,b.dts=b.pts,c&64&&(b.dts=536870912*(a[14]&14)+4194304*(a[15]&255)+16384*(a[16]&254)+128*(a[17]&255)+(a[18]&254)/2));c=a[8]+9;if(a.byteLength<=c)return null;
|
|
637
637
|
b.data=a.subarray(c);return b};shaka.util.TsParser.prototype.parseAvcNalus=function(a,b){shaka.Deprecate.deprecateFeature(5,"TsParser","Please use parseNalus function instead.");return this.parseNalus(a)};
|
|
638
|
-
shaka.util.TsParser.prototype.parseNalus=function(a,b){var
|
|
639
|
-
time:
|
|
640
|
-
shaka.util.Uint8ArrayUtils.concat(b.fullData,a));return
|
|
638
|
+
shaka.util.TsParser.prototype.parseNalus=function(a,b,c){var d=shaka.util.TsParser.Timescale;d=a.pts?a.pts/d:null;a=a.data;var e=a.byteLength,f=1;"hvc"==this.videoCodec_&&(f=2);for(var g=c||0,h=[],k=-1,l=0,m,n=0;n<e;++n){var p=a[n];if(p){if(2<=g&&1==p){b&&!h.length&&-1==k&&(p=n-(3<g?3:g),c&&0!=p&&(p=a.subarray(0,p),b.data=shaka.util.Uint8ArrayUtils.concat(b.data,p),b.fullData=shaka.util.Uint8ArrayUtils.concat(b.fullData,p)));0<=k?(g=n-((3<g?3:g)+1),k={data:a.subarray(k+f,g+1),fullData:a.subarray(k,
|
|
639
|
+
g+1),type:l,time:d},h.push(k)):b&&!h.length&&(k=n-g,0<k&&(k=a.subarray(0,k),b.data=shaka.util.Uint8ArrayUtils.concat(b.data,k),b.fullData=shaka.util.Uint8ArrayUtils.concat(b.fullData,k)));if(n>=e-f)return shaka.log.warning("Malformed TS, incomplete NALU, ignoring."),h;n++;k=n;l="hvc"==this.videoCodec_?a[n]>>1&63:a[n]&31}g=0}else g++;n>=e-1&&0<=k&&0<=g&&(m={data:a.subarray(k+f,e),fullData:a.subarray(k,e),type:l,time:d})}m&&h.push(m);!h.length&&b&&(b.data=shaka.util.Uint8ArrayUtils.concat(b.data,a),
|
|
640
|
+
b.fullData=shaka.util.Uint8ArrayUtils.concat(b.fullData,a));return h};shaka.util.TsParser.prototype.getMetadata=function(){for(var a=shaka.util.TsParser.Timescale,b=[],c=$jscomp.makeIterator(this.id3Data_),d=c.next();!d.done;d=c.next())d=shaka.util.Uint8ArrayUtils.concat.apply(shaka.util.Uint8ArrayUtils,$jscomp.arrayFromIterable(d.value)),(d=this.parsePES_(d))&&b.push({cueTime:d.pts?d.pts/a:null,data:d.data,frames:shaka.util.Id3Utils.getID3Frames(d.data),dts:d.dts,pts:d.pts});return b};
|
|
641
641
|
shaka.util.TsParser.prototype.getAudioData=function(){if(this.audioData_.length&&!this.audioPes_.length){for(var a=!1,b=$jscomp.makeIterator(this.audioData_),c=b.next();!c.done;c=b.next()){var d=shaka.util.Uint8ArrayUtils.concat.apply(shaka.util.Uint8ArrayUtils,$jscomp.arrayFromIterable(c.value)),e=this.parsePES_(d);c=this.audioPes_.length?this.audioPes_[this.audioPes_.length-1]:null;e&&null!=e.pts&&null!=e.dts&&(!c||c.pts!=e.pts&&c.dts!=e.dts)?(this.audioPes_.length&&e.dts<(c.dts||0)&&(a=!0),this.audioPes_.push(e)):
|
|
642
642
|
this.audioPes_.length&&(d=e?e.data:d)&&(c=this.audioPes_.pop(),c.data=shaka.util.Uint8ArrayUtils.concat(c.data,d),this.audioPes_.push(c))}a&&(this.audioPes_=this.audioPes_.sort(function(f,g){var h=(f.pts||0)-(g.pts||0);return(f.dts||0)-(g.dts||0)||h}))}return this.audioPes_};
|
|
643
643
|
shaka.util.TsParser.prototype.getVideoData=function(a){a=void 0===a?!0:a;if(this.videoData_.length&&!this.videoPes_.length){for(var b=!1,c=$jscomp.makeIterator(this.videoData_),d=c.next();!d.done;d=c.next()){var e=shaka.util.Uint8ArrayUtils.concat.apply(shaka.util.Uint8ArrayUtils,$jscomp.arrayFromIterable(d.value)),f=this.parsePES_(e);d=this.videoPes_.length?this.videoPes_[this.videoPes_.length-1]:null;f&&null!=f.pts&&null!=f.dts&&(!d||d.pts!=f.pts&&d.dts!=f.dts)?(this.videoPes_.length&&f.dts<(d.dts||
|
|
644
|
-
0)&&(b=!0),this.videoPes_.push(f)):this.videoPes_.length&&(e=f?f.data:e)&&(d=this.videoPes_.pop(),d.data=shaka.util.Uint8ArrayUtils.concat(d.data,e),this.videoPes_.push(d))}if(a){var g;c=$jscomp.makeIterator(this.videoPes_);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.parseNalus(d,g),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.videoPes_=this.videoPes_.filter(function(h){return h.nalus.length})}b&&(this.videoPes_=this.videoPes_.sort(function(h,k){var l=(h.pts||0)-(k.pts||
|
|
645
|
-
0)-(k.dts||0)||l}))}return a?this.videoPes_:(a=this.videoPes_,this.videoPes_=[],a)};shaka.util.TsParser.prototype.getStartTime=function(a){var b=shaka.util.TsParser.Timescale;if("audio"==a){a=null;var c=this.getAudioData();c.length&&(a=c[0],a=Math.min(a.dts,a.pts)/b);return a}return"video"==a?(a=null,c=this.getVideoData(!1),c.length&&(a=c[0],a=Math.min(a.dts,a.pts)/b),a):null};shaka.util.TsParser.prototype.getCodecs=function(){return{audio:this.audioCodec_,video:this.videoCodec_}};
|
|
644
|
+
0)&&(b=!0),this.videoPes_.push(f)):this.videoPes_.length&&(e=f?f.data:e)&&(d=this.videoPes_.pop(),d.data=shaka.util.Uint8ArrayUtils.concat(d.data,e),this.videoPes_.push(d))}if(a){var g;c=$jscomp.makeIterator(this.videoPes_);for(d=c.next();!d.done;d=c.next())d=d.value,d.nalus=this.parseNalus(d,g,void 0),d.nalus.length&&(g=d.nalus[d.nalus.length-1]);this.videoPes_=this.videoPes_.filter(function(h){return h.nalus.length})}b&&(this.videoPes_=this.videoPes_.sort(function(h,k){var l=(h.pts||0)-(k.pts||
|
|
645
|
+
0);return(h.dts||0)-(k.dts||0)||l}))}return a?this.videoPes_:(a=this.videoPes_,this.videoPes_=[],a)};shaka.util.TsParser.prototype.getStartTime=function(a){var b=shaka.util.TsParser.Timescale;if("audio"==a){a=null;var c=this.getAudioData();c.length&&(a=c[0],a=Math.min(a.dts,a.pts)/b);return a}return"video"==a?(a=null,c=this.getVideoData(!1),c.length&&(a=c[0],a=Math.min(a.dts,a.pts)/b),a):null};shaka.util.TsParser.prototype.getCodecs=function(){return{audio:this.audioCodec_,video:this.videoCodec_}};
|
|
646
646
|
shaka.util.TsParser.prototype.getVideoNalus=function(){for(var a=[],b=$jscomp.makeIterator(this.getVideoData()),c=b.next();!c.done;c=b.next())a.push.apply(a,$jscomp.arrayFromIterable(c.value.nalus));return a};shaka.util.TsParser.prototype.getVideoResolution=function(){shaka.Deprecate.deprecateFeature(5,"TsParser","Please use getVideoInfo function instead.");var a=this.getVideoInfo();return{height:a.height,width:a.width}};
|
|
647
647
|
shaka.util.TsParser.prototype.getVideoInfo=function(){return"hvc"==this.videoCodec_?this.getHvcInfo_():this.getAvcInfo_()};
|
|
648
648
|
shaka.util.TsParser.prototype.getAvcInfo_=function(){var a=shaka.util.TsParser,b={height:null,width:null,codec:null},c=this.getVideoNalus();if(!c.length)return b;c=c.find(function(q){return q.type==a.H264_NALU_TYPE_SPS_});if(!c)return b;c=new shaka.util.ExpGolomb(c.data);var d=c.readUnsignedByte(),e=c.readUnsignedByte(),f=c.readUnsignedByte();c.skipExpGolomb();if(a.PROFILES_WITH_OPTIONAL_SPS_DATA_.includes(d)){var g=c.readUnsignedExpGolomb();3===g&&c.skipBits(1);c.skipExpGolomb();c.skipExpGolomb();
|
|
@@ -1182,11 +1182,11 @@ a.getVideoPlaybackQuality&&(b=a.getVideoPlaybackQuality(),this.stats_.setDropped
|
|
|
1182
1182
|
1,e=d*b.bandwidth;c&&c.bandwidth&&(e+=d*c.bandwidth);this.stats_.setCurrentStreamBandwidth(e)}b&&b.video&&this.stats_.setResolution(b.video.width||NaN,b.video.height||NaN);this.isLive()&&(b=this.getPresentationStartTimeAsDate().valueOf()+1E3*a.currentTime,b=(Date.now()-b)/1E3,this.stats_.setLiveLatency(b));this.manifest_&&this.manifest_.presentationTimeline&&(b=this.manifest_.presentationTimeline.getMaxSegmentDuration(),this.stats_.setMaxSegmentDuration(b));b=this.abrManager_.getBandwidthEstimate();
|
|
1183
1183
|
this.stats_.setBandwidthEstimate(b)}this.loadMode_==shaka.Player.LoadMode.SRC_EQUALS&&this.stats_.setResolution(a.videoWidth||NaN,a.videoHeight||NaN);return this.stats_.getBlob()};
|
|
1184
1184
|
shaka.Player.prototype.addTextTrackAsync=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h=this,k,l,m,n,p,q,r,u,w,t,v,x,y;return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){switch(z.nextAddress){case 1:if(h.loadMode_!=shaka.Player.LoadMode.MEDIA_SOURCE&&h.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS)throw shaka.log.error("Must call load() and wait for it to resolve before adding text tracks."),new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.CONTENT_NOT_LOADED);
|
|
1185
|
-
if(d){z.jumpTo(2);break}return z.yield(h.getTextMimetype_(a),3);case 3:d=z.yieldResult;case 2:k=[];h.adManager_&&(k=h.adManager_.getCuePoints());if(h.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS){z.jumpTo(4);break}g&&(c="forced");return z.yield(h.addSrcTrackElement_(a,b,c,d,f||"",k),5);case 5:l=shaka.util.LanguageUtils;m=l.normalize(b);n=h.getTextTracks();if(p=
|
|
1186
|
-
throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS);case 4:q=shaka.util.ManifestParserUtils.ContentType;r=h.video_.duration;h.manifest_&&(r=h.manifest_.presentationTimeline.getDuration());if(Infinity==r)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,
|
|
1187
|
-
"Need networking engine.");return z.yield(h.getTextData_(a,h.networkingEngine_,h.config_.streaming.retryParameters),7);case 7:u=z.yieldResult,w=h.convertToWebVTT_(u,d,k),t=new Blob([w],{type:"text/vtt"}),a=shaka.media.MediaSourceEngine.createObjectURL(t),d="text/vtt";case 6:v={id:h.nextExternalStreamId_++,originalId:null,groupId:null,
|
|
1188
|
-
drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.TEXT,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};x=shaka.util.MimeUtils.getFullType(v.mimeType,
|
|
1189
|
-
d);h.manifest_.textStreams.push(v);h.onTracksChanged_();return z.return(shaka.util.StreamUtils.textStreamToTrack(v))}})};
|
|
1185
|
+
"subtitles"!=c&&"captions"!=c&&shaka.log.alwaysWarn("Using a kind value different of `subtitles` or `captions` can cause unwanted issues.");if(d){z.jumpTo(2);break}return z.yield(h.getTextMimetype_(a),3);case 3:d=z.yieldResult;case 2:k=[];h.adManager_&&(k=h.adManager_.getCuePoints());if(h.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS){z.jumpTo(4);break}g&&(c="forced");return z.yield(h.addSrcTrackElement_(a,b,c,d,f||"",k),5);case 5:l=shaka.util.LanguageUtils;m=l.normalize(b);n=h.getTextTracks();if(p=
|
|
1186
|
+
n.find(function(A){return l.normalize(A.language)==m&&A.label==(f||"")&&A.kind==c}))return h.onTracksChanged_(),z.return(p);shaka.log.error("Cannot add this text when loaded with src=");throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS);case 4:q=shaka.util.ManifestParserUtils.ContentType;r=h.video_.duration;h.manifest_&&(r=h.manifest_.presentationTimeline.getDuration());if(Infinity==r)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,
|
|
1187
|
+
shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM);if(!k.length){z.jumpTo(6);break}goog.asserts.assert(h.networkingEngine_,"Need networking engine.");return z.yield(h.getTextData_(a,h.networkingEngine_,h.config_.streaming.retryParameters),7);case 7:u=z.yieldResult,w=h.convertToWebVTT_(u,d,k),t=new Blob([w],{type:"text/vtt"}),a=shaka.media.MediaSourceEngine.createObjectURL(t),d="text/vtt";case 6:v={id:h.nextExternalStreamId_++,originalId:null,groupId:null,
|
|
1188
|
+
createSegmentIndex:function(){return Promise.resolve()},segmentIndex:shaka.media.SegmentIndex.forSingleSegment(0,r,[a]),mimeType:d||"",codecs:e||"",kind:c,encrypted:!1,drmInfos:[],keyIds:new Set,language:b,originalLanguage:b,label:f||null,type:q.TEXT,primary:!1,trickModeVideo:null,emsgSchemeIdUris:null,roles:[],forced:!!g,channelsCount:null,audioSamplingRate:null,spatialAudio:!1,closedCaptions:null,accessibilityPurpose:null,external:!0,fastSwitching:!1};x=shaka.util.MimeUtils.getFullType(v.mimeType,
|
|
1189
|
+
v.codecs);y=shaka.text.TextEngine.isTypeSupported(x);if(!y)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.MISSING_TEXT_PLUGIN,d);h.manifest_.textStreams.push(v);h.onTracksChanged_();return z.return(shaka.util.StreamUtils.textStreamToTrack(v))}})};
|
|
1190
1190
|
shaka.Player.prototype.addThumbnailsTrack=function(a,b){var c=this,d,e,f,g,h,k,l,m,n,p,q,r,u,w,t,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(x){switch(x.nextAddress){case 1:if(c.loadMode_!=shaka.Player.LoadMode.MEDIA_SOURCE&&c.loadMode_!=shaka.Player.LoadMode.SRC_EQUALS)throw shaka.log.error("Must call load() and wait for it to resolve before adding image tracks."),new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.PLAYER,shaka.util.Error.Code.CONTENT_NOT_LOADED);
|
|
1191
1191
|
if(b){x.jumpTo(2);break}return x.yield(c.getTextMimetype_(a),3);case 3:b=x.yieldResult;case 2:if("text/vtt"!=b)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.UNSUPPORTED_EXTERNAL_THUMBNAILS_URI,a);d=shaka.util.ManifestParserUtils.ContentType;e=c.video_.duration;c.manifest_&&(e=c.manifest_.presentationTimeline.getDuration());if(Infinity==e)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.MANIFEST,
|
|
1192
1192
|
shaka.util.Error.Code.CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM);goog.asserts.assert(c.networkingEngine_,"Need networking engine.");return x.yield(c.getTextData_(a,c.networkingEngine_,c.config_.streaming.retryParameters),4);case 4:f=x.yieldResult;g=shaka.text.TextEngine.findParser(b);if(!g)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.MISSING_TEXT_PLUGIN,b);h=g();k={periodStart:0,segmentStart:0,segmentEnd:e,vttOffset:0};l=shaka.util.BufferUtils.toUint8(f);
|
|
@@ -1247,9 +1247,10 @@ shaka.Player.prototype.onMediaQualityChange_=function(a,b){a={bandwidth:a.bandwi
|
|
|
1247
1247
|
shaka.Player.prototype.videoErrorToShakaError_=function(){goog.asserts.assert(this.video_.error,"Video error expected, but missing!");if(!this.video_.error)return null;var a=this.video_.error.code;if(1==a)return null;var b=this.video_.error.msExtendedCode;b&&(0>b&&(b+=Math.pow(2,32)),b=b.toString(16));return new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MEDIA,shaka.util.Error.Code.VIDEO_ERROR,a,b,this.video_.error.message)};
|
|
1248
1248
|
shaka.Player.prototype.onVideoError_=function(a){if(a=this.videoErrorToShakaError_())this.onError_(a)};
|
|
1249
1249
|
shaka.Player.prototype.onKeyStatus_=function(a){if(this.streamingEngine_){var b=this.makeEvent_(shaka.util.FakeEvent.EventName.KeyStatusChanged);this.dispatchEvent(b);var c=Object.keys(a);0==c.length&&shaka.log.warning("Got a key status event without any key statuses, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks.");(b=1==c.length&&"00"==c[0])&&shaka.log.warning("Got a synthetic key status event, so we don't know the real key statuses. If we don't have all the keys, you'll need to set restrictions so we don't select those tracks.");
|
|
1250
|
-
var d=shaka.Player.restrictedStatuses_,e=!1;if(c.length){c=$jscomp.makeIterator(this.manifest_.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=shaka.util.StreamUtils.getVariantStreams(f);g=$jscomp.makeIterator(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=$jscomp.makeIterator(k.keyIds);for(var l=k.next();!l.done;l=k.next())l=l.value,
|
|
1251
|
-
f.allowedByKeySystem&&(e=!0)}}}if(e&&(this.onTracksChanged_(),!this.updateAbrManagerVariants_()))return;(a=this.streamingEngine_.getCurrentVariant())&&!a.allowedByKeySystem&&(shaka.log.debug("Choosing new streams after key status changed"),this.chooseVariantAndSwitch_())}};
|
|
1252
|
-
shaka.Player.prototype.
|
|
1250
|
+
var d=shaka.Player.restrictedStatuses_,e=!1;goog.asserts.assert(this.drmEngine_,"drmEngine should be non-null here.");if(c.length){c=$jscomp.makeIterator(this.manifest_.variants);for(var f=c.next();!f.done;f=c.next()){f=f.value;var g=shaka.util.StreamUtils.getVariantStreams(f);g=$jscomp.makeIterator(g);for(var h=g.next();!h.done;h=g.next()){var k=h.value;h=f.allowedByKeySystem;if(k.keyIds.size){f.allowedByKeySystem=!0;k=$jscomp.makeIterator(k.keyIds);for(var l=k.next();!l.done;l=k.next())if(l=l.value,
|
|
1251
|
+
(l=a[b?"00":l])||this.drmEngine_.hasManifestInitData())f.allowedByKeySystem=f.allowedByKeySystem&&!!l&&!d.includes(l)}h!=f.allowedByKeySystem&&(e=!0)}}}if(e&&(this.onTracksChanged_(),!this.updateAbrManagerVariants_()))return;(a=this.streamingEngine_.getCurrentVariant())&&!a.allowedByKeySystem&&(shaka.log.debug("Choosing new streams after key status changed"),this.chooseVariantAndSwitch_())}};
|
|
1252
|
+
shaka.Player.prototype.onExpirationUpdated_=function(a,b){if(this.parser_&&this.parser_.onExpirationUpdated)this.parser_.onExpirationUpdated(a,b);a=this.makeEvent_(shaka.util.FakeEvent.EventName.ExpirationUpdated);this.dispatchEvent(a)};shaka.Player.prototype.shouldStreamText_=function(){return this.config_.streaming.alwaysStreamText||this.isTextTrackVisible()};
|
|
1253
|
+
shaka.Player.applyPlayRange_=function(a,b,c){0<b&&(a.isLive()?shaka.log.warning("|playRangeStart| has been configured for live content. Ignoring the setting."):a.setUserSeekStart(b));b=a.getDuration();c<b&&(a.isLive()?shaka.log.warning("|playRangeEnd| has been configured for live content. Ignoring the setting."):a.setDuration(c))};
|
|
1253
1254
|
shaka.Player.prototype.checkRestrictedVariants_=function(a){var b=shaka.Player.restrictedStatuses_,c=this.drmEngine_?this.drmEngine_.getKeyStatuses():{},d=Object.keys(c);d=d.length&&"00"==d[0];var e=!1,f=!1,g=new Set,h=new Set;a=$jscomp.makeIterator(a.variants);for(var k=a.next();!k.done;k=a.next()){k=k.value;var l=[];k.audio&&l.push(k.audio);k.video&&l.push(k.video);l=$jscomp.makeIterator(l);for(var m=l.next();!m.done;m=l.next())if(m=m.value,m.keyIds.size){m=$jscomp.makeIterator(m.keyIds);for(var n=
|
|
1254
1255
|
m.next();!n.done;n=m.next()){n=n.value;var p=c[d?"00":n];p?b.includes(p)&&h.add(p):g.add(n)}}k.allowedByApplication?k.allowedByKeySystem&&(e=!0):f=!0}if(!e)throw b={hasAppRestrictions:f,missingKeys:Array.from(g),restrictedKeyStatuses:Array.from(h)},new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.RESTRICTIONS_CANNOT_BE_MET,b);};
|
|
1255
1256
|
shaka.Player.prototype.checkPlayableVariants_=function(a){if(!a.variants.some(shaka.util.StreamUtils.isPlayable))throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.CONTENT_UNSUPPORTED_BY_BROWSER);};
|
|
@@ -1271,7 +1272,7 @@ goog.exportProperty(shaka.Player.prototype,"isInProgress",shaka.Player.prototype
|
|
|
1271
1272
|
goog.exportProperty(shaka.Player.prototype,"getMediaElement",shaka.Player.prototype.getMediaElement);goog.exportProperty(shaka.Player.prototype,"getManifestType",shaka.Player.prototype.getManifestType);goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.getLoadMode);goog.exportProperty(shaka.Player.prototype,"resetConfiguration",shaka.Player.prototype.resetConfiguration);goog.exportProperty(shaka.Player.prototype,"getBufferFullness",shaka.Player.prototype.getBufferFullness);
|
|
1272
1273
|
goog.exportProperty(shaka.Player.prototype,"getConfiguration",shaka.Player.prototype.getConfiguration);goog.exportProperty(shaka.Player.prototype,"configure",shaka.Player.prototype.configure);goog.exportProperty(shaka.Player.prototype,"releaseAllMutexes",shaka.Player.prototype.releaseAllMutexes);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);
|
|
1273
1274
|
goog.exportProperty(shaka.Player.prototype,"unload",shaka.Player.prototype.unload);goog.exportProperty(shaka.Player.prototype,"detach",shaka.Player.prototype.detach);goog.exportProperty(shaka.Player.prototype,"attachCanvas",shaka.Player.prototype.attachCanvas);goog.exportProperty(shaka.Player.prototype,"attach",shaka.Player.prototype.attach);goog.exportProperty(shaka.Player,"probeSupport",shaka.Player.probeSupport);goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);
|
|
1274
|
-
goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);goog.exportProperty(shaka.Player.prototype,"destroy",shaka.Player.prototype.destroy);shaka.Player.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3};goog.exportProperty(shaka.Player,"LoadMode",shaka.Player.LoadMode);shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.6.
|
|
1275
|
+
goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);goog.exportProperty(shaka.Player.prototype,"destroy",shaka.Player.prototype.destroy);shaka.Player.LoadMode={DESTROYED:0,NOT_LOADED:1,MEDIA_SOURCE:2,SRC_EQUALS:3};goog.exportProperty(shaka.Player,"LoadMode",shaka.Player.LoadMode);shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.6.11-debug";
|
|
1275
1276
|
goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.restrictedStatuses_=["output-restricted","internal-error"];shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;shaka.Player.TextTrackLabel="Shaka Player TextTrack";shaka.ads={};shaka.ads.AdsStats=function(){this.loadTimes_=[];this.skipped_=this.playedCompletely_=this.started_=0};shaka.ads.AdsStats.prototype.addLoadTime=function(a){this.loadTimes_.push(a)};shaka.ads.AdsStats.prototype.incrementStarted=function(){this.started_++};shaka.ads.AdsStats.prototype.incrementPlayedCompletely=function(){this.playedCompletely_++};shaka.ads.AdsStats.prototype.incrementSkipped=function(){this.skipped_++};
|
|
1276
1277
|
shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_}};shaka.ads.ClientSideAd=function(a,b,c){var d=this;this.ad_=a;this.manager_=b;this.video_=c;this.isPaused_=!1;this.volume_=this.manager_.getVolume();this.eventManager_=new shaka.util.EventManager;this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.PAUSED,function(){d.isPaused_=!0});this.eventManager_.listen(this.manager_,google.ima.AdEvent.Type.RESUMED,function(){d.isPaused_=!1})};shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};
|
|
1277
1278
|
shaka.ads.ClientSideAd.prototype.getMinSuggestedDuration=function(){return this.ad_.getMinSuggestedDuration()};shaka.ads.ClientSideAd.prototype.getRemainingTime=function(){return this.manager_.getRemainingTime()};shaka.ads.ClientSideAd.prototype.isPaused=function(){return this.isPaused_};shaka.ads.ClientSideAd.prototype.isSkippable=function(){return 0<=this.ad_.getSkipTimeOffset()};
|
|
@@ -2209,8 +2210,8 @@ shaka.offline.Storage.prototype.store=function(a,b,c){var d=this;goog.asserts.as
|
|
|
2209
2210
|
h.yield(shaka.net.NetworkingUtils.getMimeType(a,d.networkingEngine_,e.manifest.retryParameters),3);2!=h.nextAddress&&(c=h.yieldResult);g=shaka.media.ManifestParser.getFactory(a,c||null);return h.return(g())})},e,f);b=new shaka.util.AbortableOperation(b,function(){return f.abortAll()});b.finally(function(){shaka.util.ArrayUtils.remove(d.openDownloadManagers_,f)});return this.startAbortableOperation_(b)};
|
|
2210
2211
|
shaka.offline.Storage.prototype.store_=function(a,b,c,d,e){var f=this,g,h,k,l,m,n,p,q,r,u,w,t,v,x;return $jscomp.asyncExecutePromiseGeneratorProgram(function(y){switch(y.nextAddress){case 1:return f.requireSupport_(),h=g=null,k=new shaka.offline.StorageMuxer,n=m=l=null,y.setCatchFinallyBlocks(2,3),y.yield(c(),5);case 5:return g=y.yieldResult,y.yield(f.parseManifest(a,g,d),6);case 6:p=y.yieldResult;f.ensureNotDestroyed_();q=!p.presentationTimeline.isLive()&&!p.presentationTimeline.isInProgress();if(!q)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
|
|
2211
2212
|
shaka.util.Error.Category.STORAGE,shaka.util.Error.Code.CANNOT_STORE_LIVE_OFFLINE,a);return y.yield(f.createDrmEngine(p,function(z){n=n||z},d),7);case 7:h=y.yieldResult;f.ensureNotDestroyed_();if(n)throw n;return y.yield(f.filterManifest_(p,h,d),8);case 8:return y.yield(k.init(),9);case 9:return f.ensureNotDestroyed_(),y.yield(k.getActive(),10);case 10:return l=y.yieldResult,f.ensureNotDestroyed_(),goog.asserts.assert(h,"drmEngine should be non-null here."),r=f.makeManifestDB_(h,p,a,b,d,e),u=r.manifestDB,
|
|
2212
|
-
w=r.toDownload,y.yield(l.cell.addManifests([u]),11);case 11:t=y.yieldResult;f.ensureNotDestroyed_();m=t[0];goog.asserts.assert(h,"drmEngine should be non-null here.");f.ensureNotDestroyed_();if(n)throw n;return y.yield(f.downloadSegments_(w,m,u,e,d,l.cell,p,h),12);case 12:return f.ensureNotDestroyed_(),v=shaka.offline.OfflineUri.manifest(l.path.mechanism,l.path.cell,m),y.return(shaka.offline.StoredContentUtils.fromManifestDB(v,
|
|
2213
|
-
break}return y.yield(g.stop(),
|
|
2213
|
+
w=r.toDownload,y.yield(l.cell.addManifests([u]),11);case 11:t=y.yieldResult;f.ensureNotDestroyed_();m=t[0];goog.asserts.assert(h,"drmEngine should be non-null here.");f.ensureNotDestroyed_();if(n)throw n;return y.yield(f.downloadSegments_(w,m,u,e,d,l.cell,p,h),12);case 12:return f.ensureNotDestroyed_(),f.setManifestDrmFields_(p,u,h,d),y.yield(l.cell.updateManifest(m,u),13);case 13:return f.ensureNotDestroyed_(),v=shaka.offline.OfflineUri.manifest(l.path.mechanism,l.path.cell,m),y.return(shaka.offline.StoredContentUtils.fromManifestDB(v,
|
|
2214
|
+
u));case 3:return y.enterFinallyBlock(),y.yield(k.destroy(),14);case 14:if(!g){y.jumpTo(15);break}return y.yield(g.stop(),15);case 15:if(!h){y.jumpTo(17);break}return y.yield(h.destroy(),17);case 17:y.leaveFinallyBlock(0);break;case 2:x=y.enterCatchBlock();if(null==m){y.jumpTo(19);break}return y.yield(shaka.offline.Storage.cleanStoredManifest(m),19);case 19:throw n||x;}})};
|
|
2214
2215
|
shaka.offline.Storage.prototype.downloadSegments_=function(a,b,c,d,e,f,g,h){var k=this,l,m,n,p,q,r,u,w,t,v;return $jscomp.asyncExecutePromiseGeneratorProgram(function(x){switch(x.nextAddress){case 1:l={};m=0;n=function(y,z){var A,B,E,I,C,G,D;return $jscomp.asyncExecutePromiseGeneratorProgram(function(F){if(1==F.nextAddress){A={};B=$jscomp.makeIterator(y);for(E=B.next();!E.done;A={$jscomp$loop$prop$download$713$836:A.$jscomp$loop$prop$download$713$836},E=B.next())A.$jscomp$loop$prop$download$713$836=
|
|
2215
2216
|
E.value,I=A.$jscomp$loop$prop$download$713$836.makeSegmentRequest(e),C=A.$jscomp$loop$prop$download$713$836.estimateId,G=A.$jscomp$loop$prop$download$713$836.isInitSegment,D=function(H){return function(J){var K,M,L;return $jscomp.asyncExecutePromiseGeneratorProgram(function(O){if(1==O.nextAddress)return O.yield(f.addSegments([{data:J}]),2);K=O.yieldResult;k.ensureNotDestroyed_();M=H.$jscomp$loop$prop$download$713$836.ref;L=shaka.offline.DownloadInfo.idForSegmentRef(M);l[L]=K[0];m+=J.byteLength;O.jumpToEnd()})}}(A),
|
|
2216
2217
|
d.queue(A.$jscomp$loop$prop$download$713$836.groupId,I,C,G,D);return F.yield(d.waitToFinish(),2)}if(!z)return F.jumpTo(0);k.ensureNotDestroyed_();k.setManifestDrmFields_(g,c,h,e);return F.yield(f.updateManifest(b,c),0)})};p=!1;x.setCatchFinallyBlocks(2);if(!k.getManifestIsEncrypted_(g)||!p||k.getManifestIncludesInitData_(g)){x.jumpTo(4);break}return x.yield(n(a.filter(function(y){return y.isInitSegment}),!0),5);case 5:return k.ensureNotDestroyed_(),a=a.filter(function(y){return!y.isInitSegment}),
|
|
@@ -2273,10 +2274,10 @@ a);document.addEventListener("MSFullscreenError",a)}};shaka.polyfill.Fullscreen.
|
|
|
2273
2274
|
shaka.polyfill.MediaCapabilities.install=function(){var a=!0;if(shaka.util.Platform.isApple()||shaka.util.Platform.isPS5()||shaka.util.Platform.isPS4()||shaka.util.Platform.isWebOS()||shaka.util.Platform.isTizen()||shaka.util.Platform.isChromecast()||shaka.util.Platform.isEOS()||shaka.util.Platform.isHisense())a=!1;a&&navigator.mediaCapabilities?shaka.log.info("MediaCapabilities: Native mediaCapabilities support found."):(shaka.log.info("MediaCapabilities: install"),navigator.mediaCapabilities||(navigator.mediaCapabilities=
|
|
2274
2275
|
{}),shaka.polyfill.MediaCapabilities.originalMcap=navigator.mediaCapabilities,navigator.mediaCapabilities.decodingInfo=shaka.polyfill.MediaCapabilities.decodingInfo_)};
|
|
2275
2276
|
shaka.polyfill.MediaCapabilities.decodingInfo_=function(a){var b,c,d,e,f,g,h,k,l,m,n,p,q,r,u,w,t,v,x,y;return $jscomp.asyncExecutePromiseGeneratorProgram(function(z){switch(z.nextAddress){case 1:b={supported:!1,powerEfficient:!0,smooth:!0,keySystemAccess:null,configuration:a};if(!a)return z.return(b);c=a.video;d=a.audio;e=shaka.media.Capabilities;if("media-source"==a.type){if(!shaka.util.Platform.supportsMediaSource()||c&&(shaka.util.Platform.isChromecast()?f=shaka.polyfill.MediaCapabilities.canCastDisplayType_(c):
|
|
2276
|
-
shaka.util.Platform.isTizen()?(g=c.contentType,c.width&&c.height&&(g+="; width="+c.width,g+="; height="+c.height),c.framerate&&(g+="; framerate="+c.framerate),c.bitrate&&(g+="; bitrate="+c.bitrate),f=e.isTypeSupported(g)):f=e.isTypeSupported(c.contentType),!f)||d&&(
|
|
2277
|
-
if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));q=a.keySystemConfiguration;r=[];u=[];q.audio&&(w={robustness:q.audio.robustness||"",contentType:a.audio.contentType},r.push(w));q.video&&(t={robustness:q.video.robustness||"",contentType:a.video.contentType},u.push(t));v={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,
|
|
2278
|
-
u);x=shaka.polyfill.MediaCapabilities.generateKeySystemCacheKey_(a.video?a.video.contentType:"",a.audio?a.audio.contentType:"",a.keySystemConfiguration.keySystem);z.setCatchFinallyBlocks(3);if(x in shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_){y=shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_[x];z.jumpTo(5);break}return z.yield(navigator.requestMediaKeySystemAccess(q.keySystem,
|
|
2279
|
-
y;case 5:z.leaveTryBlock(4);break;case 3:z.enterCatchBlock(),shaka.log.info("navigator.requestMediaKeySystemAccess failed.");case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return z.return(b)}})};
|
|
2277
|
+
shaka.util.Platform.isTizen()?(g=c.contentType,c.width&&c.height&&(g+="; width="+c.width,g+="; height="+c.height),c.framerate&&(g+="; framerate="+c.framerate),c.bitrate&&(g+="; bitrate="+c.bitrate),f=e.isTypeSupported(g)):f=e.isTypeSupported(c.contentType),!f)||d&&(shaka.util.Platform.isChromecast()&&d.spatialRendering?(k=d.contentType+"; spatialRendering=true",h=e.isTypeSupported(k)):h=e.isTypeSupported(d.contentType),!h))return z.return(b)}else if("file"==a.type){if(c&&(l=c.contentType,m=shaka.util.Platform.supportsMediaType(l),
|
|
2278
|
+
!m)||d&&(n=d.contentType,p=shaka.util.Platform.supportsMediaType(n),!p))return z.return(b)}else return z.return(b);if(!a.keySystemConfiguration)return b.supported=!0,z.return(Promise.resolve(b));q=a.keySystemConfiguration;r=[];u=[];q.audio&&(w={robustness:q.audio.robustness||"",contentType:a.audio.contentType},r.push(w));q.video&&(t={robustness:q.video.robustness||"",contentType:a.video.contentType},u.push(t));v={initDataTypes:[q.initDataType],distinctiveIdentifier:q.distinctiveIdentifier,persistentState:q.persistentState,
|
|
2279
|
+
sessionTypes:q.sessionTypes};r.length&&(v.audioCapabilities=r);u.length&&(v.videoCapabilities=u);x=shaka.polyfill.MediaCapabilities.generateKeySystemCacheKey_(a.video?a.video.contentType:"",a.audio?a.audio.contentType:"",a.keySystemConfiguration.keySystem);z.setCatchFinallyBlocks(3);if(x in shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_){y=shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_[x];z.jumpTo(5);break}return z.yield(navigator.requestMediaKeySystemAccess(q.keySystem,
|
|
2280
|
+
[v]),6);case 6:y=z.yieldResult,shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_[x]=y;case 5:z.leaveTryBlock(4);break;case 3:z.enterCatchBlock(),shaka.log.info("navigator.requestMediaKeySystemAccess failed.");case 4:y&&(b.supported=!0,b.keySystemAccess=y);case 2:return z.return(b)}})};
|
|
2280
2281
|
shaka.polyfill.MediaCapabilities.canCastDisplayType_=function(a){if(!(window.cast&&cast.__platform__&&cast.__platform__.canDisplayType))return shaka.log.warning("Expected cast APIs to be available! Falling back to shaka.media.Capabilities.isTypeSupported() for type support."),shaka.media.Capabilities.isTypeSupported(a.contentType);var b=a.contentType;a.width&&a.height&&(b+="; width="+a.width+"; height="+a.height);a.framerate&&(b+="; framerate="+a.framerate);"pq"===a.transferFunction&&(b+="; eotf=smpte2084");
|
|
2281
2282
|
return cast.__platform__.canDisplayType(b)};shaka.polyfill.MediaCapabilities.generateKeySystemCacheKey_=function(a,b,c){return a+"#"+b+"#"+c};goog.exportProperty(shaka.polyfill,"MediaCapabilities",shaka.polyfill.MediaCapabilities);goog.exportProperty(shaka.polyfill.MediaCapabilities,"install",shaka.polyfill.MediaCapabilities.install);shaka.polyfill.MediaCapabilities.originalMcap=null;goog.exportProperty(shaka.polyfill.MediaCapabilities,"originalMcap",shaka.polyfill.MediaCapabilities.originalMcap);
|
|
2282
2283
|
shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_={};goog.exportProperty(shaka.polyfill.MediaCapabilities,"memoizedMediaKeySystemAccessRequests_",shaka.polyfill.MediaCapabilities.memoizedMediaKeySystemAccessRequests_);shaka.polyfill.register(shaka.polyfill.MediaCapabilities.install,-1);shaka.polyfill.MediaSource=function(){};
|