shaka-player 4.9.5 → 4.9.7

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/locales.js CHANGED
@@ -461,22 +461,24 @@ shaka.ui.Locales.addTo = function(localization) {
461
461
  ]));
462
462
  localization.insert('pl', new Map([
463
463
  ['AD_DURATION', 'Czas trwania reklamy'],
464
- ['AD_PROGRESS', 'Reklama [AD_ON] z [NUM_ADS]'],
464
+ ['AD_PROGRESS', 'Reklama [AD_ON] z [NUM_ADS]'],
465
+ ['AD_STATISTICS', 'Statystyki reklam'],
465
466
  ['AD_TIME', 'Reklama: [AD_TIME]'],
467
+ ['AIRPLAY', 'AirPlay'],
466
468
  ['AUTO_QUALITY', 'Automatycznie'],
467
469
  ['BACK', 'Wstecz'],
468
470
  ['CAPTIONS', 'Napisy'],
469
471
  ['CAST', 'Przesyłaj...'],
470
- ['ENTER_LOOP_MODE', 'Odtwarzaj bieżący film w pętli'],
471
- ['ENTER_PICTURE_IN_PICTURE', 'Włącz tryb obrazu w obrazie'],
472
+ ['ENTER_LOOP_MODE', 'Odtwarzaj bieżący film w pętli'],
473
+ ['ENTER_PICTURE_IN_PICTURE', 'Włącz tryb obrazu w obrazie'],
472
474
  ['EXIT_FULL_SCREEN', 'Zamknij pełny ekran'],
473
- ['EXIT_LOOP_MODE', 'Wyłącz odtwarzanie bieżącego filmu w pętli'],
474
- ['EXIT_PICTURE_IN_PICTURE', 'Wyłącz tryb obrazu w obrazie'],
475
+ ['EXIT_LOOP_MODE', 'Wyłącz odtwarzanie bieżącego filmu w pętli'],
476
+ ['EXIT_PICTURE_IN_PICTURE', 'Wyłącz tryb obrazu w obrazie'],
475
477
  ['FAST_FORWARD', 'Przewiń do przodu'],
476
478
  ['FULL_SCREEN', 'Pełny ekran'],
477
479
  ['LANGUAGE', 'Język'],
478
480
  ['LIVE', 'Na żywo'],
479
- ['LOOP', 'Odtwarzaj w pętli'],
481
+ ['LOOP', 'Odtwarzaj w pętli'],
480
482
  ['MORE_SETTINGS', 'Więcej ustawień'],
481
483
  ['MULTIPLE_LANGUAGES', 'Wiele języków'],
482
484
  ['MUTE', 'Wycisz'],
@@ -484,14 +486,21 @@ shaka.ui.Locales.addTo = function(localization) {
484
486
  ['OFF', 'Wyłączone'],
485
487
  ['ON', 'Włączone'],
486
488
  ['PAUSE', 'Wstrzymaj'],
487
- ['PICTURE_IN_PICTURE', 'Obraz w obrazie'],
489
+ ['PICTURE_IN_PICTURE', 'Obraz w obrazie'],
488
490
  ['PLAY', 'Odtwórz'],
489
491
  ['PLAYBACK_RATE', 'Szybkość odtwarzania'],
492
+ ['QUALITY', 'Jakość'],
493
+ ['RECENTER_VR', 'Wycentruj'],
494
+ ['REPLAY', 'Odtwórz od nowa'],
490
495
  ['RESOLUTION', 'Rozdzielczość'],
491
496
  ['REWIND', 'Przewiń do tyłu'],
492
497
  ['SEEK', 'Szukaj'],
493
498
  ['SKIP_AD', 'Pomiń reklamę'],
494
499
  ['SKIP_TO_LIVE', 'Przejdź do transmisji na żywo'],
500
+ ['STATISTICS', 'Statystyki'],
501
+ ['SUBTITLE_FORCED', 'Wymuszone'],
502
+ ['SURROUND', 'Przestrzenny'],
503
+ ['TOGGLE_STEREOSCOPIC', 'Przełącz widok stereoskopowy'],
495
504
  ['UNDETERMINED_LANGUAGE', 'Nie określono'],
496
505
  ['UNMUTE', 'Wyłącz wyciszenie'],
497
506
  ['UNRECOGNIZED_LANGUAGE', 'Nierozpoznany'],
@@ -732,48 +741,49 @@ shaka.ui.Locales.addTo = function(localization) {
732
741
  * @const
733
742
  */
734
743
  shaka.ui.Locales.Ids = {
735
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
736
- AIRPLAY: 'AIRPLAY',
737
744
  EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
738
- SKIP_TO_LIVE: 'SKIP_TO_LIVE',
739
- ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
745
+ REWIND: 'REWIND',
746
+ CAST: 'CAST',
747
+ LOOP: 'LOOP',
748
+ PLAY: 'PLAY',
749
+ UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
750
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
751
+ SKIP_AD: 'SKIP_AD',
752
+ FAST_FORWARD: 'FAST_FORWARD',
753
+ MORE_SETTINGS: 'MORE_SETTINGS',
740
754
  AD_DURATION: 'AD_DURATION',
755
+ TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
756
+ RESOLUTION: 'RESOLUTION',
757
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
741
758
  CAPTIONS: 'CAPTIONS',
742
- CAST: 'CAST',
743
- LANGUAGE: 'LANGUAGE',
759
+ REPLAY: 'REPLAY',
760
+ AUTO_QUALITY: 'AUTO_QUALITY',
744
761
  UNMUTE: 'UNMUTE',
762
+ SURROUND: 'SURROUND',
763
+ STATISTICS: 'STATISTICS',
764
+ AIRPLAY: 'AIRPLAY',
765
+ RECENTER_VR: 'RECENTER_VR',
766
+ LANGUAGE: 'LANGUAGE',
767
+ OFF: 'OFF',
745
768
  QUALITY: 'QUALITY',
769
+ AD_STATISTICS: 'AD_STATISTICS',
770
+ AD_TIME: 'AD_TIME',
771
+ VOLUME: 'VOLUME',
772
+ SEEK: 'SEEK',
773
+ ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
746
774
  MUTE: 'MUTE',
747
- OFF: 'OFF',
748
775
  PAUSE: 'PAUSE',
749
- FAST_FORWARD: 'FAST_FORWARD',
750
- MORE_SETTINGS: 'MORE_SETTINGS',
751
- MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
752
- RESOLUTION: 'RESOLUTION',
753
- SEEK: 'SEEK',
776
+ SKIP_TO_LIVE: 'SKIP_TO_LIVE',
754
777
  FULL_SCREEN: 'FULL_SCREEN',
755
- PLAY: 'PLAY',
756
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
757
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
758
- AD_TIME: 'AD_TIME',
759
- PLAYBACK_RATE: 'PLAYBACK_RATE',
760
- REWIND: 'REWIND',
761
778
  EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
762
- REPLAY: 'REPLAY',
763
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
764
- ON: 'ON',
765
- VOLUME: 'VOLUME',
766
779
  AD_PROGRESS: 'AD_PROGRESS',
767
- UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
768
- RECENTER_VR: 'RECENTER_VR',
769
- BACK: 'BACK',
770
- LOOP: 'LOOP',
771
780
  LIVE: 'LIVE',
772
- TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
773
- SKIP_AD: 'SKIP_AD',
774
- SURROUND: 'SURROUND',
775
- STATISTICS: 'STATISTICS',
781
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
782
+ MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
783
+ ON: 'ON',
776
784
  NOT_APPLICABLE: 'NOT_APPLICABLE',
777
785
  SUBTITLE_FORCED: 'SUBTITLE_FORCED',
778
- AUTO_QUALITY: 'AUTO_QUALITY',
786
+ BACK: 'BACK',
787
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
788
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
779
789
  };
@@ -562,10 +562,10 @@ shaka.media.DrmEngine.prototype.onKeyStatusesChange_=function(a){var b=this;a=a.
562
562
  !0);h.setUint32(0,k,!1);h.setUint16(4,l,!1);h.setUint16(6,m,!1)}"status-pending"!=f&&(c.loaded=!0);c||goog.asserts.assert("usable"!=f,"Usable keys found in closed session");"expired"==f&&(d=!0);g=shaka.util.Uint8ArrayUtils.toHex(g).slice(0,32);b.keyStatusByKeyId_.set(g,f)});var e=a.expiration-Date.now();(0>e||d&&1E3>e)&&c&&!c.updatePromise&&(shaka.log.debug("Session has expired",a.sessionId),this.activeSessions_.delete(a),a.close().catch(function(){}));this.areAllSessionsLoaded_()&&(this.allSessionsLoaded_.resolve(),
563
563
  this.keyStatusTimer_.tickAfter(shaka.media.DrmEngine.KEY_STATUS_BATCH_TIME))};shaka.media.DrmEngine.prototype.processKeyStatusChanges_=function(){var a=this.keyStatusByKeyId_,b=this.announcedKeyStatusByKeyId_;b.clear();a.forEach(function(c,d){return b.set(d,c)});a=Array.from(b.values());if(a.length&&a.every(function(c){return"expired"==c}))this.onError_(new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.DRM,shaka.util.Error.Code.EXPIRED));this.playerInterface_.onKeyStatus(shaka.util.MapUtils.asObject(b))};
