shaka-player 4.11.4 → 4.11.5
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/dist/cast-boot.js +7 -0
- package/dist/deps.js +2 -2
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.debug.js +24 -22
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +217 -216
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +31 -29
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +258 -257
- package/dist/shaka-player.ui.map +3 -3
- package/lib/hls/hls_parser.js +18 -4
- package/lib/media/presentation_timeline.js +7 -1
- package/lib/player.js +24 -22
- package/lib/polyfill/encryption_scheme.js +9 -0
- package/lib/util/platform.js +9 -1
- package/package.json +1 -1
- package/ui/resolution_selection.js +4 -1
package/dist/cast-boot.js
CHANGED
|
@@ -33,5 +33,12 @@ if (navigator.userAgent.indexOf('CrKey') != -1) {
|
|
|
33
33
|
console.log('Cast SDK loaded');
|
|
34
34
|
};
|
|
35
35
|
|
|
36
|
+
// Use an anonymous function here, normally banned in favor of arrow
|
|
37
|
+
// functions, for compatibility with the oldest devices and runtimes.
|
|
38
|
+
// eslint-disable-next-line no-restricted-syntax
|
|
39
|
+
script.onerror = function(error) {
|
|
40
|
+
window.dump('Unable to load Cast SDK: ' + error);
|
|
41
|
+
};
|
|
42
|
+
|
|
36
43
|
document.head.appendChild(script);
|
|
37
44
|
}
|
package/dist/deps.js
CHANGED
|
@@ -128,7 +128,7 @@ goog.addDependency('../../../../lib/offline/stream_bandwidth_estimator.js', ['sh
|
|
|
128
128
|
goog.addDependency('../../../../lib/player.js', ['shaka.Player'], ['goog.asserts', 'shaka.Deprecate', 'shaka.config.AutoShowText', 'shaka.lcevc.Dec', 'shaka.log', 'shaka.media.AdaptationSetCriteria', 'shaka.media.BufferingObserver', 'shaka.media.DrmEngine', 'shaka.media.ExampleBasedCriteria', 'shaka.media.ManifestFilterer', 'shaka.media.ManifestParser', 'shaka.media.MediaSourceEngine', 'shaka.media.MediaSourcePlayhead', 'shaka.media.MetaSegmentIndex', 'shaka.media.PlayRateController', 'shaka.media.Playhead', 'shaka.media.PlayheadObserverManager', 'shaka.media.PreferenceBasedCriteria', 'shaka.media.PreloadManager', 'shaka.media.QualityObserver', 'shaka.media.RegionObserver', 'shaka.media.RegionTimeline', 'shaka.media.SegmentIndex', 'shaka.media.SegmentPrefetch', 'shaka.media.SegmentReference', 'shaka.media.SrcEqualsPlayhead', 'shaka.media.StreamingEngine', 'shaka.media.TimeRangesUtils', 'shaka.net.NetworkingEngine', 'shaka.net.NetworkingUtils', 'shaka.text.SimpleTextDisplayer', 'shaka.text.StubTextDisplayer', 'shaka.text.TextEngine', 'shaka.text.UITextDisplayer', 'shaka.text.Utils', 'shaka.text.WebVttGenerator', 'shaka.util.BufferUtils', 'shaka.util.CmcdManager', 'shaka.util.CmsdManager', 'shaka.util.ConfigUtils', 'shaka.util.Dom', 'shaka.util.DrmUtils', 'shaka.util.Error', 'shaka.util.EventManager', 'shaka.util.FakeEvent', 'shaka.util.FakeEventTarget', 'shaka.util.Functional', 'shaka.util.IDestroyable', 'shaka.util.LanguageUtils', 'shaka.util.ManifestParserUtils', 'shaka.util.MediaReadyState', 'shaka.util.MimeUtils', 'shaka.util.Mutex', 'shaka.util.ObjectUtils', 'shaka.util.Platform', 'shaka.util.PlayerConfiguration', 'shaka.util.PublicPromise', 'shaka.util.Stats', 'shaka.util.StreamUtils', 'shaka.util.Timer'], {'lang': 'es8'});
|
|
129
129
|
goog.addDependency('../../../../lib/polyfill/all.js', ['shaka.polyfill'], ['shaka.log'], {'lang': 'es6'});
|
|
130
130
|
goog.addDependency('../../../../lib/polyfill/aria.js', ['shaka.polyfill.Aria'], ['shaka.log', 'shaka.polyfill'], {'lang': 'es6'});
|
|
131
|
-
goog.addDependency('../../../../lib/polyfill/encryption_scheme.js', ['shaka.polyfill.EncryptionScheme'], ['shaka.polyfill'], {'lang': 'es6'});
|
|
131
|
+
goog.addDependency('../../../../lib/polyfill/encryption_scheme.js', ['shaka.polyfill.EncryptionScheme'], ['shaka.polyfill', 'shaka.util.Platform'], {'lang': 'es6'});
|
|
132
132
|
goog.addDependency('../../../../lib/polyfill/fullscreen.js', ['shaka.polyfill.Fullscreen'], ['shaka.polyfill'], {'lang': 'es6'});
|
|
133
133
|
goog.addDependency('../../../../lib/polyfill/media_capabilities.js', ['shaka.polyfill.MediaCapabilities'], ['shaka.log', 'shaka.media.Capabilities', 'shaka.polyfill', 'shaka.util.DrmUtils', 'shaka.util.Platform'], {'lang': 'es8'});
|
|
134
134
|
goog.addDependency('../../../../lib/polyfill/mediasource.js', ['shaka.polyfill.MediaSource'], ['shaka.log', 'shaka.polyfill', 'shaka.util.MimeUtils', 'shaka.util.Platform'], {'lang': 'es6'});
|
|
@@ -264,7 +264,7 @@ goog.addDependency('../../../../ui/presentation_time.js', ['shaka.ui.Presentatio
|
|
|
264
264
|
goog.addDependency('../../../../ui/range_element.js', ['shaka.ui.RangeElement'], ['shaka.ui.Element', 'shaka.util.Dom', 'shaka.util.Timer'], {'lang': 'es6'});
|
|
265
265
|
goog.addDependency('../../../../ui/recenter_vr.js', ['shaka.ui.RecenterVRButton'], ['shaka.ui.Controls', 'shaka.ui.Element', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.OverflowMenu', 'shaka.ui.Utils', 'shaka.util.Dom'], {'lang': 'es6'});
|
|
266
266
|
goog.addDependency('../../../../ui/remote_button.js', ['shaka.ui.RemoteButton'], ['shaka.Player', 'shaka.ui.Controls', 'shaka.ui.Element', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.OverflowMenu', 'shaka.ui.Utils', 'shaka.util.Dom', 'shaka.util.Platform'], {'lang': 'es8'});
|
|
267
|
-
goog.addDependency('../../../../ui/resolution_selection.js', ['shaka.ui.ResolutionSelection'], ['goog.asserts', 'shaka.Player', 'shaka.ui.Controls', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.OverflowMenu', 'shaka.ui.Overlay.TrackLabelFormat', 'shaka.ui.SettingsMenu', 'shaka.ui.Utils', 'shaka.util.Dom', 'shaka.util.FakeEvent'], {'lang': 'es6'});
|
|
267
|
+
goog.addDependency('../../../../ui/resolution_selection.js', ['shaka.ui.ResolutionSelection'], ['goog.asserts', 'shaka.Player', 'shaka.ui.Controls', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.OverflowMenu', 'shaka.ui.Overlay.TrackLabelFormat', 'shaka.ui.SettingsMenu', 'shaka.ui.Utils', 'shaka.util.Dom', 'shaka.util.FakeEvent', 'shaka.util.Functional'], {'lang': 'es6'});
|
|
268
268
|
goog.addDependency('../../../../ui/rewind_button.js', ['shaka.ui.RewindButton'], ['shaka.ui.Controls', 'shaka.ui.Element', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.util.Dom'], {'lang': 'es6'});
|
|
269
269
|
goog.addDependency('../../../../ui/save_video_frame_button.js', ['shaka.ui.SaveVideoFrameButton'], ['shaka.ads.Utils', 'shaka.ui.ContextMenu', 'shaka.ui.Controls', 'shaka.ui.Element', 'shaka.ui.Enums', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.OverflowMenu', 'shaka.ui.Utils', 'shaka.util.Dom'], {'lang': 'es6'});
|
|
270
270
|
goog.addDependency('../../../../ui/seek_bar.js', ['shaka.ui.SeekBar'], ['shaka.ads.Utils', 'shaka.net.NetworkingEngine', 'shaka.ui.Constants', 'shaka.ui.Locales', 'shaka.ui.Localization', 'shaka.ui.RangeElement', 'shaka.ui.Utils', 'shaka.util.Dom', 'shaka.util.Error', 'shaka.util.Mp4Parser', 'shaka.util.Networking', 'shaka.util.Timer'], {'lang': 'es8'});
|
package/dist/locales.js
CHANGED
|
@@ -912,51 +912,51 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
912
912
|
* @const
|
|
913
913
|
*/
|
|
914
914
|
shaka.ui.Locales.Ids = {
|
|
915
|
-
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
916
|
-
AD_PROGRESS: 'AD_PROGRESS',
|
|
917
|
-
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
918
|
-
REWIND: 'REWIND',
|
|
919
|
-
RESOLUTION: 'RESOLUTION',
|
|
920
915
|
AD_TIME: 'AD_TIME',
|
|
921
|
-
|
|
916
|
+
CHAPTERS: 'CHAPTERS',
|
|
922
917
|
LANGUAGE: 'LANGUAGE',
|
|
923
918
|
LOOP: 'LOOP',
|
|
924
|
-
|
|
925
|
-
|
|
919
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
920
|
+
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
921
|
+
REPLAY: 'REPLAY',
|
|
926
922
|
AD_STATISTICS: 'AD_STATISTICS',
|
|
927
|
-
QUALITY: 'QUALITY',
|
|
928
|
-
UNMUTE: 'UNMUTE',
|
|
929
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
930
|
-
OFF: 'OFF',
|
|
931
|
-
STATISTICS: 'STATISTICS',
|
|
932
923
|
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
933
924
|
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
934
|
-
|
|
935
|
-
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
936
|
-
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
925
|
+
MUTE: 'MUTE',
|
|
937
926
|
SURROUND: 'SURROUND',
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
927
|
+
LIVE: 'LIVE',
|
|
928
|
+
PLAY: 'PLAY',
|
|
929
|
+
CAPTIONS: 'CAPTIONS',
|
|
930
|
+
PAUSE: 'PAUSE',
|
|
931
|
+
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
932
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
933
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
934
|
+
BACK: 'BACK',
|
|
935
|
+
RECENTER_VR: 'RECENTER_VR',
|
|
936
|
+
STATISTICS: 'STATISTICS',
|
|
941
937
|
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
938
|
+
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
942
939
|
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
943
|
-
|
|
944
|
-
|
|
940
|
+
REWIND: 'REWIND',
|
|
941
|
+
OFF: 'OFF',
|
|
942
|
+
ON: 'ON',
|
|
943
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
944
|
+
UNMUTE: 'UNMUTE',
|
|
945
|
+
AIRPLAY: 'AIRPLAY',
|
|
946
|
+
CAST: 'CAST',
|
|
945
947
|
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
948
|
+
SKIP_AD: 'SKIP_AD',
|
|
949
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
950
|
+
RESOLUTION: 'RESOLUTION',
|
|
951
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
952
|
+
QUALITY: 'QUALITY',
|
|
953
|
+
SEEK: 'SEEK',
|
|
951
954
|
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
952
|
-
|
|
955
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
956
|
+
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
957
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
958
|
+
AD_DURATION: 'AD_DURATION',
|
|
953
959
|
VOLUME: 'VOLUME',
|
|
954
|
-
REPLAY: 'REPLAY',
|
|
955
|
-
MUTE: 'MUTE',
|
|
956
|
-
PAUSE: 'PAUSE',
|
|
957
|
-
BACK: 'BACK',
|
|
958
960
|
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
959
|
-
|
|
960
|
-
AIRPLAY: 'AIRPLAY',
|
|
961
|
-
ON: 'ON',
|
|
961
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
962
962
|
};
|
|
@@ -191,12 +191,13 @@ shaka.util.Platform.isXboxOne=function(){return shaka.util.Platform.userAgentCon
|
|
|
191
191
|
shaka.util.Platform.isTizen4=function(){return shaka.util.Platform.userAgentContains_("Tizen 4")};shaka.util.Platform.isTizen3=function(){return shaka.util.Platform.userAgentContains_("Tizen 3")};shaka.util.Platform.isTizen2=function(){return shaka.util.Platform.userAgentContains_("Tizen 2")};shaka.util.Platform.isWebOS=function(){return shaka.util.Platform.userAgentContains_("Web0S")};shaka.util.Platform.isWebOS3=function(){return shaka.util.Platform.isWebOS()&&38===shaka.util.Platform.chromeVersion()};
|
|
192
192
|
shaka.util.Platform.isWebOS4=function(){return shaka.util.Platform.isWebOS()&&53===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isWebOS5=function(){return shaka.util.Platform.isWebOS()&&68===shaka.util.Platform.chromeVersion()};shaka.util.Platform.isChromecast=function(){return shaka.util.Platform.userAgentContains_("CrKey")};shaka.util.Platform.isAndroidCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isAndroid()};
|
|
193
193
|
shaka.util.Platform.isFuchsiaCastDevice=function(){var a=shaka.util.Platform;return a.isChromecast()&&a.isFuchsia()};shaka.util.Platform.chromeVersion=function(){if(!shaka.util.Platform.isChrome())return null;var a=navigator.userAgent.match(/Chrome\/(\d+)/);return a?parseInt(a[1],10):null};shaka.util.Platform.isChrome=function(){return shaka.util.Platform.userAgentContains_("Chrome")&&!shaka.util.Platform.isLegacyEdge()};shaka.util.Platform.isFirefox=function(){return shaka.util.Platform.userAgentContains_("Firefox")};
|
|
194
|
-
shaka.util.Platform.isApple=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!shaka.util.Platform.isTizen()&&!shaka.util.Platform.isEOS()&&!shaka.util.Platform.isAPL()&&!shaka.util.Platform.isVirginMedia()&&!shaka.util.Platform.isOrange()&&!shaka.util.Platform.isPS4()&&!shaka.util.Platform.isAmazonFireTV()&&!shaka.util.Platform.isWPE()&&!shaka.util.Platform.isZenterio()};shaka.util.Platform.isPS5=function(){return shaka.util.Platform.userAgentContains_("PlayStation 5")};
|
|
195
|
-
shaka.util.Platform.isPS4=function(){return shaka.util.Platform.userAgentContains_("PlayStation 4")};shaka.util.Platform.isHisense=function(){return shaka.util.Platform.userAgentContains_("Hisense")||shaka.util.Platform.userAgentContains_("VIDAA")};shaka.util.Platform.isVirginMedia=function(){return shaka.util.Platform.userAgentContains_("VirginMedia")};shaka.util.Platform.isOrange=function(){return shaka.util.Platform.userAgentContains_("SOPOpenBrowser")};shaka.util.Platform.
|
|
196
|
-
shaka.util.Platform.
|
|
197
|
-
shaka.util.Platform.
|
|
198
|
-
shaka.util.Platform.
|
|
199
|
-
shaka.util.Platform.
|
|
194
|
+
shaka.util.Platform.isApple=function(){return!!navigator.vendor&&navigator.vendor.includes("Apple")&&!shaka.util.Platform.isTizen()&&!shaka.util.Platform.isEOS()&&!shaka.util.Platform.isAPL()&&!shaka.util.Platform.isVirginMedia()&&!shaka.util.Platform.isOrange()&&!shaka.util.Platform.isPS4()&&!shaka.util.Platform.isAmazonFireTV()&&!shaka.util.Platform.isWPE()&&!shaka.util.Platform.isZenterio()&&!shaka.util.Platform.isSkyQ()};shaka.util.Platform.isPS5=function(){return shaka.util.Platform.userAgentContains_("PlayStation 5")};
|
|
195
|
+
shaka.util.Platform.isPS4=function(){return shaka.util.Platform.userAgentContains_("PlayStation 4")};shaka.util.Platform.isHisense=function(){return shaka.util.Platform.userAgentContains_("Hisense")||shaka.util.Platform.userAgentContains_("VIDAA")};shaka.util.Platform.isVirginMedia=function(){return shaka.util.Platform.userAgentContains_("VirginMedia")};shaka.util.Platform.isOrange=function(){return shaka.util.Platform.userAgentContains_("SOPOpenBrowser")};shaka.util.Platform.isSkyQ=function(){return shaka.util.Platform.userAgentContains_("Sky_STB")};
|
|
196
|
+
shaka.util.Platform.isAmazonFireTV=function(){return shaka.util.Platform.userAgentContains_("AFT")};shaka.util.Platform.isWPE=function(){return shaka.util.Platform.userAgentContains_("WPE")};shaka.util.Platform.isZenterio=function(){return shaka.util.Platform.userAgentContains_("DT_STB_BCM")};
|
|
197
|
+
shaka.util.Platform.safariVersion=function(){if(!shaka.util.Platform.isApple())return null;var a=navigator.userAgent.match(/Version\/(\d+)/);return a?parseInt(a[1],10):(a=navigator.userAgent.match(/OS (\d+)(?:_\d+)?/))?parseInt(a[1],10):null};shaka.util.Platform.isSafari=function(){return!!shaka.util.Platform.safariVersion()};shaka.util.Platform.isEOS=function(){return shaka.util.Platform.userAgentContains_("PC=EOS")};shaka.util.Platform.isAPL=function(){return shaka.util.Platform.userAgentContains_("PC=APL")};
|
|
198
|
+
shaka.util.Platform.isMobile=function(){return/(?:iPhone|iPad|iPod|Android)/.test(navigator.userAgent)?!0:shaka.util.Platform.isApple()&&1<navigator.maxTouchPoints};shaka.util.Platform.isMac=function(){return navigator.userAgentData&&navigator.userAgentData.platform?"macos"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("mac"):!1};
|
|
199
|
+
shaka.util.Platform.isWindows=function(){return navigator.userAgentData&&navigator.userAgentData.platform?"windows"==navigator.userAgentData.platform.toLowerCase():navigator.platform?navigator.platform.toLowerCase().includes("windows"):!1};shaka.util.Platform.isAndroid=function(){return shaka.util.Platform.userAgentContains_("Android")};shaka.util.Platform.isFuchsia=function(){return shaka.util.Platform.userAgentContains_("Fuchsia")};
|
|
200
|
+
shaka.util.Platform.isSmartTV=function(){var a=shaka.util.Platform;return a.isTizen()||a.isWebOS()||a.isXboxOne()||a.isPS4()||a.isPS5()||a.isAmazonFireTV()||a.isEOS()||a.isAPL()||a.isVirginMedia()||a.isOrange()||a.isWPE()||a.isChromecast()||a.isHisense()||a.isZenterio()?!0:!1};shaka.util.Platform.userAgentContains_=function(a){return(navigator.userAgent||"").includes(a)};
|
|
200
201
|
shaka.util.Platform.anyMediaElement=function(){var a=shaka.util.Platform;if(a.cachedMediaElement_)return a.cachedMediaElement_;a.cacheExpirationTimer_||(a.cacheExpirationTimer_=new shaka.util.Timer(function(){a.cachedMediaElement_=null}));a.cachedMediaElement_=document.getElementsByTagName("video")[0]||document.getElementsByTagName("audio")[0];a.cachedMediaElement_||(a.cachedMediaElement_=document.createElement("video"));a.cacheExpirationTimer_.tickAfter(1);return a.cachedMediaElement_};
|
|
201
202
|
shaka.util.Platform.requiresEncryptionInfoInAllInitSegments=function(a){var b=shaka.util.Platform;a=shaka.util.DrmUtils.isPlayReadyKeySystem(a);return b.isTizen()||b.isXboxOne()||b.isOrange()||b.isEdge()&&b.isWindows()&&a};shaka.util.Platform.supportsSequenceMode=function(){var a=shaka.util.Platform;return a.isTizen3()||a.isTizen2()||a.isWebOS3()||a.isPS4()?!1:!0};
|
|
202
203
|
shaka.util.Platform.supportsSmoothCodecSwitching=function(){var a=shaka.util.Platform;return a.isTizen2()||a.isTizen3()||a.isTizen4()||a.isTizen5()||a.isTizen6()||a.isWebOS3()||a.isWebOS4()||a.isWebOS5()||a.isChromecast()&&!a.isAndroidCastDevice()&&!a.isFuchsiaCastDevice()||a.isWindows()&&a.isEdge()?!1:!0};shaka.util.Platform.isSeekingSlow=function(){var a=shaka.util.Platform;return a.isChromecast()&&!a.isAndroidCastDevice()?!0:!1};
|
|
@@ -824,16 +825,17 @@ w=g.getBasicType(n);if(h===y&&k===w)return e.transmuxers_[a]&&!l?(e.transmuxers_
|
|
|
824
825
|
n,l),3);l&&l.destroy();return C.yield(e.reset(d),3)}return C.return(!0)})};
|
|
825
826
|
shaka.media.MediaSourceEngine.prototype.isCodecSwitchNecessary_=function(a,b,c,d){if(a==shaka.util.ManifestParserUtils.ContentType.TEXT)return!1;var e=shaka.util.MimeUtils;b=e.getNormalizedCodec(e.getCodecs(this.sourceBufferTypes_[a]));var f=e.getBasicType(this.sourceBufferTypes_[a]),g=shaka.util.MimeUtils.getFullType(c,d),h=this.config_.forceTransmux;if(!shaka.media.Capabilities.isTypeSupported(g)||!this.sequenceMode_&&shaka.util.MimeUtils.RAW_FORMATS.includes(g))h=!0;c=shaka.util.MimeUtils.getFullTypeWithAllCodecs(c,
|
|
826
827
|
d);d=shaka.transmuxer.TransmuxerEngine;h&&(h=d.findTransmuxer(c))&&(h=h(),g=h.convertCodecs(a,c),h.destroy());a=e.getNormalizedCodec(e.getCodecs(g));e=e.getBasicType(g);return b!==a||f!==e};shaka.media.MediaSourceEngine.prototype.isResetMediaSourceNecessary=function(a,b,c,d){return this.isCodecSwitchNecessary_(a,b,c,d)?this.config_.codecSwitchingStrategy!==shaka.config.CodecSwitchingStrategy.SMOOTH||!shaka.media.Capabilities.isChangeTypeSupported()||this.needSplitMuxedContent_:!1};
|
|
827
|
-
shaka.media.MediaSourceEngine.prototype.updateLcevcDec=function(a){this.lcevcDec_=a};shaka.media.MediaSourceEngine.prototype.addExtraFeaturesToMimeType_=function(a){var b=this.config_.addExtraFeaturesToSourceBuffer(a);a+=b;shaka.log.debug("Using full mime type",a);return a};shaka.media.MediaSourceEngine.createObjectURL=window.URL.createObjectURL;shaka.media.MediaSourceEngine.SourceBufferMode_={SEQUENCE:"sequence",SEGMENTS:"segments"};shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0;this.startTimeLocked_=!1;this.initialProgramDateTime_=a};
|
|
828
|
-
shaka.media.PresentationTimeline.prototype.
|
|
829
|
-
shaka.media.PresentationTimeline.prototype.
|
|
830
|
-
shaka.media.PresentationTimeline.prototype.
|
|
828
|
+
shaka.media.MediaSourceEngine.prototype.updateLcevcDec=function(a){this.lcevcDec_=a};shaka.media.MediaSourceEngine.prototype.addExtraFeaturesToMimeType_=function(a){var b=this.config_.addExtraFeaturesToSourceBuffer(a);a+=b;shaka.log.debug("Using full mime type",a);return a};shaka.media.MediaSourceEngine.createObjectURL=window.URL.createObjectURL;shaka.media.MediaSourceEngine.SourceBufferMode_={SEQUENCE:"sequence",SEGMENTS:"segments"};shaka.media.PresentationTimeline=function(a,b,c){this.presentationStartTime_=a;this.presentationDelay_=b;this.segmentAvailabilityDuration_=this.duration_=Infinity;this.maxSegmentDuration_=1;this.maxSegmentEndTime_=this.minSegmentStartTime_=null;this.clockOffset_=0;this.static_=!0;this.isLive2VodTransition_=!1;this.userSeekStart_=0;this.autoCorrectDrift_=void 0===c?!0:c;this.availabilityTimeOffset_=0;this.startTimeLocked_=!1;this.initialProgramDateTime_=a};
|
|
829
|
+
shaka.media.PresentationTimeline.prototype.getDuration=function(){return this.duration_};shaka.media.PresentationTimeline.prototype.getMaxSegmentDuration=function(){return this.maxSegmentDuration_};shaka.media.PresentationTimeline.prototype.setPresentationStartTime=function(a){goog.asserts.assert(0<=a,"presentationStartTime must be >= 0");this.presentationStartTime_=a};
|
|
830
|
+
shaka.media.PresentationTimeline.prototype.setDuration=function(a){goog.asserts.assert(0<a,"duration must be > 0");this.duration_=a};shaka.media.PresentationTimeline.prototype.getPresentationStartTime=function(){return this.presentationStartTime_};shaka.media.PresentationTimeline.prototype.setClockOffset=function(a){this.clockOffset_=a};shaka.media.PresentationTimeline.prototype.setStatic=function(a){a&&!this.static_&&(this.isLive2VodTransition_=!0);this.static_=a};
|
|
831
|
+
shaka.media.PresentationTimeline.prototype.setSegmentAvailabilityDuration=function(a){goog.asserts.assert(0<=a,"segmentAvailabilityDuration must be >= 0");this.segmentAvailabilityDuration_=a};shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityDuration=function(){return this.segmentAvailabilityDuration_};shaka.media.PresentationTimeline.prototype.setDelay=function(a){goog.asserts.assert(0<=a,"delay must be >= 0");this.presentationDelay_=a};
|
|
832
|
+
shaka.media.PresentationTimeline.prototype.getDelay=function(){return this.presentationDelay_};
|
|
831
833
|
shaka.media.PresentationTimeline.prototype.notifyTimeRange=function(a,b){if(0!=a.length){var c=(Date.now()+this.clockOffset_)/1E3;a=a.filter(function(e){return e.start+b<c});if(0!=a.length){var d=a[a.length-1].end+b;this.notifyMinSegmentStartTime(a[0].start+b);this.maxSegmentDuration_=a.reduce(function(e,f){return Math.max(e,f.end-f.start)},this.maxSegmentDuration_);this.maxSegmentEndTime_=Math.max(this.maxSegmentEndTime_,d);null!=this.presentationStartTime_&&this.autoCorrectDrift_&&!this.startTimeLocked_&&
|
|
832
834
|
(this.presentationStartTime_=c-this.maxSegmentEndTime_-this.maxSegmentDuration_);shaka.log.v1("notifySegments:","maxSegmentDuration="+this.maxSegmentDuration_)}}};
|
|
833
835
|
shaka.media.PresentationTimeline.prototype.notifySegments=function(a){if(0!=a.length){var b=a[0].startTime,c=a[0].endTime,d=(Date.now()+this.clockOffset_)/1E3;a=$jscomp.makeIterator(a);for(var e=a.next();!e.done;e=a.next())e=e.value,d<e.startTime||(b=Math.min(b,e.startTime),c=Math.max(c,e.endTime),this.maxSegmentDuration_=Math.max(this.maxSegmentDuration_,e.endTime-e.startTime));this.notifyMinSegmentStartTime(b);this.maxSegmentEndTime_=Math.max(this.maxSegmentEndTime_,c);null!=this.presentationStartTime_&&
|
|
834
836
|
this.autoCorrectDrift_&&!this.startTimeLocked_&&(this.presentationStartTime_=d-this.maxSegmentEndTime_-this.maxSegmentDuration_);shaka.log.v1("notifySegments:","maxSegmentDuration="+this.maxSegmentDuration_)}};shaka.media.PresentationTimeline.prototype.notifyPeriodDuration=function(a,b){this.notifyMinSegmentStartTime(a);Infinity==b||this.isLive()||(this.maxSegmentEndTime_=Math.max(this.maxSegmentEndTime_,b))};shaka.media.PresentationTimeline.prototype.getMaxSegmentEndTime=function(){return this.maxSegmentEndTime_};
|
|
835
837
|
shaka.media.PresentationTimeline.prototype.lockStartTime=function(){this.startTimeLocked_=!0};shaka.media.PresentationTimeline.prototype.isStartTimeLocked=function(){return this.startTimeLocked_};shaka.media.PresentationTimeline.prototype.setInitialProgramDateTime=function(a){this.initialProgramDateTime_=a};shaka.media.PresentationTimeline.prototype.getInitialProgramDateTime=function(){return this.initialProgramDateTime_};
|
|
836
|
-
shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime=function(a){this.minSegmentStartTime_
|
|
838
|
+
shaka.media.PresentationTimeline.prototype.notifyMinSegmentStartTime=function(a){null==this.minSegmentStartTime_?this.minSegmentStartTime_=a:this.isLive2VodTransition_||(this.minSegmentStartTime_=Math.min(this.minSegmentStartTime_,a))};shaka.media.PresentationTimeline.prototype.notifyMaxSegmentDuration=function(a){this.maxSegmentDuration_=Math.max(this.maxSegmentDuration_,a);shaka.log.v1("notifyNewSegmentDuration:","maxSegmentDuration="+this.maxSegmentDuration_)};
|
|
837
839
|
shaka.media.PresentationTimeline.prototype.offset=function(a){null!=this.minSegmentStartTime_&&(this.minSegmentStartTime_+=a);null!=this.maxSegmentEndTime_&&(this.maxSegmentEndTime_+=a)};shaka.media.PresentationTimeline.prototype.isLive=function(){return Infinity==this.duration_&&!this.static_};shaka.media.PresentationTimeline.prototype.isInProgress=function(){return Infinity!=this.duration_&&!this.static_};
|
|
838
840
|
shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityStart=function(){goog.asserts.assert(0<=this.segmentAvailabilityDuration_,"The availability duration should be positive");var a=this.getSegmentAvailabilityEnd()-this.segmentAvailabilityDuration_;return Math.max(this.userSeekStart_,a)};shaka.media.PresentationTimeline.prototype.setUserSeekStart=function(a){this.userSeekStart_=a};
|
|
839
841
|
shaka.media.PresentationTimeline.prototype.getSegmentAvailabilityEnd=function(){return this.isLive()||this.isInProgress()?Math.min(this.getLiveEdge_()+this.availabilityTimeOffset_,this.duration_):this.maxSegmentEndTime_?Math.min(this.maxSegmentEndTime_,this.duration_):this.duration_};
|
|
@@ -1477,12 +1479,12 @@ shaka.Player.prototype.chooseVariant_=function(){return this.updateAbrManagerVar
|
|
|
1477
1479
|
shaka.Player.prototype.checkVariants_=function(){goog.asserts.assert(this.manifest_,"Should have manifest!");for(var a=Date.now()/1E3,b=!1,c=!0,d=$jscomp.makeIterator(this.manifest_.variants),e=d.next();!e.done;e=d.next()){e=e.value;if(0<e.disabledUntilTime&&e.disabledUntilTime<=a){e.disabledUntilTime=0;b=!0;var f=shaka.log,g=f.v2,h="";e.video&&(h+="video:"+e.video.id);e.audio&&(h=h+(h?"&":"")+("audio:"+e.audio.id));g.call(f,"Re-enabled variant with "+h)}0<e.disabledUntilTime&&(c=!1)}c&&this.checkVariantsTimer_.stop();
|
|
1478
1480
|
b&&this.chooseVariantAndSwitch_(!1,void 0,!1,!1)};shaka.Player.prototype.chooseTextStream_=function(){return shaka.util.StreamUtils.filterStreamsByLanguageAndRole(this.manifest_.textStreams,this.currentTextLanguage_,this.currentTextRole_,this.currentTextForced_)[0]||null};
|
|
1479
1481
|
shaka.Player.prototype.chooseVariantAndSwitch_=function(a,b,c,d){a=void 0===a?!0:a;b=void 0===b?0:b;c=void 0===c?!1:c;d=void 0===d?!0:d;goog.asserts.assert(this.config_,"Must not be destroyed");var e=this.chooseVariant_();e&&this.switchVariant_(e,d,a,b,c)};
|
|
1480
|
-
shaka.Player.prototype.switchVariant_=function(a,b,c,d,e){e=void 0===e?!1:e;var f=this.streamingEngine_.getCurrentVariant();if(a==f)shaka.log.debug("Variant already selected."),c&&this.streamingEngine_.switchVariant(a,c,d,!0);else if(this.addVariantToSwitchHistory_(a,b),this.streamingEngine_.switchVariant(a,c,d,e,b),c=null,f&&(c=shaka.util.StreamUtils.variantToTrack(f)),a=shaka.util.StreamUtils.variantToTrack(a),b)this.onAdaptation_(c,a);else this.onVariantChanged_(c,a)};
|
|
1482
|
+
shaka.Player.prototype.switchVariant_=function(a,b,c,d,e){e=void 0===e?!1:e;var f=this.streamingEngine_.getCurrentVariant();if(a==f)shaka.log.debug("Variant already selected."),c&&this.streamingEngine_.switchVariant(a,c,d,!0);else if(this.addVariantToSwitchHistory_(a,b),this.streamingEngine_.switchVariant(a,c,d,e,b),c=null,f&&(c=shaka.util.StreamUtils.variantToTrack(f)),a=shaka.util.StreamUtils.variantToTrack(a),a.active=!0,b)this.onAdaptation_(c,a);else this.onVariantChanged_(c,a)};
|
|
1481
1483
|
shaka.Player.prototype.switchHtml5Track_=function(a){goog.asserts.assert(this.video_&&this.video_.audioTracks,"Video and video.audioTracks should not be null!");var b=Array.from(this.video_.audioTracks).find(function(c){return c.enabled});a.enabled=!0;b&&(a.id!==b.id&&(b.enabled=!1),b=shaka.util.StreamUtils.html5AudioTrackToTrack(b),a=shaka.util.StreamUtils.html5AudioTrackToTrack(a),this.onVariantChanged_(b,a))};
|
|
1482
1484
|
shaka.Player.prototype.setInitialTextState_=function(a,b){b?(this.shouldInitiallyShowText_(a.audio,b)&&(this.isTextVisible_=!0),this.isTextVisible_&&(this.textDisplayer_.setTextVisibility(!0),goog.asserts.assert(this.shouldStreamText_(),"Should be streaming text")),this.onTextTrackVisibility_()):this.isTextVisible_=!1};
|
|
1483
1485
|
shaka.Player.prototype.shouldInitiallyShowText_=function(a,b){var c=shaka.config.AutoShowText;if(this.config_.autoShowText==c.NEVER)return!1;if(this.config_.autoShowText==c.ALWAYS)return!0;var d=shaka.util.LanguageUtils,e=d.normalize(this.config_.preferredTextLanguage);b=d.normalize(b.language);if(this.config_.autoShowText==c.IF_PREFERRED_TEXT_LANGUAGE)return d.areLanguageCompatible(b,e);if(this.config_.autoShowText==c.IF_SUBTITLES_MAY_BE_NEEDED){if(!a)return!1;a=d.normalize(a.language);return d.areLanguageCompatible(b,
|
|
1484
1486
|
e)&&!d.areLanguageCompatible(a,b)}shaka.log.alwaysWarn("Invalid autoShowText setting!");return!1};shaka.Player.prototype.onManifestUpdate_=function(){this.parser_&&this.parser_.update&&this.parser_.update()};
|
|
1485
|
-
shaka.Player.prototype.onSegmentAppended_=function(a,b,c,d){if(this.playhead_){this.playhead_.notifyOfBufferingChange();var e=this.mediaSourceEngine_.bufferStart(c)
|
|
1487
|
+
shaka.Player.prototype.onSegmentAppended_=function(a,b,c,d){if(c!=shaka.util.ManifestParserUtils.ContentType.TEXT){if(this.playhead_){this.playhead_.notifyOfBufferingChange();var e=this.mediaSourceEngine_.bufferStart(c);!this.isLive()&&this.video_.paused&&null!=e&&0<e&&this.playhead_.getTime()<e&&this.playhead_.setStartTime(e)}this.pollBufferState_()}a=(new Map).set("start",a).set("end",b).set("contentType",c).set("isMuxed",d);this.dispatchEvent(shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.SegmentAppended,
|
|
1486
1488
|
a))};shaka.Player.prototype.switch_=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?0:c;shaka.log.debug("switch_");goog.asserts.assert(this.config_.abr.enabled,"AbrManager should not call switch while disabled!");this.manifest_&&this.streamingEngine_&&a!=this.streamingEngine_.getCurrentVariant()&&this.switchVariant_(a,!0,b,c)};
|
|
1487
1489
|
shaka.Player.prototype.onAdaptation_=function(a,b){a=(new Map).set("oldTrack",a).set("newTrack",b);this.lcevcDec_&&this.lcevcDec_.updateVariant(b,this.getManifestType());b=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.Adaptation,a);this.delayDispatchEvent_(b)};shaka.Player.prototype.onTracksChanged_=function(){var a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.TracksChanged);this.delayDispatchEvent_(a)};
|
|
1488
1490
|
shaka.Player.prototype.onVariantChanged_=function(a,b){a=(new Map).set("oldTrack",a).set("newTrack",b);this.lcevcDec_&&this.lcevcDec_.updateVariant(b,this.getManifestType());b=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.VariantChanged,a);this.delayDispatchEvent_(b)};shaka.Player.prototype.onTextChanged_=function(){var a=shaka.Player.makeEvent_(shaka.util.FakeEvent.EventName.TextChanged);this.delayDispatchEvent_(a)};
|
|
@@ -1524,7 +1526,7 @@ goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.
|
|
|
1524
1526
|
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,"destroyAllPreloads",shaka.Player.prototype.destroyAllPreloads);goog.exportProperty(shaka.Player.prototype,"preload",shaka.Player.prototype.preload);goog.exportProperty(shaka.Player.prototype,"detachAndSavePreload",shaka.Player.prototype.detachAndSavePreload);
|
|
1525
1527
|
goog.exportProperty(shaka.Player.prototype,"unloadAndSavePreload",shaka.Player.prototype.unloadAndSavePreload);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);goog.exportProperty(shaka.Player.prototype,"updateStartTime",shaka.Player.prototype.updateStartTime);goog.exportProperty(shaka.Player.prototype,"unload",shaka.Player.prototype.unload);goog.exportProperty(shaka.Player.prototype,"detach",shaka.Player.prototype.detach);
|
|
1526
1528
|
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);goog.exportProperty(shaka.Player,"setAdManagerFactory",shaka.Player.setAdManagerFactory);goog.exportProperty(shaka.Player,"registerSupportPlugin",shaka.Player.registerSupportPlugin);
|
|
1527
|
-
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.11.
|
|
1529
|
+
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.11.5-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
|
|
1528
1530
|
shaka.Player.TextTrackLabel="Shaka Player TextTrack";shaka.ads={};shaka.ads.AdsStats=function(){this.loadTimes_=[];this.errors_=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_++};shaka.ads.AdsStats.prototype.incrementErrors=function(){this.errors_++};
|
|
1529
1531
|
shaka.ads.AdsStats.prototype.getAverageLoadTime_=function(){return this.loadTimes_.length?this.loadTimes_.reduce(function(a,b){return a+b},0)/this.loadTimes_.length:0};shaka.ads.AdsStats.prototype.getBlob=function(){return{loadTimes:this.loadTimes_,averageLoadTime:this.getAverageLoadTime_(),started:this.started_,playedCompletely:this.playedCompletely_,skipped:this.skipped_,errors:this.errors_}};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.needsSkipUI=function(){return!1};
|
|
1530
1532
|
shaka.ads.ClientSideAd.prototype.getDuration=function(){return this.ad_.getDuration()};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()};
|
|
@@ -2245,7 +2247,7 @@ shaka.hls.ManifestTextParser.parseTag=function(a,b){var c=b.match(/^#(EXT[^:]*)(
|
|
|
2245
2247
|
b,c,e)};shaka.hls.ManifestTextParser.MEDIA_PLAYLIST_TAGS="EXT-X-TARGETDURATION EXT-X-MEDIA-SEQUENCE EXT-X-DISCONTINUITY-SEQUENCE EXT-X-PLAYLIST-TYPE EXT-X-I-FRAMES-ONLY EXT-X-ENDLIST EXT-X-SERVER-CONTROL EXT-X-SKIP EXT-X-PART-INF EXT-X-DATERANGE".split(" ");shaka.hls.ManifestTextParser.SEGMENT_TAGS="EXTINF EXT-X-BYTERANGE EXT-X-DISCONTINUITY EXT-X-PROGRAM-DATE-TIME EXT-X-KEY EXT-X-DATERANGE EXT-X-MAP EXT-X-GAP".split(" ");shaka.net.DataUriPlugin=function(){};shaka.net.DataUriPlugin.parse=function(a,b,c,d){try{var e=shaka.net.DataUriPlugin.parseRaw(a);return shaka.util.AbortableOperation.completed({uri:a,originalUri:a,data:e.data,headers:{"content-type":e.contentType}})}catch(f){return shaka.util.AbortableOperation.failed(f)}};
|
|
2246
2248
|
shaka.net.DataUriPlugin.parseRaw=function(a){var b=a.split(":");if(2>b.length||"data"!=b[0])throw shaka.log.error("Bad data URI, failed to parse scheme"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.MALFORMED_DATA_URI,a);b=b.slice(1).join(":").split(",");if(2>b.length)throw shaka.log.error("Bad data URI, failed to extract encoding and MIME type"),new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.NETWORK,
|
|
2247
2249
|
shaka.util.Error.Code.MALFORMED_DATA_URI,a);var c=b[0];a=window.decodeURIComponent(b.slice(1).join(","));b=c.split(";");c=b[0];var d=!1;1<b.length&&"base64"==b[b.length-1]&&(d=!0,b.pop());return{data:d?shaka.util.Uint8ArrayUtils.fromBase64(a):shaka.util.StringUtils.toUTF8(a),contentType:c}};goog.exportSymbol("shaka.net.DataUriPlugin",shaka.net.DataUriPlugin);goog.exportProperty(shaka.net.DataUriPlugin,"parse",shaka.net.DataUriPlugin.parse);shaka.net.NetworkingEngine.registerScheme("data",shaka.net.DataUriPlugin.parse);shaka.hls.HlsParser=function(){var a=this;this.config_=this.playerInterface_=null;this.globalId_=1;this.globalVariables_=new Map;this.groupIdToStreamInfosMap_=new Map;this.mediaSequenceToStartTimeByType_=new Map;var b=shaka.util.ManifestParserUtils.ContentType;this.mediaSequenceToStartTimeByType_.set(b.VIDEO,new Map);this.mediaSequenceToStartTimeByType_.set(b.AUDIO,new Map);this.mediaSequenceToStartTimeByType_.set(b.TEXT,new Map);this.mediaSequenceToStartTimeByType_.set(b.IMAGE,new Map);this.variantUriSet_=
|
|
2248
|
-
new Set;this.uriToStreamInfosMap_=new Map;this.presentationTimeline_=null;this.masterPlaylistUri_="";this.manifestTextParser_=new shaka.hls.ManifestTextParser;this.minSequenceNumber_=-1;this.lowestSyncTime_=Infinity;this.codecInfoInManifest_=this.streamsFinalized_=!1;this.updatePlaylistTimer_=new shaka.util.Timer(function(){if(a.mediaElement_&&!a.config_.continueLoadingWhenPaused&&(a.eventManager_.unlisten(a.mediaElement_,"timeupdate"),a.mediaElement_.paused)){a.eventManager_.listenOnce(a.mediaElement_,
|
|
2250
|
+
new Set;this.uriToStreamInfosMap_=new Map;this.presentationTimeline_=null;this.masterPlaylistUri_="";this.manifestTextParser_=new shaka.hls.ManifestTextParser;this.minSequenceNumber_=-1;this.lowestSyncTime_=Infinity;this.codecInfoInManifest_=this.streamsFinalized_=this.usesProgramDateTime_=!1;this.updatePlaylistTimer_=new shaka.util.Timer(function(){if(a.mediaElement_&&!a.config_.continueLoadingWhenPaused&&(a.eventManager_.unlisten(a.mediaElement_,"timeupdate"),a.mediaElement_.paused)){a.eventManager_.listenOnce(a.mediaElement_,
|
|
2249
2251
|
"timeupdate",function(){return a.onUpdate_()});return}a.onUpdate_()});this.presentationType_=shaka.hls.HlsParser.PresentationType_.VOD;this.manifest_=null;this.maxTargetDuration_=0;this.lastTargetDuration_=Infinity;this.lowLatencyPresentationDelay_=this.presentationDelay_=this.partialTargetDuration_=0;this.operationManager_=new shaka.util.OperationManager;this.groupIdToClosedCaptionsMap_=new Map;this.groupIdToCodecsMap_=new Map;this.mapTagToInitSegmentRefMap_=new Map;this.aesKeyInfoMap_=new Map;this.aesKeyMap_=
|
|
2250
2252
|
new Map;this.identityKeyMap_=new Map;this.identityKidMap_=new Map;this.lowLatencyByterangeOptimization_=this.lowLatencyMode_=!1;this.averageUpdateDuration_=new shaka.abr.Ewma(5);this.contentSteeringManager_=null;this.needsClosedCaptionsDetection_=!0;this.dateRangeIdsEmitted_=new Set;this.eventManager_=new shaka.util.EventManager;this.startTime_=this.mediaElement_=null;this.isPreloadFn_=function(){return!1}};
|
|
2251
2253
|
shaka.hls.HlsParser.prototype.configure=function(a,b){this.config_=a;b&&(this.isPreloadFn_=b);this.contentSteeringManager_&&this.contentSteeringManager_.configure(this.config_)};
|
|
@@ -2262,9 +2264,9 @@ shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_INVALID_PLAYLIST_HI
|
|
|
2262
2264
|
y(r.keyIds,v)||(r.keyIds=v,r.drmInfos=x,b.playerInterface_.newDrmInfo(r));w=b.createSegments_(m,t,q,a.getUris,a.type);z=w.segments;if(C=w.bandwidth)r.bandwidth=C;A=shaka.media.QualityObserver.createQualityInfo(r);B=$jscomp.makeIterator(z);for(E=B.next();!E.done;E=B.next())G=E.value,G.initSegmentReference&&(G.initSegmentReference.mediaQuality=A);r.segmentIndex.mergeAndEvict(z,b.presentationTimeline_.getSegmentAvailabilityStart());z.length&&(H=shaka.hls.Utils.getFirstTagWithNameAsNumber(m.tags,"EXT-X-MEDIA-SEQUENCE",
|
|
2263
2265
|
0),D=(F=shaka.hls.Utils.getFirstTagWithName(m.tags,"EXT-X-SKIP"))?Number(F.getAttributeValue("SKIPPED-SEGMENTS")):0,I=b.getNextMediaSequenceAndPart_(H,z),J=I.nextMediaSequence,M=I.nextPart,a.nextMediaSequence=J+D,a.nextPart=M,K=t.get(H),r.segmentIndex.evict(K));if(L=r.segmentIndex.earliestReference())a.minTimestamp=L.startTime,N=z[z.length-1],goog.asserts.assert(N,"Should have segments!"),a.maxTimestamp=N.endTime;if(P=shaka.hls.Utils.getFirstTagWithName(m.tags,"EXT-X-ENDLIST"))a.hasEndList=!0;b.determineLastTargetDuration_(m);
|
|
2264
2266
|
b.processDateRangeTags_(m.tags,r.type,q,a.getUris);O.jumpToEnd()}})};shaka.hls.HlsParser.prototype.onExpirationUpdated=function(a,b){};shaka.hls.HlsParser.prototype.onInitialVariantChosen=function(a){};shaka.hls.HlsParser.prototype.banLocation=function(a){this.contentSteeringManager_&&this.contentSteeringManager_.banLocation(a)};shaka.hls.HlsParser.prototype.setMediaElement=function(a){this.mediaElement_=a};
|
|
2265
|
-
shaka.hls.HlsParser.prototype.syncStreamsWithSequenceNumber_=function(a){for(var
|
|
2266
|
-
|
|
2267
|
-
0<
|
|
2267
|
+
shaka.hls.HlsParser.prototype.syncStreamsWithSequenceNumber_=function(a,b){b=void 0===b?!1:b;for(var c=-1==this.minSequenceNumber_,d=$jscomp.makeIterator(a),e=d.next();!e.done;e=d.next()){e=e.value;var f=e.stream.segmentIndex;goog.asserts.assert(f,"Only loaded streams should be synced");var g=this.getMediaSequenceToStartTimeFor_(e);if(f=f.earliestReference()){goog.DEBUG&&g.values().next().value!=f.startTime&&shaka.log.warning("Sequence number map is not ordered as expected!");g=$jscomp.makeIterator(g);
|
|
2268
|
+
for(var h=g.next();!h.done;h=g.next()){h=$jscomp.makeIterator(h.value);var k=h.next().value;if(h.next().value==f.startTime){c&&(this.minSequenceNumber_=Math.max(this.minSequenceNumber_,k));e.firstSequenceNumber=k;break}}}}if(!(0>this.minSequenceNumber_))for(shaka.log.debug("Syncing HLS streams against base sequence number:",this.minSequenceNumber_),a=$jscomp.makeIterator(a),c=a.next();!c.done;c=a.next())if(c=c.value,this.ignoreManifestProgramDateTimeFor_(c.type)||b)if(d=c.stream.segmentIndex)if(e=
|
|
2269
|
+
this.minSequenceNumber_-c.firstSequenceNumber,0<e&&(d.dropFirstReferences(e),d=d.earliestReference()))d=-d.startTime,c.stream.segmentIndex.offset(d),this.offsetStreamInfo_(c,d)};
|
|
2268
2270
|
shaka.hls.HlsParser.prototype.syncStreamsWithProgramDateTime_=function(a){if(Infinity==this.lowestSyncTime_){a=$jscomp.makeIterator(a);for(var b=a.next();!b.done;b=a.next())b=b.value.stream.segmentIndex,goog.asserts.assert(b,"Only loaded streams should be synced"),b=b.earliestReference(),null!=b&&null!=b.syncTime&&(this.lowestSyncTime_=Math.min(this.lowestSyncTime_,b.syncTime))}a=this.lowestSyncTime_;if(Infinity!=a){shaka.log.debug("Syncing HLS streams against base time:",a);b=$jscomp.makeIterator(this.uriToStreamInfosMap_.values());
|
|
2269
2271
|
for(var c=b.next();!c.done;c=b.next())if(c=c.value,!this.ignoreManifestProgramDateTimeFor_(c.type)){var d=c.stream.segmentIndex;if(null!=d){var e=d.earliestReference();if(e)if(null==e.syncTime)shaka.log.alwaysError("Missing EXT-X-PROGRAM-DATE-TIME for stream",c.getUris(),"Expect AV sync issues!");else for(this.offsetStreamInfo_(c,e.syncTime-a-e.startTime),c=$jscomp.makeIterator(d),d=c.next();!d.done;d=c.next())d.value.syncAgainst(a)}}}};
|
|
2270
2272
|
shaka.hls.HlsParser.prototype.offsetStreamInfo_=function(a,b){a.minTimestamp+=b;a.maxTimestamp+=b;goog.asserts.assert(0<=a.maxTimestamp,"Negative maxTimestamp after adjustment!");for(var c=this.getMediaSequenceToStartTimeFor_(a),d=$jscomp.makeIterator(c),e=d.next();!e.done;e=d.next()){var f=$jscomp.makeIterator(e.value);e=f.next().value;f=f.next().value;c.set(e,f+b)}shaka.log.debug("Offset",b,"applied to",a.getUris())};
|
|
@@ -2338,8 +2340,8 @@ q.finalizeStreams_(V),q.determineDuration_(),U=q.getUpdatePlaylistDelay_(),0<U&&
|
|
|
2338
2340
|
!0);return y=new Promise(function(z){z(x(w))})};r.closeSegmentIndex=function(){y&&!r.segmentIndex&&w.abort();r.segmentIndex&&(r.segmentIndex.release(),r.segmentIndex=null);y=null};return v};shaka.hls.HlsParser.prototype.getMinDuration_=function(){for(var a=Infinity,b=$jscomp.makeIterator(this.uriToStreamInfosMap_.values()),c=b.next();!c.done;c=b.next())c=c.value,c.stream.segmentIndex&&"text"!=c.stream.type&&(a=Math.min(a,c.maxTimestamp));return a};
|
|
2339
2341
|
shaka.hls.HlsParser.prototype.getLiveDuration_=function(){for(var a=Infinity,b=Infinity,c=$jscomp.makeIterator(this.uriToStreamInfosMap_.values()),d=c.next();!d.done;d=c.next())d=d.value,d.stream.segmentIndex&&"text"!=d.stream.type&&(a=Math.min(a,d.maxTimestamp),b=Math.min(b,d.minTimestamp));return a-b};
|
|
2340
2342
|
shaka.hls.HlsParser.prototype.notifySegmentsForStreams_=function(a){var b=[];a=$jscomp.makeIterator(a);for(var c=a.next();!c.done;c=a.next())c=c.value,c.segmentIndex&&c.segmentIndex.forEachTopLevelReference(function(d){b.push(d)});this.presentationTimeline_.notifySegments(b)};
|
|
2341
|
-
shaka.hls.HlsParser.prototype.finalizeStreams_=function(a){if(!this.isLive_())for(var b=this.getMinDuration_(),c=$jscomp.makeIterator(a),d=c.next();!d.done;d=c.next())d.value.stream.segmentIndex.fit(0,b);this.notifySegmentsForStreams_(a.map(function(e){return e.stream}));this.config_.hls.ignoreManifestProgramDateTime?this.syncStreamsWithSequenceNumber_(a):(this.syncStreamsWithProgramDateTime_(a),0<this.config_.hls.ignoreManifestProgramDateTimeForTypes.length&&
|
|
2342
|
-
shaka.hls.HlsParser.prototype.ignoreManifestProgramDateTimeFor_=function(a){return this.config_.hls.ignoreManifestProgramDateTime?!0:this.config_.hls.ignoreManifestProgramDateTimeForTypes.includes(a)};
|
|
2343
|
+
shaka.hls.HlsParser.prototype.finalizeStreams_=function(a){if(!this.isLive_())for(var b=this.getMinDuration_(),c=$jscomp.makeIterator(a),d=c.next();!d.done;d=c.next())d.value.stream.segmentIndex.fit(0,b);this.notifySegmentsForStreams_(a.map(function(e){return e.stream}));b=this.isLive_()&&!this.usesProgramDateTime_;this.config_.hls.ignoreManifestProgramDateTime||b?this.syncStreamsWithSequenceNumber_(a,b):(this.syncStreamsWithProgramDateTime_(a),0<this.config_.hls.ignoreManifestProgramDateTimeForTypes.length&&
|
|
2344
|
+
this.syncStreamsWithSequenceNumber_(a))};shaka.hls.HlsParser.prototype.ignoreManifestProgramDateTimeFor_=function(a){return this.config_.hls.ignoreManifestProgramDateTime?!0:this.config_.hls.ignoreManifestProgramDateTimeForTypes.includes(a)};
|
|
2343
2345
|
shaka.hls.HlsParser.prototype.hasEnoughInfoToFinalizeStreams_=function(){if(!this.manifest_)return!1;for(var a=[],b=[],c=$jscomp.makeIterator(this.manifest_.variants),d=c.next();!d.done;d=c.next())d=d.value,d.video&&a.push(d.video),d.audio&&b.push(d.audio);return 0<a.length&&!a.some(function(e){return e.segmentIndex})||0<b.length&&!b.some(function(e){return e.segmentIndex})?!1:!0};
|
|
2344
2346
|
shaka.hls.HlsParser.prototype.convertParsedPlaylistIntoStreamInfo_=function(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,u,v,x){v=void 0===v?!0:v;x=void 0===x?!0:x;var y=this,w,z,C,A,B,E,G,H,F,D,I,J,M,K,L,N,P,O,T,R,S,V,U,Q,W,X,Y,ba,ca;return $jscomp.asyncExecutePromiseGeneratorProgram(function(Z){switch(Z.nextAddress){case 1:w=c.segments||[];z=w.every(function(da){return shaka.hls.Utils.getFirstTagWithName(da.tags,"EXT-X-GAP")?!0:!1});if(!w.length||z)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,
|
|
2345
2347
|
shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_EMPTY_MEDIA_PLAYLIST);y.determinePresentationType_(c);y.isLive_()&&y.determineLastTargetDuration_(c);C=y.isLive_()?y.mediaSequenceToStartTimeByType_.get(g):new Map;A=y.createSegments_(c,C,b,d,g);B=A.segments;E=A.bandwidth;I=D=F=H=G=null;if(!(0<B.length&&v)){Z.jumpTo(2);break}return Z.yield(y.getBasicInfoFromSegments_(B),3);case 3:J=Z.yieldResult,g=J.type,h=J.language,m=J.channelCount,r=J.sampleRate,y.config_.disableText||(n=J.closedCaptions),
|
|
@@ -2368,7 +2370,7 @@ shaka.hls.HlsParser.prototype.getInitSegmentReference_=function(a,b,c,d){var e=s
|
|
|
2368
2370
|
l.id<e.id&&(h=this.parseAESDrmTag_(l,a,c,d)):"EXT-X-BYTERANGE"==l.name&&l.id<e.id&&(k=l);a=this.createInitSegmentReference_(g,e,k,h);this.mapTagToInitSegmentRefMap_.set(f,a)}return this.mapTagToInitSegmentRefMap_.get(f)};
|
|
2369
2371
|
shaka.hls.HlsParser.prototype.createInitSegmentReference_=function(a,b,c,d){var e=0,f=null;b=b.getAttributeValue("BYTERANGE");!b&&c&&(b=c.value);b&&(e=b.split("@"),f=Number(e[0]),e=Number(e[1]),f=e+f-1,d&&(c=f+1-e,c%16&&(f+=16-c%16)));return new shaka.media.InitSegmentReference(function(){return a},e,f,null,null,null,d)};
|
|
2370
2372
|
shaka.hls.HlsParser.prototype.createSegmentReference_=function(a,b,c,d,e,f,g,h,k){var l=shaka.hls.HlsParser;f=function(L){L=(new goog.Uri(L)).getPath().split(".").pop();var N=l.EXTENSION_MAP_BY_CONTENT_TYPE_[g][L];N||(N=l.RAW_FORMATS_TO_MIME_TYPES_[L]);return N};var m=c.tags,n=shaka.hls.Utils.getFirstTagWithName(m,"EXTINF"),p=0,q=0,r=null;c.partialSegments.length&&(this.manifest_.isLowLatency=!0);var t=null;if(!this.config_.hls.ignoreManifestProgramDateTime){var u=shaka.hls.Utils.getFirstTagWithName(m,
|
|
2371
|
-
"EXT-X-PROGRAM-DATE-TIME");u&&u.value&&(t=shaka.util.TXml.parseDate(u.value),goog.asserts.assert(null!=t,"EXT-X-PROGRAM-DATE-TIME format not valid"))}var v=shaka.media.SegmentReference.Status.AVAILABLE;shaka.hls.Utils.getFirstTagWithName(m,"EXT-X-GAP")&&(this.manifest_.gapCount++,v=shaka.media.SegmentReference.Status.MISSING);if(!n){if(0==c.partialSegments.length)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_REQUIRED_TAG_MISSING,
|
|
2373
|
+
"EXT-X-PROGRAM-DATE-TIME");u&&u.value&&(t=shaka.util.TXml.parseDate(u.value),goog.asserts.assert(null!=t,"EXT-X-PROGRAM-DATE-TIME format not valid"),this.usesProgramDateTime_=!0)}var v=shaka.media.SegmentReference.Status.AVAILABLE;shaka.hls.Utils.getFirstTagWithName(m,"EXT-X-GAP")&&(this.manifest_.gapCount++,v=shaka.media.SegmentReference.Status.MISSING);if(!n){if(0==c.partialSegments.length)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.MANIFEST,shaka.util.Error.Code.HLS_REQUIRED_TAG_MISSING,
|
|
2372
2374
|
"EXTINF");if(!this.lowLatencyMode_)return null}var x=[];u=!1;var y=null,w=!1,z=!1;if(this.lowLatencyMode_&&c.partialSegments.length){p=a&&window.ReadableStream&&this.config_.hls.allowLowLatencyByteRangeOptimization;for(var C=t,A={},B=0;B<c.partialSegments.length;A={uris$jscomp$25:void 0,pUri:void 0},B++){var E=c.partialSegments[B],G=0==B?b:x[x.length-1],H=0==B?d:G.endTime,F=Number(E.getAttributeValue("DURATION"))||this.partialTargetDuration_;if(F){var D=H+F,I=0,J=null;"EXT-X-PRELOAD-HINT"==E.name?
|
|
2373
2375
|
(I=(I=E.getAttributeValue("BYTERANGE-START"))?Number(I):0,(G=E.getAttributeValue("BYTERANGE-LENGTH"))?J=I+Number(G)-1:I&&(J=Number.MAX_SAFE_INTEGER)):(I=E.getAttributeValue("BYTERANGE"),J=$jscomp.makeIterator(this.parseByteRange_(G,I)),I=J.next().value,J=J.next().value);A.pUri=E.getAttributeValue("URI");if(A.pUri){G=shaka.media.SegmentReference.Status.AVAILABLE;"YES"==E.getAttributeValue("GAP")&&(this.manifest_.gapCount++,G=shaka.media.SegmentReference.Status.MISSING,w=!0);A.uris$jscomp$25=null;var M=
|
|
2374
2376
|
function(L){return function(){null==L.uris$jscomp$25&&(goog.asserts.assert(L.pUri,"Partial uri should be defined!"),L.uris$jscomp$25=shaka.hls.Utils.constructSegmentUris(h(),L.pUri,e));return L.uris$jscomp$25}}(A);p&&0<=I&&null!=J&&(y=M,u=!0);H=new shaka.media.SegmentReference(H,D,M,I,J,a,0,0,Infinity,[],"",null,C,G,k);"EXT-X-PRELOAD-HINT"==E.name&&(H.markAsPreload(),z=!0);"YES"!=E.getAttributeValue("INDEPENDENT")&&0<B&&H.markAsNonIndependent();if(A=f(A.pUri))H.mimeType=A,l.MIME_TYPES_WITHOUT_INIT_SEGMENT_.has(A)&&
|
|
@@ -2669,7 +2671,7 @@ goog.exportProperty(shaka.offline.Storage.prototype,"getConfiguration",shaka.off
|
|
|
2669
2671
|
shaka.offline.Storage.defaultSystemIds_=(new Map).set("org.w3.clearkey","1077efecc0b24d02ace33c1e52e2fb4b").set("com.widevine.alpha","edef8ba979d64acea3c827dcd51d21ed").set("com.microsoft.playready","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.recommendation","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.software","9a04f07998404286ab92e65be0885f95").set("com.microsoft.playready.hardware","9a04f07998404286ab92e65be0885f95");
|
|
2670
2672
|
shaka.Player.registerSupportPlugin("offline",shaka.offline.Storage.support);shaka.polyfill=function(){};shaka.polyfill.installAll=function(){for(var a=$jscomp.makeIterator(shaka.polyfill.polyfills_),b=a.next();!b.done;b=a.next()){b=b.value;try{b.callback()}catch(c){shaka.log.alwaysWarn("Error installing polyfill!",c)}}};shaka.polyfill.register=function(a,b){a={priority:b||0,callback:a};for(b=0;b<shaka.polyfill.polyfills_.length;b++)if(shaka.polyfill.polyfills_[b].priority<a.priority){shaka.polyfill.polyfills_.splice(b,0,a);return}shaka.polyfill.polyfills_.push(a)};
|
|
2671
2673
|
goog.exportSymbol("shaka.polyfill",shaka.polyfill);goog.exportProperty(shaka.polyfill,"register",shaka.polyfill.register);goog.exportProperty(shaka.polyfill,"installAll",shaka.polyfill.installAll);shaka.polyfill.polyfills_=[];shaka.polyfill.Aria=function(){};shaka.polyfill.Aria.install=function(){if(Object.getOwnPropertyDescriptor(Element.prototype,"ariaHidden"))shaka.log.info("Using native ARIAMixin interface.");else{shaka.log.info("ARIAMixin interface not detected. Installing polyfill.");for(var a=$jscomp.makeIterator(["ariaHidden","ariaLabel","ariaPressed","ariaSelected"]),b=a.next();!b.done;b=a.next())shaka.polyfill.Aria.addARIAMixinAttribute_(b.value)}};
|
|
2672
|
-
shaka.polyfill.Aria.addARIAMixinAttribute_=function(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})};goog.exportProperty(shaka.polyfill,"Aria",shaka.polyfill.Aria);goog.exportProperty(shaka.polyfill.Aria,"install",shaka.polyfill.Aria.install);shaka.polyfill.register(shaka.polyfill.Aria.install);shaka.polyfill.EncryptionScheme=function(){};shaka.polyfill.EncryptionScheme.install=function(){EncryptionSchemePolyfills.install()};goog.exportProperty(shaka.polyfill,"EncryptionScheme",shaka.polyfill.EncryptionScheme);goog.exportProperty(shaka.polyfill.EncryptionScheme,"install",shaka.polyfill.EncryptionScheme.install);shaka.polyfill.register(shaka.polyfill.EncryptionScheme.install,-2);shaka.polyfill.Fullscreen=function(){};
|
|
2674
|
+
shaka.polyfill.Aria.addARIAMixinAttribute_=function(a){var b="aria-"+a.toLowerCase().replace(/^aria/,"");Object.defineProperty(Element.prototype,a,{get:function(){return this.getAttribute(b)},set:function(c){null==c||void 0==c?this.removeAttribute(b):this.setAttribute(b,c)}})};goog.exportProperty(shaka.polyfill,"Aria",shaka.polyfill.Aria);goog.exportProperty(shaka.polyfill.Aria,"install",shaka.polyfill.Aria.install);shaka.polyfill.register(shaka.polyfill.Aria.install);shaka.polyfill.EncryptionScheme=function(){};shaka.polyfill.EncryptionScheme.install=function(){shaka.util.Platform.isPS4()||shaka.util.Platform.isSkyQ()||EncryptionSchemePolyfills.install()};goog.exportProperty(shaka.polyfill,"EncryptionScheme",shaka.polyfill.EncryptionScheme);goog.exportProperty(shaka.polyfill.EncryptionScheme,"install",shaka.polyfill.EncryptionScheme.install);shaka.polyfill.register(shaka.polyfill.EncryptionScheme.install,-2);shaka.polyfill.Fullscreen=function(){};
|
|
2673
2675
|
shaka.polyfill.Fullscreen.install=function(){if(window.Document){var a=Element.prototype;a.requestFullscreen=a.requestFullscreen||a.mozRequestFullScreen||a.msRequestFullscreen||a.webkitRequestFullscreen;a=Document.prototype;a.exitFullscreen=a.exitFullscreen||a.mozCancelFullScreen||a.msExitFullscreen||a.webkitCancelFullScreen;"fullscreenElement"in document||(Object.defineProperty(document,"fullscreenElement",{get:function(){return document.mozFullScreenElement||document.msFullscreenElement||document.webkitCurrentFullScreenElement||
|
|
2674
2676
|
document.webkitFullscreenElement}}),Object.defineProperty(document,"fullscreenEnabled",{get:function(){return document.mozFullScreenEnabled||document.msFullscreenEnabled||document.webkitFullscreenEnabled}}));a=shaka.polyfill.Fullscreen.proxyEvent_;document.addEventListener("webkitfullscreenchange",a);document.addEventListener("webkitfullscreenerror",a);document.addEventListener("mozfullscreenchange",a);document.addEventListener("mozfullscreenerror",a);document.addEventListener("MSFullscreenChange",
|
|
2675
2677
|
a);document.addEventListener("MSFullscreenError",a)}};shaka.polyfill.Fullscreen.proxyEvent_=function(a){var b=a.type.replace(/^(webkit|moz|MS)/,"").toLowerCase(),c=document.createEvent("Event");c.initEvent(b,a.bubbles,a.cancelable);a.target.dispatchEvent(c)};goog.exportProperty(shaka.polyfill,"Fullscreen",shaka.polyfill.Fullscreen);goog.exportProperty(shaka.polyfill.Fullscreen,"install",shaka.polyfill.Fullscreen.install);shaka.polyfill.register(shaka.polyfill.Fullscreen.install);shaka.polyfill.MediaCapabilities=function(){};
|