shaka-player 4.10.4 → 4.10.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/deps.js +2 -2
- package/dist/locales.js +37 -37
- package/dist/shaka-player.compiled.debug.js +18 -17
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +197 -196
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +29 -27
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +252 -250
- package/dist/shaka-player.ui.map +3 -3
- package/lib/cea/cea608_memory.js +14 -2
- package/lib/media/media_source_engine.js +24 -4
- package/lib/player.js +1 -1
- package/lib/text/simple_text_displayer.js +1 -71
- package/lib/text/text_utils.js +81 -0
- package/package.json +1 -1
- package/ui/resolution_selection.js +35 -20
package/dist/deps.js
CHANGED
|
@@ -150,12 +150,12 @@ goog.addDependency('../../../../lib/text/lrc_text_parser.js', ['shaka.text.LrcTe
|
|
|
150
150
|
goog.addDependency('../../../../lib/text/mp4_ttml_parser.js', ['shaka.text.Mp4TtmlParser'], ['shaka.text.TextEngine', 'shaka.text.TtmlTextParser', 'shaka.util.Error', 'shaka.util.Mp4Parser'], {'lang': 'es6'});
|
|
151
151
|
goog.addDependency('../../../../lib/text/mp4_vtt_parser.js', ['shaka.text.Mp4VttParser'], ['goog.asserts', 'shaka.log', 'shaka.text.Cue', 'shaka.text.TextEngine', 'shaka.text.VttTextParser', 'shaka.util.DataViewReader', 'shaka.util.Error', 'shaka.util.Functional', 'shaka.util.Mp4BoxParsers', 'shaka.util.Mp4Parser', 'shaka.util.StringUtils', 'shaka.util.TextParser'], {'lang': 'es6'});
|
|
152
152
|
goog.addDependency('../../../../lib/text/sbv_text_parser.js', ['shaka.text.SbvTextParser'], ['goog.asserts', 'shaka.text.Cue', 'shaka.text.TextEngine', 'shaka.util.Error', 'shaka.util.StringUtils', 'shaka.util.TextParser'], {'lang': 'es6'});
|
|
153
|
-
goog.addDependency('../../../../lib/text/simple_text_displayer.js', ['shaka.text.SimpleTextDisplayer'], ['goog.asserts', 'shaka.
|
|
153
|
+
goog.addDependency('../../../../lib/text/simple_text_displayer.js', ['shaka.text.SimpleTextDisplayer'], ['goog.asserts', 'shaka.text.Utils'], {'lang': 'es6'});
|
|
154
154
|
goog.addDependency('../../../../lib/text/srt_text_parser.js', ['shaka.text.SrtTextParser'], ['goog.asserts', 'shaka.text.TextEngine', 'shaka.text.VttTextParser', 'shaka.util.BufferUtils', 'shaka.util.StringUtils'], {'lang': 'es6'});
|
|
155
155
|
goog.addDependency('../../../../lib/text/ssa_text_parser.js', ['shaka.text.SsaTextParser'], ['goog.asserts', 'shaka.log', 'shaka.text.Cue', 'shaka.text.TextEngine', 'shaka.util.StringUtils'], {'lang': 'es6'});
|
|
156
156
|
goog.addDependency('../../../../lib/text/stub_text_displayer.js', ['shaka.text.StubTextDisplayer'], [], {'lang': 'es6'});
|
|
157
157
|
goog.addDependency('../../../../lib/text/text_engine.js', ['shaka.text.TextEngine'], ['goog.asserts', 'shaka.Deprecate', 'shaka.media.ClosedCaptionParser', 'shaka.text.Cue', 'shaka.util.BufferUtils', 'shaka.util.IDestroyable', 'shaka.util.MimeUtils'], {'lang': 'es8'});
|
|
158
|
-
goog.addDependency('../../../../lib/text/text_utils.js', ['shaka.text.Utils'], ['shaka.text.Cue'], {'lang': 'es6'});
|
|
158
|
+
goog.addDependency('../../../../lib/text/text_utils.js', ['shaka.text.Utils'], ['shaka.log', 'shaka.text.Cue'], {'lang': 'es6'});
|
|
159
159
|
goog.addDependency('../../../../lib/text/ttml_text_parser.js', ['shaka.text.TtmlTextParser'], ['goog.Uri', 'goog.asserts', 'shaka.log', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.TextEngine', 'shaka.util.ArrayUtils', 'shaka.util.Error', 'shaka.util.StringUtils', 'shaka.util.TXml'], {'lang': 'es8'});
|
|
160
160
|
goog.addDependency('../../../../lib/text/ui_text_displayer.js', ['shaka.text.UITextDisplayer'], ['goog.asserts', 'shaka.Deprecate', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.Utils', 'shaka.util.Dom', 'shaka.util.EventManager', 'shaka.util.Timer'], {'lang': 'es6'});
|
|
161
161
|
goog.addDependency('../../../../lib/text/vtt_text_parser.js', ['shaka.text.VttTextParser'], ['goog.asserts', 'shaka.log', 'shaka.media.ManifestParser', 'shaka.text.Cue', 'shaka.text.CueRegion', 'shaka.text.TextEngine', 'shaka.util.Error', 'shaka.util.StringUtils', 'shaka.util.TXml', 'shaka.util.TextParser'], {'lang': 'es6'});
|
package/dist/locales.js
CHANGED
|
@@ -771,50 +771,50 @@ shaka.ui.Locales.addTo = function(localization) {
|
|
|
771
771
|
* @const
|
|
772
772
|
*/
|
|
773
773
|
shaka.ui.Locales.Ids = {
|
|
774
|
-
|
|
774
|
+
SEEK: 'SEEK',
|
|
775
|
+
FAST_FORWARD: 'FAST_FORWARD',
|
|
776
|
+
PAUSE: 'PAUSE',
|
|
777
|
+
UNMUTE: 'UNMUTE',
|
|
778
|
+
AD_DURATION: 'AD_DURATION',
|
|
779
|
+
AIRPLAY: 'AIRPLAY',
|
|
775
780
|
MORE_SETTINGS: 'MORE_SETTINGS',
|
|
781
|
+
LANGUAGE: 'LANGUAGE',
|
|
782
|
+
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
783
|
+
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
784
|
+
REPLAY: 'REPLAY',
|
|
785
|
+
OFF: 'OFF',
|
|
786
|
+
SURROUND: 'SURROUND',
|
|
776
787
|
SKIP_AD: 'SKIP_AD',
|
|
788
|
+
VOLUME: 'VOLUME',
|
|
789
|
+
QUALITY: 'QUALITY',
|
|
790
|
+
ON: 'ON',
|
|
777
791
|
CAPTIONS: 'CAPTIONS',
|
|
778
|
-
RECENTER_VR: 'RECENTER_VR',
|
|
779
|
-
FAST_FORWARD: 'FAST_FORWARD',
|
|
780
|
-
AD_TIME: 'AD_TIME',
|
|
781
792
|
BACK: 'BACK',
|
|
793
|
+
FULL_SCREEN: 'FULL_SCREEN',
|
|
794
|
+
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
795
|
+
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
796
|
+
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
797
|
+
LOOP: 'LOOP',
|
|
798
|
+
RECENTER_VR: 'RECENTER_VR',
|
|
799
|
+
RESOLUTION: 'RESOLUTION',
|
|
800
|
+
MUTE: 'MUTE',
|
|
801
|
+
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
802
|
+
PLAY: 'PLAY',
|
|
803
|
+
LIVE: 'LIVE',
|
|
804
|
+
REWIND: 'REWIND',
|
|
782
805
|
UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
|
|
806
|
+
AD_STATISTICS: 'AD_STATISTICS',
|
|
807
|
+
STATISTICS: 'STATISTICS',
|
|
808
|
+
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
809
|
+
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
810
|
+
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
811
|
+
AD_TIME: 'AD_TIME',
|
|
783
812
|
SKIP_TO_LIVE: 'SKIP_TO_LIVE',
|
|
784
|
-
|
|
785
|
-
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
813
|
+
AD_PROGRESS: 'AD_PROGRESS',
|
|
786
814
|
CAST: 'CAST',
|
|
787
|
-
|
|
788
|
-
TOGGLE_STEREOSCOPIC: 'TOGGLE_STEREOSCOPIC',
|
|
815
|
+
PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
|
|
789
816
|
ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
RESOLUTION: 'RESOLUTION',
|
|
793
|
-
PLAY: 'PLAY',
|
|
794
|
-
OFF: 'OFF',
|
|
795
|
-
AD_PROGRESS: 'AD_PROGRESS',
|
|
796
|
-
AUTO_QUALITY: 'AUTO_QUALITY',
|
|
797
|
-
AIRPLAY: 'AIRPLAY',
|
|
798
|
-
AD_DURATION: 'AD_DURATION',
|
|
817
|
+
UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
|
|
818
|
+
NOT_APPLICABLE: 'NOT_APPLICABLE',
|
|
799
819
|
EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
|
|
800
|
-
QUALITY: 'QUALITY',
|
|
801
|
-
LOOP: 'LOOP',
|
|
802
|
-
REWIND: 'REWIND',
|
|
803
|
-
ON: 'ON',
|
|
804
|
-
MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
|
|
805
|
-
SUBTITLE_FORCED: 'SUBTITLE_FORCED',
|
|
806
|
-
ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
|
|
807
|
-
PLAYBACK_RATE: 'PLAYBACK_RATE',
|
|
808
|
-
VOLUME: 'VOLUME',
|
|
809
|
-
SEEK: 'SEEK',
|
|
810
|
-
REPLAY: 'REPLAY',
|
|
811
|
-
MUTE: 'MUTE',
|
|
812
|
-
DOWNLOAD_VIDEO_FRAME: 'DOWNLOAD_VIDEO_FRAME',
|
|
813
|
-
UNMUTE: 'UNMUTE',
|
|
814
|
-
PAUSE: 'PAUSE',
|
|
815
|
-
STATISTICS: 'STATISTICS',
|
|
816
|
-
EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
|
|
817
|
-
FULL_SCREEN: 'FULL_SCREEN',
|
|
818
|
-
EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
|
|
819
|
-
LIVE: 'LIVE',
|
|
820
820
|
};
|
|
@@ -732,8 +732,8 @@ shaka.lcevc.Dec.prototype.isSupported_=function(){"undefined"===typeof libDPIMod
|
|
|
732
732
|
typeof this.lcevcLib_.SupportObject)return shaka.log.alwaysWarn("Could not find LCEVC Library on this page"),!1;this.lcevcLib_.SupportObject.SupportStatus||shaka.log.alwaysWarn(this.lcevcLib_.SupportObject.SupportError);return"undefined"!==typeof this.lcevcLib_&&"undefined"!==typeof libDPIModule&&this.canvas_ instanceof HTMLCanvasElement&&this.lcevcLib_.SupportObject.SupportStatus};
|
|
733
733
|
shaka.lcevc.Dec.prototype.updateVariant=function(a,b){var c=shaka.lcevc.Dec.ContainerFormat.MPEG2_TS,d=shaka.lcevc.Dec.StreamingFormat.OTHER;switch(a.mimeType){case "video/webm":c=shaka.lcevc.Dec.ContainerFormat.WEBM;break;case "video/mp4":c=shaka.lcevc.Dec.ContainerFormat.MP4}switch(b){case "DASH":d=shaka.lcevc.Dec.StreamingFormat.DASH;break;case "HLS":d=shaka.lcevc.Dec.StreamingFormat.HLS}this.dec_&&(this.variantId_=a.id,this.dec_.setLevelSwitching(a.id,!0),this.dec_.setContainerFormat(c),this.toBeDeprecated_||
|
|
734
734
|
this.dec_.setStreamingFormat(d))};goog.exportSymbol("shaka.lcevc.Dec",shaka.lcevc.Dec);goog.exportProperty(shaka.lcevc.Dec.prototype,"release",shaka.lcevc.Dec.prototype.release);shaka.lcevc.Dec.ContainerFormat={MPEG2_TS:0,WEBM:1,MP4:2};shaka.lcevc.Dec.StreamingFormat={HLS:0,DASH:1,OTHER:-1};shaka.media.MediaSourceEngine=function(a,b,c,d){var e=this;this.video_=a;this.playerInterface_=c;this.config_=null;this.textDisplayer_=b;this.sourceBuffers_={};this.sourceBufferTypes_={};this.expectedEncryption_={};this.textEngine_=null;this.segmentRelativeVttTiming_=!1;this.lcevcDec_=d||null;this.queues_={};this.eventManager_=new shaka.util.EventManager;this.transmuxers_={};this.captionParser_=null;this.mediaSourceOpen_=new shaka.util.PublicPromise;this.url_="";this.playbackHasBegun_=!1;this.mediaSource_=
|
|
735
|
-
this.createMediaSource(this.mediaSourceOpen_);this.reloadingMediaSource_=!1;this.destroyer_=new shaka.util.Destroyer(function(){return e.doDestroy_()});this.sequenceMode_=!1;this.manifestType_=shaka.media.ManifestParser.UNKNOWN;this.attemptTimestampOffsetCalculation_=this.ignoreManifestTimestampsInSegmentsMode_=!1;this.textSequenceModeOffset_=new shaka.util.PublicPromise;this.needSplitMuxedContent_=!1;this.streamingAllowed_=!0;this.
|
|
736
|
-
null;this.audioCompensation_=new shaka.util.PublicPromise};
|
|
735
|
+
this.createMediaSource(this.mediaSourceOpen_);this.reloadingMediaSource_=!1;this.destroyer_=new shaka.util.Destroyer(function(){return e.doDestroy_()});this.sequenceMode_=!1;this.manifestType_=shaka.media.ManifestParser.UNKNOWN;this.attemptTimestampOffsetCalculation_=this.ignoreManifestTimestampsInSegmentsMode_=!1;this.textSequenceModeOffset_=new shaka.util.PublicPromise;this.needSplitMuxedContent_=!1;this.streamingAllowed_=!0;this.firstAudioReferenceStartTime_=this.firstAudioTimestamp_=this.firstVideoReferenceStartTime_=
|
|
736
|
+
this.firstVideoTimestamp_=this.tsParser_=this.lastDuration_=null;this.audioCompensation_=new shaka.util.PublicPromise};
|
|
737
737
|
shaka.media.MediaSourceEngine.prototype.createMediaSource=function(a){var b=this;if(window.ManagedMediaSource){this.video_.disableRemotePlayback=!0;var c=new ManagedMediaSource;this.eventManager_.listen(c,"startstreaming",function(){b.streamingAllowed_=!0});this.eventManager_.listen(c,"endstreaming",function(){b.streamingAllowed_=!1});this.eventManager_.listenOnce(c,"sourceopen",function(){return b.onSourceOpen_(a)});this.eventManager_.listenOnce(this.video_,"playing",function(){b.playbackHasBegun_=
|
|
738
738
|
!0});this.url_=shaka.media.MediaSourceEngine.createObjectURL(c);this.video_.src=this.url_;return c}c=new MediaSource;this.eventManager_.listenOnce(c,"sourceopen",function(){return b.onSourceOpen_(a)});this.eventManager_.listenOnce(this.video_,"playing",function(){b.playbackHasBegun_=!0});this.url_=shaka.media.MediaSourceEngine.createObjectURL(c);this.video_.src=this.url_;return c};
|
|
739
739
|
shaka.media.MediaSourceEngine.prototype.onSourceOpen_=function(a){goog.asserts.assert(this.url_,"Must have object URL");URL.revokeObjectURL(this.url_);a.resolve()};
|
|
@@ -762,12 +762,12 @@ c&&0==c.timestampOffset&&c.initSegmentReference&&c.initSegmentReference.timescal
|
|
|
762
762
|
shaka.util.TsParser.probe(g)&&(this.tsParser_?this.tsParser_.clearData():this.tsParser_=new shaka.util.TsParser,g=this.tsParser_.parse(g),a=g.getStartTime(a),null!=a&&(f=a),g=g.getMetadata(),g.length))this.playerInterface_.onMetadata(g,e,c?c.endTime:null);return f};
|
|
763
763
|
shaka.media.MediaSourceEngine.prototype.appendBuffer=function(a,b,c,d,e,f,g,h,k){f=void 0===f?!1:f;g=void 0===g?!1:g;h=void 0===h?!1:h;k=void 0===k?!1:k;var l=this,m,n,p,q,r,t,y,u,w,x,v,z,B,A,D,H,I,G,C;return $jscomp.asyncExecutePromiseGeneratorProgram(function(E){switch(E.nextAddress){case 1:m=shaka.util.ManifestParserUtils.ContentType;if(a!=m.TEXT){E.jumpTo(2);break}if(!l.sequenceMode_){E.jumpTo(3);break}return E.yield(l.textSequenceModeOffset_,4);case 4:n=E.yieldResult,l.textEngine_.setTimestampOffset(n);
|
|
764
764
|
case 3:return E.yield(l.textEngine_.appendBuffer(b,c?c.startTime:null,c?c.endTime:null,c?c.getUris()[0]:null),5);case 5:return E.return();case 2:if(k||!l.needSplitMuxedContent_){E.jumpTo(6);break}return E.yield(l.appendBuffer(m.AUDIO,b,c,d,e,f,g,h,!0),7);case 7:return E.yield(l.appendBuffer(m.VIDEO,b,c,d,e,f,g,h,!0),8);case 8:return E.return();case 6:if(!l.sourceBuffers_[a])return shaka.log.warning("Attempted to restore a non-existent source buffer"),E.return();p=l.sourceBuffers_[a].timestampOffset;
|
|
765
|
-
q=l.sourceBufferTypes_[a];l.transmuxers_[a]&&(q=l.transmuxers_[a].getOriginalMimeType());c&&(r=l.getTimestampAndDispatchMetadata_(a,b,c,q,p),null!=r&&(null==l.firstVideoTimestamp_&&a==m.VIDEO&&(l.firstVideoTimestamp_=r,null!=l.firstAudioTimestamp_&&(t=l.firstVideoTimestamp_-l.firstAudioTimestamp_,l.audioCompensation_.resolve(t))),null==l.firstAudioTimestamp_&&a==m.AUDIO&&(l.firstAudioTimestamp_=
|
|
766
|
-
u=c.startTime-r,w=Math.abs(p-u),(.001<=w||f||g)&&(!h||0<u||!p)&&(p=u,l.attemptTimestampOffsetCalculation_&&(l.enqueueOperation_(a,function(){return l.abort_(a)},null),l.enqueueOperation_(a,function(){return l.setTimestampOffset_(a,p)},null))),x=a==m.VIDEO||!(m.VIDEO in l.sourceBuffers_),
|
|
767
|
-
l.captionParser_=l.getCaptionParser(v)),c?(z=l.captionParser_.parseFrom(b),z.length&&l.textEngine_.storeAndAppendClosedCaptions(z,c.startTime,c.endTime,p)):l.captionParser_.init(b,g));if(!l.transmuxers_[a]){E.jumpTo(9);break}return E.yield(l.transmuxers_[a].transmux(b,d,c,l.mediaSource_.duration,
|
|
768
|
-
if(l.manifestType_!=shaka.media.ManifestParser.HLS||l.needSplitMuxedContent_||a!=m.AUDIO||!l.sourceBuffers_[m.VIDEO]){E.jumpTo(13);break}return E.yield(l.audioCompensation_,14);case 14:A=E.yieldResult,.1<Math.abs(A)&&(B-=A);case 13:l.enqueueOperation_(a,function(){return l.abort_(a)},null),
|
|
769
|
-
c?c.getUris()[0]:null),15);case 15:goog.DEBUG&&c&&!c.isPreload()&&!h&&(H=l.getBuffered_(a),I=shaka.media.TimeRangesUtils.computeAddedRange(D,H))&&(G=c.endTime-c.startTime,C=Math.abs(I.end-c.endTime),.1<G&&C>G/2&&shaka.log.error("Possible encoding problem detected!","Unexpected buffered range for reference",
|
|
770
|
-
shaka.media.MediaSourceEngine.prototype.setSelectedClosedCaptionId=function(a){var b=this.bufferEnd(shaka.util.ManifestParserUtils.ContentType.VIDEO)||0;this.textEngine_.setSelectedClosedCaptionId(a,b)};shaka.media.MediaSourceEngine.prototype.clearSelectedClosedCaptionId=function(){this.textEngine_&&this.textEngine_.setSelectedClosedCaptionId("",0)};
|
|
765
|
+
q=l.sourceBufferTypes_[a];l.transmuxers_[a]&&(q=l.transmuxers_[a].getOriginalMimeType());c&&(r=l.getTimestampAndDispatchMetadata_(a,b,c,q,p),null!=r&&(null==l.firstVideoTimestamp_&&a==m.VIDEO&&(l.firstVideoTimestamp_=r,l.firstVideoReferenceStartTime_=c.startTime,null!=l.firstAudioTimestamp_&&(t=0,l.firstVideoReferenceStartTime_==l.firstAudioReferenceStartTime_&&(t=l.firstVideoTimestamp_-l.firstAudioTimestamp_),l.audioCompensation_.resolve(t))),null==l.firstAudioTimestamp_&&a==m.AUDIO&&(l.firstAudioTimestamp_=
|
|
766
|
+
r,l.firstAudioReferenceStartTime_=c.startTime,null!=l.firstVideoTimestamp_&&(y=0,l.firstVideoReferenceStartTime_==l.firstAudioReferenceStartTime_&&(y=l.firstVideoTimestamp_-l.firstAudioTimestamp_),l.audioCompensation_.resolve(y))),u=c.startTime-r,w=Math.abs(p-u),(.001<=w||f||g)&&(!h||0<u||!p)&&(p=u,l.attemptTimestampOffsetCalculation_&&(l.enqueueOperation_(a,function(){return l.abort_(a)},null),l.enqueueOperation_(a,function(){return l.setTimestampOffset_(a,p)},null))),x=a==m.VIDEO||!(m.VIDEO in l.sourceBuffers_),
|
|
767
|
+
l.sequenceMode_&&x&&l.textSequenceModeOffset_.resolve(p)));e&&a==m.VIDEO&&(l.textEngine_||l.reinitText(shaka.util.MimeUtils.CEA608_CLOSED_CAPTION_MIMETYPE,l.sequenceMode_,!1),l.captionParser_||(v=q.split(";",1)[0],l.captionParser_=l.getCaptionParser(v)),c?(z=l.captionParser_.parseFrom(b),z.length&&l.textEngine_.storeAndAppendClosedCaptions(z,c.startTime,c.endTime,p)):l.captionParser_.init(b,g));if(!l.transmuxers_[a]){E.jumpTo(9);break}return E.yield(l.transmuxers_[a].transmux(b,d,c,l.mediaSource_.duration,
|
|
768
|
+
a),10);case 10:b=E.yieldResult;case 9:b=l.workAroundBrokenPlatforms_(b,c?c.startTime:null,a,c?c.getUris()[0]:null);if(!c||!l.sequenceMode_||a==m.TEXT){E.jumpTo(11);break}if(!f&&!g){E.jumpTo(11);break}B=c.startTime;if(l.manifestType_!=shaka.media.ManifestParser.HLS||l.needSplitMuxedContent_||a!=m.AUDIO||!l.sourceBuffers_[m.VIDEO]){E.jumpTo(13);break}return E.yield(l.audioCompensation_,14);case 14:A=E.yieldResult,.1<Math.abs(A)&&(B-=A);case 13:l.enqueueOperation_(a,function(){return l.abort_(a)},null),
|
|
769
|
+
l.enqueueOperation_(a,function(){return l.setTimestampOffset_(a,B)},null);case 11:return D=null,E.yield(l.enqueueOperation_(a,function(){goog.DEBUG&&c&&!c.isPreload()&&!h&&(D=l.getBuffered_(a));l.append_(a,b,p)},c?c.getUris()[0]:null),15);case 15:goog.DEBUG&&c&&!c.isPreload()&&!h&&(H=l.getBuffered_(a),I=shaka.media.TimeRangesUtils.computeAddedRange(D,H))&&(G=c.endTime-c.startTime,C=Math.abs(I.end-c.endTime),.1<G&&C>G/2&&shaka.log.error("Possible encoding problem detected!","Unexpected buffered range for reference",
|
|
770
|
+
c,"from URIs",c.getUris(),"should be",{start:c.startTime,end:c.endTime},"but got",I)),E.jumpToEnd()}})};shaka.media.MediaSourceEngine.prototype.setSelectedClosedCaptionId=function(a){var b=this.bufferEnd(shaka.util.ManifestParserUtils.ContentType.VIDEO)||0;this.textEngine_.setSelectedClosedCaptionId(a,b)};shaka.media.MediaSourceEngine.prototype.clearSelectedClosedCaptionId=function(){this.textEngine_&&this.textEngine_.setSelectedClosedCaptionId("",0)};
|
|
771
771
|
shaka.media.MediaSourceEngine.prototype.remove=function(a,b,c){var d=this,e;return $jscomp.asyncExecutePromiseGeneratorProgram(function(f){return 1==f.nextAddress?(e=shaka.util.ManifestParserUtils.ContentType,a==e.TEXT?f.yield(d.textEngine_.remove(b,c),0):f.yield(d.enqueueOperation_(a,function(){return d.remove_(a,b,c)},null),4)):d.needSplitMuxedContent_?f.yield(d.enqueueOperation_(e.AUDIO,function(){return d.remove_(e.AUDIO,b,c)},null),0):f.jumpTo(0)})};
|
|
772
772
|
shaka.media.MediaSourceEngine.prototype.clear=function(a){var b=this,c;return $jscomp.asyncExecutePromiseGeneratorProgram(function(d){return 1==d.nextAddress?(c=shaka.util.ManifestParserUtils.ContentType,a==c.TEXT?b.textEngine_?d.yield(b.textEngine_.remove(0,Infinity),0):d.return():d.yield(b.enqueueOperation_(a,function(){return b.remove_(a,0,b.mediaSource_.duration)},null),4)):b.needSplitMuxedContent_?d.yield(b.enqueueOperation_(c.AUDIO,function(){return b.remove_(c.AUDIO,0,b.mediaSource_.duration)},
|
|
773
773
|
null),0):d.jumpTo(0)})};shaka.media.MediaSourceEngine.prototype.resetCaptionParser=function(){this.captionParser_&&this.captionParser_.reset()};
|
|
@@ -1137,15 +1137,16 @@ shaka.text.Utils.flattenPayload_=function(a,b){if(a.lineBreak)return"\n";if(a.ne
|
|
|
1137
1137
|
shaka.text.Utils.getColorName_=function(a){a=a.toLowerCase();var b=a.replace(/\s/g,"").match(/^rgba?\((\d+),(\d+),(\d+),?([^,\s)]+)?/i);b?a="#"+(parseInt(b[1],10)|256).toString(16).slice(1)+(parseInt(b[2],10)|256).toString(16).slice(1)+(parseInt(b[3],10)|256).toString(16).slice(1):a.startsWith("#")&&7<a.length&&(a=a.slice(0,7));switch(a){case "white":case "#fff":case "#ffffff":return"white";case "lime":case "#0f0":case "#00ff00":return"lime";case "cyan":case "#0ff":case "#00ffff":return"cyan";case "red":case "#f00":case "#ff0000":return"red";
|
|
1138
1138
|
case "yellow":case "#ff0":case "#ffff00":return"yellow";case "magenta":case "#f0f":case "#ff00ff":return"magenta";case "blue":case "#00f":case "#0000ff":return"blue";case "black":case "#000":case "#000000":return"black"}return null};
|
|
1139
1139
|
shaka.text.Utils.getCuesToFlatten=function(a,b){var c=[];a=$jscomp.makeIterator(shaka.text.Utils.removeDuplicates(a));for(var d=a.next();!d.done;d=a.next())if(d=d.value,d.isContainer)c.push.apply(c,$jscomp.arrayFromIterable(shaka.text.Utils.getCuesToFlatten(d.nestedCues,d)));else{var e=d.clone();e.nestedCues=[];e.payload=shaka.text.Utils.flattenPayload_(d,b);c.push(e)}return c};
|
|
1140
|
-
shaka.text.Utils.removeDuplicates=function(a){var b=[],c={};a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;c={$jscomp$loop$prop$cue$944:c.$jscomp$loop$prop$cue$944},d=a.next())c.$jscomp$loop$prop$cue$944=d.value,b.some(function(e){return function(f){return shaka.text.Cue.equal(e.$jscomp$loop$prop$cue$944,f)}}(c))||b.push(c.$jscomp$loop$prop$cue$944);return b};
|
|
1140
|
+
shaka.text.Utils.removeDuplicates=function(a){var b=[],c={};a=$jscomp.makeIterator(a);for(var d=a.next();!d.done;c={$jscomp$loop$prop$cue$944:c.$jscomp$loop$prop$cue$944},d=a.next())c.$jscomp$loop$prop$cue$944=d.value,b.some(function(e){return function(f){return shaka.text.Cue.equal(e.$jscomp$loop$prop$cue$944,f)}}(c))||b.push(c.$jscomp$loop$prop$cue$944);return b};
|
|
1141
|
+
shaka.text.Utils.mapShakaCueToNativeCue=function(a){if(a.startTime>=a.endTime)return shaka.log.warning("Invalid cue times: "+a.startTime+" - "+a.endTime),null;var b=shaka.text.Cue,c=new VTTCue(a.startTime,a.endTime,a.payload),d=function(e){for(var f=5381,g=e.length;g;)f=33*f^e.charCodeAt(--g);return(f>>>0).toString()};c.id=d(a.startTime.toString())+d(a.endTime.toString())+d(a.payload);c.lineAlign=a.lineAlign;c.positionAlign=a.positionAlign;a.size&&(c.size=a.size);try{c.align=a.textAlign}catch(e){}"center"==
|
|
1142
|
+
a.textAlign&&"center"!=c.align&&(c.align="middle");a.writingMode==b.writingMode.VERTICAL_LEFT_TO_RIGHT?c.vertical="lr":a.writingMode==b.writingMode.VERTICAL_RIGHT_TO_LEFT&&(c.vertical="rl");a.lineInterpretation==b.lineInterpretation.PERCENTAGE&&(c.snapToLines=!1);null!=a.line&&(c.line=a.line);null!=a.position&&(c.position=a.position);return c};shaka.text.SimpleTextDisplayer=function(a,b){this.textTrack_=null;for(var c=$jscomp.makeIterator(Array.from(a.textTracks)),d=c.next();!d.done;d=c.next())d=d.value,"metadata"!==d.kind&&"chapters"!==d.kind&&(d.mode="disabled",d.label==b&&(this.textTrack_=d));this.textTrack_||(this.textTrack_=a.addTextTrack("subtitles",b));this.textTrack_.mode="hidden"};shaka.text.SimpleTextDisplayer.prototype.configure=function(a){};
|
|
1141
1143
|
shaka.text.SimpleTextDisplayer.prototype.remove=function(a,b){if(!this.textTrack_)return!1;shaka.text.SimpleTextDisplayer.removeWhere_(this.textTrack_,function(c){return c.startTime<b&&c.endTime>a});return!0};
|
|
1142
1144
|
shaka.text.SimpleTextDisplayer.prototype.append=function(a){var b=shaka.text.Utils.getCuesToFlatten(a),c=[];a=this.textTrack_.cues?Array.from(this.textTrack_.cues):[];var d={};b=$jscomp.makeIterator(b);for(var e=b.next();!e.done;d={$jscomp$loop$prop$inCue$946:d.$jscomp$loop$prop$inCue$946},e=b.next())d.$jscomp$loop$prop$inCue$946=e.value,a.some(function(f){return function(g){return g.startTime==f.$jscomp$loop$prop$inCue$946.startTime&&g.endTime==f.$jscomp$loop$prop$inCue$946.endTime&&g.text==f.$jscomp$loop$prop$inCue$946.payload?
|
|
1143
|
-
!0:!1}}(d))||(e=shaka.text.
|
|
1145
|
+
!0:!1}}(d))||(e=shaka.text.Utils.mapShakaCueToNativeCue(d.$jscomp$loop$prop$inCue$946))&&c.push(e);a=c.slice().sort(function(f,g){return f.startTime!=g.startTime?f.startTime-g.startTime:f.endTime!=g.endTime?f.endTime-g.startTime:"line"in VTTCue.prototype?c.indexOf(g)-c.indexOf(f):c.indexOf(f)-c.indexOf(g)});a=$jscomp.makeIterator(a);for(d=a.next();!d.done;d=a.next())this.textTrack_.addCue(d.value)};
|
|
1144
1146
|
shaka.text.SimpleTextDisplayer.prototype.destroy=function(){this.textTrack_&&(shaka.text.SimpleTextDisplayer.removeWhere_(this.textTrack_,function(a){return!0}),this.textTrack_.mode="disabled");this.textTrack_=null;return Promise.resolve()};shaka.text.SimpleTextDisplayer.prototype.isTextVisible=function(){return"showing"==this.textTrack_.mode};shaka.text.SimpleTextDisplayer.prototype.setTextVisibility=function(a){this.textTrack_.mode=a?"showing":"hidden"};
|
|
1145
|
-
shaka.text.SimpleTextDisplayer.
|
|
1146
|
-
(
|
|
1147
|
-
goog.
|
|
1148
|
-
goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"append",shaka.text.SimpleTextDisplayer.prototype.append);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"remove",shaka.text.SimpleTextDisplayer.prototype.remove);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"configure",shaka.text.SimpleTextDisplayer.prototype.configure);shaka.text.StubTextDisplayer=function(){};shaka.text.StubTextDisplayer.prototype.configure=function(a){};shaka.text.StubTextDisplayer.prototype.remove=function(a,b){};shaka.text.StubTextDisplayer.prototype.append=function(a){};shaka.text.StubTextDisplayer.prototype.destroy=function(){};shaka.text.StubTextDisplayer.prototype.isTextVisible=function(){return!1};shaka.text.StubTextDisplayer.prototype.setTextVisibility=function(a){};goog.exportSymbol("shaka.text.StubTextDisplayer",shaka.text.StubTextDisplayer);
|
|
1147
|
+
shaka.text.SimpleTextDisplayer.removeWhere_=function(a,b){var c=a.mode,d="showing"==c?"showing":"hidden";a.mode=d;goog.asserts.assert(a.cues,'Cues should be accessible when mode is set to "'+d+'".');d=$jscomp.makeIterator(Array.from(a.cues));for(var e=d.next();!e.done;e=d.next())(e=e.value)&&b(e)&&a.removeCue(e);a.mode=c};goog.exportSymbol("shaka.text.SimpleTextDisplayer",shaka.text.SimpleTextDisplayer);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"setTextVisibility",shaka.text.SimpleTextDisplayer.prototype.setTextVisibility);
|
|
1148
|
+
goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"isTextVisible",shaka.text.SimpleTextDisplayer.prototype.isTextVisible);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"destroy",shaka.text.SimpleTextDisplayer.prototype.destroy);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"append",shaka.text.SimpleTextDisplayer.prototype.append);goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"remove",shaka.text.SimpleTextDisplayer.prototype.remove);
|
|
1149
|
+
goog.exportProperty(shaka.text.SimpleTextDisplayer.prototype,"configure",shaka.text.SimpleTextDisplayer.prototype.configure);shaka.text.StubTextDisplayer=function(){};shaka.text.StubTextDisplayer.prototype.configure=function(a){};shaka.text.StubTextDisplayer.prototype.remove=function(a,b){};shaka.text.StubTextDisplayer.prototype.append=function(a){};shaka.text.StubTextDisplayer.prototype.destroy=function(){};shaka.text.StubTextDisplayer.prototype.isTextVisible=function(){return!1};shaka.text.StubTextDisplayer.prototype.setTextVisibility=function(a){};goog.exportSymbol("shaka.text.StubTextDisplayer",shaka.text.StubTextDisplayer);
|
|
1149
1150
|
goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"setTextVisibility",shaka.text.StubTextDisplayer.prototype.setTextVisibility);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"isTextVisible",shaka.text.StubTextDisplayer.prototype.isTextVisible);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"destroy",shaka.text.StubTextDisplayer.prototype.destroy);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"append",shaka.text.StubTextDisplayer.prototype.append);
|
|
1150
1151
|
goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"remove",shaka.text.StubTextDisplayer.prototype.remove);goog.exportProperty(shaka.text.StubTextDisplayer.prototype,"configure",shaka.text.StubTextDisplayer.prototype.configure);shaka.util.Dom=function(){};shaka.util.Dom.createHTMLElement=function(a){return document.createElement(a)};shaka.util.Dom.createButton=function(){var a=document.createElement("button");a.setAttribute("type","button");return a};shaka.util.Dom.asHTMLElement=function(a){return a};shaka.util.Dom.asHTMLCanvasElement=function(a){return a};shaka.util.Dom.asHTMLMediaElement=function(a){return a};
|
|
1151
1152
|
shaka.util.Dom.getElementByClassName=function(a,b){b=b.getElementsByClassName(a);goog.asserts.assert(1==b.length,"Should only be one element with class name "+a);return shaka.util.Dom.asHTMLElement(b[0])};shaka.util.Dom.removeAllChildren=function(a){for(;a.firstChild;)a.removeChild(a.firstChild)};goog.exportSymbol("shaka.util.Dom",shaka.util.Dom);goog.exportProperty(shaka.util.Dom,"removeAllChildren",shaka.util.Dom.removeAllChildren);shaka.text.UITextDisplayer=function(a,b,c){var d=this;goog.asserts.assert(b,"videoContainer should be valid.");this.isTextVisible_=!1;this.cues_=[];this.video_=a;this.videoContainer_=b;this.aspectRatio_=null;this.textContainer_=shaka.util.Dom.createHTMLElement("div");this.textContainer_.classList.add("shaka-text-container");this.textContainer_.style.textAlign="center";this.textContainer_.style.display="flex";this.textContainer_.style.flexDirection="column";this.textContainer_.style.alignItems="center";
|
|
@@ -1487,7 +1488,7 @@ goog.exportProperty(shaka.Player.prototype,"getLoadMode",shaka.Player.prototype.
|
|
|
1487
1488
|
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);
|
|
1488
1489
|
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);
|
|
1489
1490
|
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);
|
|
1490
|
-
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.10.
|
|
1491
|
+
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.10.5-debug";goog.exportProperty(shaka.Player,"version",shaka.Player.version);shaka.Deprecate.init(shaka.Player.version);shaka.Player.supportPlugins_={};shaka.Player.adManagerFactory_=null;
|
|
1491
1492
|
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_++};
|
|
1492
1493
|
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.getDuration=function(){return this.ad_.getDuration()};
|
|
1493
1494
|
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()};
|
|
@@ -1785,8 +1786,8 @@ shaka.cea.CeaUtils.getParsedCaption=function(a,b,c,d,e){if(d>=e)return null;for(
|
|
|
1785
1786
|
shaka.cea.CeaUtils.createLineBreakCue=function(a,b){a=new shaka.text.Cue(a,b,"");a.lineBreak=!0;return a};shaka.cea.CeaUtils.StyledChar=function(a,b,c,d,e){this.character_=a;this.underline_=b;this.italics_=c;this.backgroundColor_=d;this.textColor_=e};shaka.cea.CeaUtils.StyledChar.prototype.getChar=function(){return this.character_};shaka.cea.CeaUtils.StyledChar.prototype.isUnderlined=function(){return this.underline_};shaka.cea.CeaUtils.StyledChar.prototype.isItalicized=function(){return this.italics_};
|
|
1786
1787
|
shaka.cea.CeaUtils.StyledChar.prototype.getBackgroundColor=function(){return this.backgroundColor_};shaka.cea.CeaUtils.StyledChar.prototype.getTextColor=function(){return this.textColor_};shaka.cea.CeaUtils.DEFAULT_BG_COLOR="black";shaka.cea.CeaUtils.DEFAULT_TXT_COLOR="white";shaka.cea.CeaUtils.H264_NALU_TYPE_SEI=6;shaka.cea.CeaUtils.H265_PREFIX_NALU_TYPE_SEI=39;shaka.cea.CeaUtils.H265_SUFFIX_NALU_TYPE_SEI=40;shaka.cea.CeaUtils.H266_PREFIX_NALU_TYPE_SEI=23;
|
|
1787
1788
|
shaka.cea.CeaUtils.H266_SUFFIX_NALU_TYPE_SEI=24;shaka.cea.CeaUtils.DEFAULT_TIMESCALE_VALUE=9E4;shaka.cea.Cea608Memory=function(a,b){this.rows_=[];this.row_=1;this.scrollRows_=0;this.fieldNum_=a;this.channelNum_=b;this.italics_=this.underline_=!1;this.textColor_=shaka.cea.CeaUtils.DEFAULT_TXT_COLOR;this.backgroundColor_=shaka.cea.CeaUtils.DEFAULT_BG_COLOR;this.reset()};
|
|
1788
|
-
shaka.cea.Cea608Memory.prototype.forceEmit=function(a,b){var c="CC"+((this.fieldNum_<<1|this.channelNum_)+1),
|
|
1789
|
-
shaka.cea.Cea608Memory.prototype.setRow=function(a){this.row_=a};shaka.cea.Cea608Memory.prototype.getScrollSize=function(){return this.scrollRows_};shaka.cea.Cea608Memory.prototype.setScrollSize=function(a){this.scrollRows_=a};
|
|
1789
|
+
shaka.cea.Cea608Memory.prototype.forceEmit=function(a,b){var c=shaka.cea.Cea608Memory,d="CC"+((this.fieldNum_<<1|this.channelNum_)+1),e=new shaka.text.Cue(a,b,"");e.lineInterpretation=shaka.text.Cue.lineInterpretation.PERCENTAGE;var f=c.ROW_TO_LINE_CONVERSION_.get(this.row_);f&&(e.line=f);(a=shaka.cea.CeaUtils.getParsedCaption(e,d,this.rows_,a,b))&&15<this.row_+a.cue.nestedCues.length-3&&(f=c.ROW_TO_LINE_CONVERSION_.get(this.row_+3-a.cue.nestedCues.length))&&(e.line=f);return a};
|
|
1790
|
+
shaka.cea.Cea608Memory.prototype.reset=function(){this.resetAllRows();this.row_=1};shaka.cea.Cea608Memory.prototype.getRow=function(){return this.row_};shaka.cea.Cea608Memory.prototype.setRow=function(a){this.row_=a};shaka.cea.Cea608Memory.prototype.getScrollSize=function(){return this.scrollRows_};shaka.cea.Cea608Memory.prototype.setScrollSize=function(a){this.scrollRows_=a};
|
|
1790
1791
|
shaka.cea.Cea608Memory.prototype.addChar=function(a,b){if(!(32>b||127<b)){var c="";switch(a){case shaka.cea.Cea608Memory.CharSet.BASIC_NORTH_AMERICAN:c=shaka.cea.Cea608Memory.CharSet.BasicNorthAmericanChars.has(b)?shaka.cea.Cea608Memory.CharSet.BasicNorthAmericanChars.get(b):String.fromCharCode(b);break;case shaka.cea.Cea608Memory.CharSet.SPECIAL_NORTH_AMERICAN:c=shaka.cea.Cea608Memory.CharSet.SpecialNorthAmericanChars.get(b);break;case shaka.cea.Cea608Memory.CharSet.SPANISH_FRENCH:this.eraseChar();
|
|
1791
1792
|
c=shaka.cea.Cea608Memory.CharSet.ExtendedSpanishFrench.get(b);break;case shaka.cea.Cea608Memory.CharSet.PORTUGUESE_GERMAN:this.eraseChar(),c=shaka.cea.Cea608Memory.CharSet.ExtendedPortugueseGerman.get(b)}c&&(a=new shaka.cea.CeaUtils.StyledChar(c,this.underline_,this.italics_,this.backgroundColor_,this.textColor_),this.rows_[this.row_].push(a))}};shaka.cea.Cea608Memory.prototype.eraseChar=function(){this.rows_[this.row_].pop()};
|
|
1792
1793
|
shaka.cea.Cea608Memory.prototype.moveRows=function(a,b,c){if(!(0>b||0>a))if(a>=b)for(--c;0<=c;c--)this.rows_[a+c]=this.rows_[b+c].map(function(e){return e});else for(var d=0;d<c;d++)this.rows_[a+d]=this.rows_[b+d].map(function(e){return e})};shaka.cea.Cea608Memory.prototype.resetRows=function(a,b){for(var c=0;c<=b;c++)this.rows_[a+c]=[]};shaka.cea.Cea608Memory.prototype.resetAllRows=function(){this.resetRows(0,shaka.cea.Cea608Memory.CC_ROWS)};
|