564
564
  shaka.media.DrmEngine.isBrowserSupported=function(){return!!window.MediaKeys&&!!window.navigator&&!!window.navigator.requestMediaKeySystemAccess&&!!window.MediaKeySystemAccess&&!!window.MediaKeySystemAccess.prototype.getConfiguration};
565
- shaka.media.DrmEngine.probeSupport=function(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,w,u,v,x,z,y,A,B,E,C;return $jscomp.asyncExecutePromiseGeneratorProgram(function(F){if(1==F.nextAddress){goog.asserts.assert(shaka.media.DrmEngine.isBrowserSupported(),"Must have basic EME support");a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO","SW_SECURE_DECODE","HW_SECURE_CRYPTO",
566
- "HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready":c,"com.microsoft.playready.recommendation":c,"com.chromecast.playready":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;
567
- l=function(I,D){var G,H,J,K,M,L,O,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(N){switch(N.nextAddress){case 1:return N.setCatchFinallyBlocks(2),N.yield(D.createMediaKeys(),4);case 4:N.leaveTryBlock(3);break;case 2:return N.enterCatchBlock(),N.return();case 3:H=(G=D.getConfiguration().sessionTypes)?G.includes("persistent-license"):!1,shaka.util.Platform.isTizen3()&&(H=!1),J=D.getConfiguration().videoCapabilities,K=D.getConfiguration().audioCapabilities,M={persistentState:H,encryptionSchemes:[],
568
- videoRobustnessLevels:[],audioRobustnessLevels:[]},k.has(I)&&k.get(I)?M=k.get(I):k.set(I,M),(L=J[0].encryptionScheme)&&!M.encryptionSchemes.includes(L)&&M.encryptionSchemes.push(L),(O=J[0].robustness)&&!M.videoRobustnessLevels.includes(O)&&M.videoRobustnessLevels.push(O),(P=K[0].robustness)&&!M.audioRobustnessLevels.includes(P)&&M.audioRobustnessLevels.push(P),N.jumpToEnd()}})};m=function(I,D,G,H){var J,K,M,L,O,P,N,U,R;return $jscomp.asyncExecutePromiseGeneratorProgram(function(T){switch(T.nextAddress){case 1:T.setCatchFinallyBlocks(2);
565
+ shaka.media.DrmEngine.probeSupport=function(){var a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,t,w,u,v,x,z,y,A,B,E,C;return $jscomp.asyncExecutePromiseGeneratorProgram(function(F){if(1==F.nextAddress){goog.asserts.assert(shaka.media.DrmEngine.isBrowserSupported(),"Must have basic EME support");a="org.w3.clearkey com.widevine.alpha com.microsoft.playready com.microsoft.playready.hardware com.microsoft.playready.recommendation com.chromecast.playready com.apple.fps.1_0 com.apple.fps".split(" ");b=["SW_SECURE_CRYPTO",
566
+ "SW_SECURE_DECODE","HW_SECURE_CRYPTO","HW_SECURE_DECODE","HW_SECURE_ALL"];c=["150","2000","3000"];d={"com.widevine.alpha":b,"com.microsoft.playready.recommendation":c};e=[{contentType:'video/mp4; codecs="avc1.42E01E"'},{contentType:'video/webm; codecs="vp8"'}];f=[{contentType:'audio/mp4; codecs="mp4a.40.2"'},{contentType:'audio/webm; codecs="opus"'}];g={videoCapabilities:e,audioCapabilities:f,initDataTypes:["cenc","sinf","skd","keyids"]};h=[null,"cenc","cbcs","cbcs-1-9"];k=new Map;l=function(I,D){var G,
567
+ H,J,K,M,L,O,P;return $jscomp.asyncExecutePromiseGeneratorProgram(function(N){switch(N.nextAddress){case 1:return N.setCatchFinallyBlocks(2),N.yield(D.createMediaKeys(),4);case 4:N.leaveTryBlock(3);break;case 2:return N.enterCatchBlock(),N.return();case 3:H=(G=D.getConfiguration().sessionTypes)?G.includes("persistent-license"):!1,shaka.util.Platform.isTizen3()&&(H=!1),J=D.getConfiguration().videoCapabilities,K=D.getConfiguration().audioCapabilities,M={persistentState:H,encryptionSchemes:[],videoRobustnessLevels:[],
568
+ audioRobustnessLevels:[]},k.has(I)&&k.get(I)?M=k.get(I):k.set(I,M),(L=J[0].encryptionScheme)&&!M.encryptionSchemes.includes(L)&&M.encryptionSchemes.push(L),(O=J[0].robustness)&&!M.videoRobustnessLevels.includes(O)&&M.videoRobustnessLevels.push(O),(P=K[0].robustness)&&!M.audioRobustnessLevels.includes(P)&&M.audioRobustnessLevels.push(P),N.jumpToEnd()}})};m=function(I,D,G,H){var J,K,M,L,O,P,N,U,R;return $jscomp.asyncExecutePromiseGeneratorProgram(function(T){switch(T.nextAddress){case 1:T.setCatchFinallyBlocks(2);
569
569
  J=shaka.util.ObjectUtils.cloneObject(g);K=$jscomp.makeIterator(J.videoCapabilities);for(M=K.next();!M.done;M=K.next())L=M.value,L.encryptionScheme=D,L.robustness=G;O=$jscomp.makeIterator(J.audioCapabilities);for(M=O.next();!M.done;M=O.next())P=M.value,P.encryptionScheme=D,P.robustness=H;N=shaka.util.ObjectUtils.cloneObject(J);N.persistentState="required";N.sessionTypes=["persistent-license"];U=[N,J];return T.yield(navigator.requestMediaKeySystemAccess(I,U),4);case 4:return R=T.yieldResult,T.yield(l(I,
570
570
  R),5);case 5:T.leaveTryBlock(0);break;case 2:T.enterCatchBlock(),T.jumpToEnd()}})};n=function(I,D,G,H){var J,K,M;return $jscomp.asyncExecutePromiseGeneratorProgram(function(L){switch(L.nextAddress){case 1:return L.setCatchFinallyBlocks(2),J={type:"media-source",video:{contentType:e[0].contentType,width:640,height:480,bitrate:1,framerate:1},audio:{contentType:f[0].contentType,channels:2,bitrate:1,samplerate:1},keySystemConfiguration:{keySystem:I,video:{encryptionScheme:D,robustness:G},audio:{encryptionScheme:D,
571
571
  robustness:H}}},L.yield(navigator.mediaCapabilities.decodingInfo(J),4);case 4:return K=L.yieldResult,M=K.keySystemAccess,L.yield(l(I,M),5);case 5:L.leaveTryBlock(0);break;case 2:L.enterCatchBlock(),L.jumpToEnd()}})};p=$jscomp.makeIterator(a);for(q=p.next();!q.done;q=p.next())r=q.value,k.set(r,null);t=[];w=$jscomp.makeIterator(h);for(u=w.next();!u.done;u=w.next())for(v=u.value,x=$jscomp.makeIterator(a),q=x.next();!q.done;q=x.next())z=q.value,"org.w3.clearkey"===z&&shaka.util.Platform.isSafari()||(t.push(m(z,
@@ -846,9 +846,9 @@ shaka.media.VideoWrapper.PlayheadMover=function(a,b){var c=this;this.mediaElemen
846
846
  shaka.media.VideoWrapper.PlayheadMover.prototype.moveTo=function(a){this.originTime_=this.mediaElement_.currentTime;this.targetTime_=a;this.remainingAttempts_=this.maxAttempts_;this.mediaElement_.currentTime=a;this.timer_.tickEvery(.1)};
847
847
  shaka.media.VideoWrapper.PlayheadMover.prototype.onTick_=function(){0>=this.remainingAttempts_?(shaka.log.warning(["Failed to move playhead from",this.originTime_,"to",this.targetTime_].join(" ")),this.timer_.stop()):this.mediaElement_.currentTime!=this.originTime_?this.timer_.stop():(this.mediaElement_.currentTime=this.targetTime_,this.remainingAttempts_--)};shaka.media.Playhead=function(){};shaka.media.Playhead.prototype.ready=function(){};shaka.media.Playhead.prototype.setStartTime=function(a){};shaka.media.Playhead.prototype.getStallsDetected=function(){};shaka.media.Playhead.prototype.getGapsJumped=function(){};shaka.media.Playhead.prototype.getTime=function(){};shaka.media.Playhead.prototype.notifyOfBufferingChange=function(){};
848
848
  shaka.media.SrcEqualsPlayhead=function(a){this.mediaElement_=a;this.started_=!1;this.startTime_=null;this.eventManager_=new shaka.util.EventManager};
849
- shaka.media.SrcEqualsPlayhead.prototype.ready=function(){var a=this;goog.asserts.assert(null!=this.mediaElement_,"Playhead should not be released before calling ready()");var b=function(){null==a.startTime_||0==a.startTime_?a.started_=!0:(a.eventManager_.listenOnce(a.mediaElement_,"seeking",function(){a.started_=!0}),a.mediaElement_.currentTime=Math.max(0,a.mediaElement_.currentTime+a.startTime_))};shaka.util.MediaReadyState.waitForReadyState(this.mediaElement_,HTMLMediaElement.HAVE_CURRENT_DATA,
850
- this.eventManager_,function(){b()})};shaka.media.SrcEqualsPlayhead.prototype.release=function(){this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);this.mediaElement_=null};shaka.media.SrcEqualsPlayhead.prototype.setStartTime=function(a){this.startTime_=this.started_?this.startTime_:a};shaka.media.SrcEqualsPlayhead.prototype.getTime=function(){return(this.started_?this.mediaElement_.currentTime:this.startTime_)||0};shaka.media.SrcEqualsPlayhead.prototype.getStallsDetected=function(){return 0};
851
- shaka.media.SrcEqualsPlayhead.prototype.getGapsJumped=function(){return 0};shaka.media.SrcEqualsPlayhead.prototype.notifyOfBufferingChange=function(){};
849
+ shaka.media.SrcEqualsPlayhead.prototype.ready=function(){var a=this;goog.asserts.assert(null!=this.mediaElement_,"Playhead should not be released before calling ready()");var b=function(){if(null==a.startTime_||0==a.startTime_&&Infinity!=a.mediaElement_.duration)a.started_=!0;else{var c=a.mediaElement_.currentTime,d=a.startTime_;0>a.startTime_&&(d=Math.max(0,c+a.startTime_));c!=d?(a.eventManager_.listenOnce(a.mediaElement_,"seeking",function(){a.started_=!0}),a.mediaElement_.currentTime=d):a.started_=
850
+ !0}};shaka.util.MediaReadyState.waitForReadyState(this.mediaElement_,HTMLMediaElement.HAVE_CURRENT_DATA,this.eventManager_,function(){b()})};shaka.media.SrcEqualsPlayhead.prototype.release=function(){this.eventManager_&&(this.eventManager_.release(),this.eventManager_=null);this.mediaElement_=null};shaka.media.SrcEqualsPlayhead.prototype.setStartTime=function(a){this.startTime_=this.started_?this.startTime_:a};
851
+ shaka.media.SrcEqualsPlayhead.prototype.getTime=function(){return(this.started_?this.mediaElement_.currentTime:this.startTime_)||0};shaka.media.SrcEqualsPlayhead.prototype.getStallsDetected=function(){return 0};shaka.media.SrcEqualsPlayhead.prototype.getGapsJumped=function(){return 0};shaka.media.SrcEqualsPlayhead.prototype.notifyOfBufferingChange=function(){};
852
852
  shaka.media.MediaSourcePlayhead=function(a,b,c,d,e,f){var g=this;this.minSeekRange_=3;this.mediaElement_=a;this.timeline_=b.presentationTimeline;this.minBufferTime_=b.minBufferTime||0;this.config_=c;this.onSeek_=e;this.lastCorrectiveSeek_=null;this.stallDetector_=this.createStallDetector_(a,c,f);this.gapController_=new shaka.media.GapJumpingController(a,b.presentationTimeline,c,this.stallDetector_,f);this.videoWrapper_=new shaka.media.VideoWrapper(a,function(){return g.onSeeking_()},function(h){return g.onStarted_(h)},
853
853
  function(){return g.getStartTime_(d)});this.checkWindowTimer_=new shaka.util.Timer(function(){g.onPollWindow_()})};shaka.media.MediaSourcePlayhead.prototype.ready=function(){this.checkWindowTimer_.tickEvery(.25)};
854
854
  shaka.media.MediaSourcePlayhead.prototype.release=function(){this.videoWrapper_&&(this.videoWrapper_.release(),this.videoWrapper_=null);this.gapController_&&(this.gapController_.release(),this.gapController_=null);this.checkWindowTimer_&&(this.checkWindowTimer_.stop(),this.checkWindowTimer_=null);this.mediaElement_=this.videoWrapper_=this.timeline_=this.config_=null;this.onSeek_=function(){}};shaka.media.MediaSourcePlayhead.prototype.setStartTime=function(a){this.videoWrapper_.setTime(a)};
@@ -1440,7 +1440,7 @@ goog.exportProperty(shaka.Player.prototype,"resetConfiguration",shaka.Player.pro
1440
1440
  goog.exportProperty(shaka.Player.prototype,"releaseAllMutexes",shaka.Player.prototype.releaseAllMutexes);goog.exportProperty(shaka.Player.prototype,"preload",shaka.Player.prototype.preload);goog.exportProperty(shaka.Player.prototype,"detachAndSavePreload",shaka.Player.prototype.detachAndSavePreload);goog.exportProperty(shaka.Player.prototype,"unloadAndSavePreload",shaka.Player.prototype.unloadAndSavePreload);goog.exportProperty(shaka.Player.prototype,"load",shaka.Player.prototype.load);
1441
1441
  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);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);
1442
1442
  goog.exportProperty(shaka.Player,"isBrowserSupported",shaka.Player.isBrowserSupported);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);
1443
- shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.9.5-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);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_++};
1443
+ shaka.Player.TYPICAL_BUFFERING_THRESHOLD_=.5;shaka.Player.version="v4.9.7-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);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_++};
1444
1444
  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()};
1445
1445
  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()};
1446
1446
  shaka.ads.ClientSideAd.prototype.getTimeUntilSkippable=function(){var a=this.ad_.getSkipTimeOffset();a=this.getRemainingTime()-a;return Math.max(a,0)};shaka.ads.ClientSideAd.prototype.canSkipNow=function(){return this.manager_.getAdSkippableState()};shaka.ads.ClientSideAd.prototype.skip=function(){return this.manager_.skip()};shaka.ads.ClientSideAd.prototype.setPaused=function(a){this.isPaused_=a};shaka.ads.ClientSideAd.prototype.pause=function(){return this.manager_.pause()};
@@ -2326,7 +2326,7 @@ shaka.net.HttpFetchPlugin.request_=function(a,b,c,d,e,f,g){var h,k,l,m,n,p,q,r,t
2326
2326
  r=l.clone().body.getReader();w=(t=l.headers.get("Content-Length"))?parseInt(t,10):0;u=function(y){var A=function(){var B,E,C,F;return $jscomp.asyncExecutePromiseGeneratorProgram(function(I){switch(I.nextAddress){case 1:return I.setCatchFinallyBlocks(2),I.yield(r.read(),4);case 4:B=I.yieldResult;I.leaveTryBlock(3);break;case 2:return E=I.enterCatchBlock(),shaka.log.v1("error reading from stream",E.message),I.return();case 3:if(B.done){I.jumpTo(5);break}n+=B.value.byteLength;if(!g){I.jumpTo(5);break}return I.yield(g(B.value),
2327
2327
  5);case 5:C=Date.now();if(100<C-q||B.done)F=B.done?0:w-n,e(C-q,n-p,F),p=n,q=C;B.done?(goog.asserts.assert(!B.value,'readObj should be unset when "done" is true.'),y.close()):(y.enqueue(B.value),A());I.jumpToEnd()}})};A()};new k({start:u});return z.yield(l.arrayBuffer(),6);case 6:m=z.yieldResult;case 5:z.leaveTryBlock(3);break;case 2:v=z.enterCatchBlock();if(d.canceled)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.OPERATION_ABORTED,
2328
2328
  a,b);if(d.timedOut)throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.TIMEOUT,a,b);throw new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.HTTP_ERROR,a,v,b);case 3:return x=shaka.net.HttpFetchPlugin.headersToGenericObject_(l.headers),z.return(shaka.net.HttpPluginUtils.makeResponse(x,m,l.status,a,l.url,b))}})};
2329
- shaka.net.HttpFetchPlugin.headersToGenericObject_=function(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b};shaka.net.HttpFetchPlugin.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||!window.AbortController)};goog.exportSymbol("shaka.net.HttpFetchPlugin",shaka.net.HttpFetchPlugin);
2329
+ shaka.net.HttpFetchPlugin.headersToGenericObject_=function(a){var b={};a.forEach(function(c,d){b[d.trim()]=c});return b};shaka.net.HttpFetchPlugin.isSupported=function(){if(window.ReadableStream)try{new ReadableStream({})}catch(a){return!1}else return!1;if(window.Response){if(!(new Response("")).body)return!1}else return!1;return!(!window.fetch||"polyfill"in window.fetch||!window.AbortController)};goog.exportSymbol("shaka.net.HttpFetchPlugin",shaka.net.HttpFetchPlugin);
2330
2330
  goog.exportProperty(shaka.net.HttpFetchPlugin,"isSupported",shaka.net.HttpFetchPlugin.isSupported);goog.exportProperty(shaka.net.HttpFetchPlugin,"parse",shaka.net.HttpFetchPlugin.parse);shaka.net.HttpFetchPlugin.fetch_=window.fetch;shaka.net.HttpFetchPlugin.AbortController_=window.AbortController;shaka.net.HttpFetchPlugin.ReadableStream_=window.ReadableStream;shaka.net.HttpFetchPlugin.Headers_=window.Headers;
2331
2331
  shaka.net.HttpFetchPlugin.isSupported()&&(shaka.net.NetworkingEngine.registerScheme("http",shaka.net.HttpFetchPlugin.parse,shaka.net.NetworkingEngine.PluginPriority.PREFERRED,!0),shaka.net.NetworkingEngine.registerScheme("https",shaka.net.HttpFetchPlugin.parse,shaka.net.NetworkingEngine.PluginPriority.PREFERRED,!0),shaka.net.NetworkingEngine.registerScheme("blob",shaka.net.HttpFetchPlugin.parse,shaka.net.NetworkingEngine.PluginPriority.PREFERRED,!0));shaka.net.HttpXHRPlugin=function(){};
2332
2332
  shaka.net.HttpXHRPlugin.parse=function(a,b,c,d,e){var f=new shaka.net.HttpXHRPlugin.Xhr_,g=Date.now(),h=0,k=new Promise(function(l,m){f.open(b.method,a,!0);f.responseType="arraybuffer";f.timeout=b.retryParameters.timeout;f.withCredentials=b.allowCrossSiteCredentials;f.onabort=function(){m(new shaka.util.Error(shaka.util.Error.Severity.RECOVERABLE,shaka.util.Error.Category.NETWORK,shaka.util.Error.Code.OPERATION_ABORTED,a,c))};var n=!1;f.onreadystatechange=function(r){2!=f.readyState||n||(r=shaka.net.HttpXHRPlugin.headersToGenericObject_(f),
@@ -2649,14 +2649,15 @@ shaka.text.TtmlTextParser.parseTickTime_=function(a,b){b=shaka.text.TtmlTextPars
2649
2649
  shaka.text.TtmlTextParser.parseTimeFromRegex_=function(a,b){a=a.exec(b);return null==a||""==a[0]?null:(Number(a[4])||0)/1E3+(Number(a[3])||0)+60*(Number(a[2])||0)+3600*(Number(a[1])||0)};shaka.text.TtmlTextParser.getCellResolution_=function(a){if(!a)return null;var b=/^(\d+) (\d+)$/.exec(a);if(!b)return null;a=parseInt(b[1],10);b=parseInt(b[2],10);return{columns:a,rows:b}};goog.exportSymbol("shaka.text.TtmlTextParser",shaka.text.TtmlTextParser);
2650
2650
  goog.exportProperty(shaka.text.TtmlTextParser.prototype,"parseMedia",shaka.text.TtmlTextParser.prototype.parseMedia);goog.exportProperty(shaka.text.TtmlTextParser.prototype,"setManifestType",shaka.text.TtmlTextParser.prototype.setManifestType);goog.exportProperty(shaka.text.TtmlTextParser.prototype,"setSequenceMode",shaka.text.TtmlTextParser.prototype.setSequenceMode);goog.exportProperty(shaka.text.TtmlTextParser.prototype,"parseInit",shaka.text.TtmlTextParser.prototype.parseInit);
2651
2651
  shaka.text.TtmlTextParser.RateInfo_=function(a,b,c,d){this.frameRate=Number(a)||30;this.subFrameRate=Number(b)||1;this.tickRate=Number(d);0==this.tickRate&&(this.tickRate=a?this.frameRate*this.subFrameRate:1);c&&(a=/^(\d+) (\d+)$/g.exec(c))&&(this.frameRate*=Number(a[1])/Number(a[2]))};shaka.text.TtmlTextParser.percentValues_=/^(\d{1,2}(?:\.\d+)?|100(?:\.0+)?)% (\d{1,2}(?:\.\d+)?|100(?:\.0+)?)%$/;shaka.text.TtmlTextParser.percentValue_=/^(\d{1,2}(?:\.\d+)?|100)%$/;
2652
- shaka.text.TtmlTextParser.unitValues_=/^(\d+px|\d+em|\d*\.?\d+c)$/;shaka.text.TtmlTextParser.pixelValues_=/^(\d+)px (\d+)px$/;shaka.text.TtmlTextParser.timeColonFormatFrames_=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/;shaka.text.TtmlTextParser.timeColonFormat_=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/;shaka.text.TtmlTextParser.timeColonFormatMilliseconds_=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d{2,})$/;shaka.text.TtmlTextParser.timeFramesFormat_=/^(\d*(?:\.\d*)?)f$/;
2653
- shaka.text.TtmlTextParser.timeTickFormat_=/^(\d*(?:\.\d*)?)t$/;shaka.text.TtmlTextParser.timeHMSFormat_=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$");shaka.text.TtmlTextParser.textAlignToLineAlign_={left:shaka.text.Cue.lineAlign.START,center:shaka.text.Cue.lineAlign.CENTER,right:shaka.text.Cue.lineAlign.END,start:shaka.text.Cue.lineAlign.START,end:shaka.text.Cue.lineAlign.END};
2652
+ shaka.text.TtmlTextParser.unitValues_=/^(\d+px|\d+em|\d*\.?\d+c)$/;shaka.text.TtmlTextParser.pixelValues_=/^(\d+)px (\d+)px$/;shaka.text.TtmlTextParser.timeColonFormatFrames_=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/;shaka.text.TtmlTextParser.timeColonFormat_=/^(?:(\d{2,}):)?(\d{2}):(\d{2})$/;shaka.text.TtmlTextParser.timeColonFormatMilliseconds_=/^(?:(\d{2,}):)?(\d{2}):(\d{2}\.\d+)$/;shaka.text.TtmlTextParser.timeFramesFormat_=/^(\d*(?:\.\d*)?)f$/;shaka.text.TtmlTextParser.timeTickFormat_=/^(\d*(?:\.\d*)?)t$/;
2653
+ shaka.text.TtmlTextParser.timeHMSFormat_=RegExp("^(?:(\\d*(?:\\.\\d*)?)h)?(?:(\\d*(?:\\.\\d*)?)m)?(?:(\\d*(?:\\.\\d*)?)s)?(?:(\\d*(?:\\.\\d*)?)ms)?$");shaka.text.TtmlTextParser.textAlignToLineAlign_={left:shaka.text.Cue.lineAlign.START,center:shaka.text.Cue.lineAlign.CENTER,right:shaka.text.Cue.lineAlign.END,start:shaka.text.Cue.lineAlign.START,end:shaka.text.Cue.lineAlign.END};
2654
2654
  shaka.text.TtmlTextParser.textAlignToPositionAlign_={left:shaka.text.Cue.positionAlign.LEFT,center:shaka.text.Cue.positionAlign.CENTER,right:shaka.text.Cue.positionAlign.RIGHT};shaka.text.TtmlTextParser.parameterNs_=["http://www.w3.org/ns/ttml#parameter","http://www.w3.org/2006/10/ttaf1#parameter"];shaka.text.TtmlTextParser.styleNs_=["http://www.w3.org/ns/ttml#styling","http://www.w3.org/2006/10/ttaf1#styling"];shaka.text.TtmlTextParser.styleEbuttsNs_="urn:ebu:tt:style";
2655
2655
  shaka.text.TtmlTextParser.smpteNsList_=["http://www.smpte-ra.org/schemas/2052-1/2010/smpte-tt","http://www.smpte-ra.org/schemas/2052-1/2013/smpte-tt"];shaka.text.TextEngine.registerParser("application/ttml+xml",function(){return new shaka.text.TtmlTextParser});shaka.text.Mp4TtmlParser=function(){this.parser_=new shaka.text.TtmlTextParser};
2656
2656
  shaka.text.Mp4TtmlParser.prototype.parseInit=function(a){var b=shaka.util.Mp4Parser,c=!1;(new b).box("moov",b.children).box("trak",b.children).box("mdia",b.children).box("minf",b.children).box("stbl",b.children).fullBox("stsd",b.sampleDescription).box("stpp",function(d){c=!0;d.parser.stop()}).parse(a);if(!c)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.INVALID_MP4_TTML);};shaka.text.Mp4TtmlParser.prototype.setSequenceMode=function(a){};
2657
2657
  shaka.text.Mp4TtmlParser.prototype.setManifestType=function(a){};shaka.text.Mp4TtmlParser.prototype.parseMedia=function(a,b,c){var d=this,e=shaka.util.Mp4Parser,f=!1,g=[];(new e).box("mdat",e.allData(function(h){f=!0;g=g.concat(d.parser_.parseMedia(h,b,c))})).parse(a,!1);if(!f)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.INVALID_MP4_TTML);return g};goog.exportSymbol("shaka.text.Mp4TtmlParser",shaka.text.Mp4TtmlParser);
2658
2658
  goog.exportProperty(shaka.text.Mp4TtmlParser.prototype,"parseMedia",shaka.text.Mp4TtmlParser.prototype.parseMedia);goog.exportProperty(shaka.text.Mp4TtmlParser.prototype,"setManifestType",shaka.text.Mp4TtmlParser.prototype.setManifestType);goog.exportProperty(shaka.text.Mp4TtmlParser.prototype,"setSequenceMode",shaka.text.Mp4TtmlParser.prototype.setSequenceMode);goog.exportProperty(shaka.text.Mp4TtmlParser.prototype,"parseInit",shaka.text.Mp4TtmlParser.prototype.parseInit);
2659
- shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.im1t"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.TTML.im1t"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.VttTextParser=function(){this.sequenceMode_=!1;this.manifestType_=shaka.media.ManifestParser.UNKNOWN};shaka.text.VttTextParser.prototype.parseInit=function(a){goog.asserts.assert(!1,"VTT does not have init segments")};shaka.text.VttTextParser.prototype.setSequenceMode=function(a){this.sequenceMode_=a};shaka.text.VttTextParser.prototype.setManifestType=function(a){this.manifestType_=a};
2659
+ shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.im1t"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.im2t"',function(){return new shaka.text.Mp4TtmlParser});
2660
+ shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.etd1"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.etd1|im1t"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.ttml.im1t|etd1"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.TextEngine.registerParser('application/mp4; codecs="stpp.TTML.im1t"',function(){return new shaka.text.Mp4TtmlParser});shaka.text.VttTextParser=function(){this.sequenceMode_=!1;this.manifestType_=shaka.media.ManifestParser.UNKNOWN};shaka.text.VttTextParser.prototype.parseInit=function(a){goog.asserts.assert(!1,"VTT does not have init segments")};shaka.text.VttTextParser.prototype.setSequenceMode=function(a){this.sequenceMode_=a};shaka.text.VttTextParser.prototype.setManifestType=function(a){this.manifestType_=a};
2660
2661
  shaka.text.VttTextParser.prototype.parseMedia=function(a,b){var c=shaka.text.VttTextParser;a=shaka.util.StringUtils.fromUTF8(a);a=a.replace(/\r\n|\r(?=[^\n]|$)/gm,"\n");var d=a.split(/\n{2,}/m);if(!/^WEBVTT($|[ \t\n])/m.test(d[0]))throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.INVALID_TEXT_HEADER);a=b.vttOffset;d[0].includes("X-TIMESTAMP-MAP")&&this.manifestType_==shaka.media.ManifestParser.HLS&&(a=this.sequenceMode_?this.computeHlsSequenceModeOffset_(d[0],
2661
2662
  b):b.segmentStart);b=[];for(var e=$jscomp.makeIterator(d[0].split("\n")),f=e.next();!f.done;f=e.next())f=f.value,/^Region:/.test(f)&&(f=c.parseRegion_(f),b.push(f));e=new Map;c.addDefaultTextColor_(e);f=[];d=$jscomp.makeIterator(d.slice(1));for(var g=d.next();!g.done;g=d.next())g=g.value.split("\n"),c.parseStyle_(g,e),(g=c.parseCue_(g,a,b,e))&&f.push(g);return f};
2662
2663
  shaka.text.VttTextParser.prototype.computeHlsSequenceModeOffset_=function(a,b){var c=a.match(/LOCAL:((?:(\d{1,}):)?(\d{2}):(\d{2})\.(\d{3}))/m);a=a.match(/MPEGTS:(\d+)/m);if(!c||!a)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.INVALID_TEXT_HEADER);c=new shaka.util.TextParser(c[1]);c=shaka.text.VttTextParser.parseTime_(c);if(null==c)throw new shaka.util.Error(shaka.util.Error.Severity.CRITICAL,shaka.util.Error.Category.TEXT,shaka.util.Error.Code.INVALID_TEXT_HEADER);