shaka-player 4.10.13 → 4.11.0
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/README.md +5 -1
- package/dist/controls.css +3 -3
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +11 -11
- package/dist/locales.js +38 -34
- package/dist/shaka-player.compiled.d.ts +68 -33
- package/dist/shaka-player.compiled.debug.d.ts +68 -33
- package/dist/shaka-player.compiled.debug.externs.js +584 -544
- package/dist/shaka-player.compiled.debug.js +715 -676
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +584 -544
- package/dist/shaka-player.compiled.js +1394 -1371
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +76 -34
- package/dist/shaka-player.ui.debug.d.ts +76 -34
- package/dist/shaka-player.ui.debug.externs.js +77 -26
- package/dist/shaka-player.ui.debug.js +774 -720
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +77 -26
- package/dist/shaka-player.ui.js +1649 -1617
- package/dist/shaka-player.ui.map +4 -4
- package/externs/mediasession.js +10 -1
- package/externs/shaka/ads.js +79 -2
- package/externs/shaka/manifest.js +6 -1
- package/externs/shaka/manifest_parser.js +6 -2
- package/externs/shaka/net.js +23 -2
- package/externs/shaka/player.js +414 -103
- package/externs/shaka/text.js +2 -1
- package/lib/abr/simple_abr_manager.js +5 -0
- package/lib/ads/ad_manager.js +45 -1
- package/lib/ads/ad_utils.js +124 -1
- package/lib/ads/interstitial_ad.js +9 -2
- package/lib/ads/interstitial_ad_manager.js +216 -101
- package/lib/ads/media_tailor_ad.js +1 -39
- package/lib/ads/media_tailor_ad_manager.js +32 -16
- package/lib/cea/cea608_data_channel.js +40 -8
- package/lib/cea/cea608_memory.js +28 -0
- package/lib/dash/dash_parser.js +162 -25
- package/lib/dash/segment_base.js +3 -2
- package/lib/dash/segment_list.js +6 -3
- package/lib/dash/segment_template.js +104 -20
- package/lib/hls/hls_parser.js +319 -215
- package/lib/media/drm_engine.js +11 -3
- package/lib/media/media_source_engine.js +0 -8
- package/lib/media/preload_manager.js +16 -4
- package/lib/media/segment_reference.js +3 -0
- package/lib/media/segment_utils.js +8 -1
- package/lib/media/streaming_engine.js +10 -6
- package/lib/mss/mss_parser.js +14 -2
- package/lib/net/http_fetch_plugin.js +12 -5
- package/lib/net/http_xhr_plugin.js +7 -3
- package/lib/net/networking_engine.js +21 -1
- package/lib/offline/manifest_converter.js +1 -0
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +336 -121
- package/lib/text/cue.js +373 -0
- package/lib/text/mp4_ttml_parser.js +51 -1
- package/lib/text/mp4_vtt_parser.js +2 -5
- package/lib/text/sbv_text_parser.js +2 -31
- package/lib/text/srt_text_parser.js +1 -1
- package/lib/text/text_engine.js +1 -1
- package/lib/text/text_utils.js +1 -0
- package/lib/text/ttml_text_parser.js +14 -4
- package/lib/text/ui_text_displayer.js +0 -4
- package/lib/text/vtt_text_parser.js +10 -415
- package/lib/util/abortable_operation.js +8 -0
- package/lib/util/cmcd_manager.js +38 -0
- package/lib/util/error.js +16 -0
- package/lib/util/fake_event.js +1 -0
- package/lib/util/manifest_parser_utils.js +12 -3
- package/lib/util/player_configuration.js +4 -2
- package/lib/util/stream_utils.js +57 -2
- package/lib/util/tXml.js +2 -1
- package/lib/util/text_parser.js +46 -0
- package/lib/util/ts_parser.js +32 -3
- package/package.json +1 -1
- package/shaka-player.uncompiled.js +1 -1
- package/ui/chapter_selection.js +179 -0
- package/ui/controls.js +151 -0
- package/ui/enums.js +1 -0
- package/ui/externs/ui.js +7 -1
- package/ui/less/containers.less +3 -4
- package/ui/less/overflow_menu.less +5 -0
- package/ui/less/tooltip.less +1 -1
- package/ui/locales/en.json +1 -0
- package/ui/locales/es.json +1 -0
- package/ui/locales/fr.json +1 -0
- package/ui/locales/source.json +4 -0
- package/ui/seek_bar.js +3 -2
- package/ui/ui.js +2 -0
- package/lib/polyfill/abort_controller.js +0 -158
package/externs/shaka/player.js
CHANGED
|
@@ -434,33 +434,57 @@ shaka.extern.TrackList;
|
|
|
434
434
|
*
|
|
435
435
|
* @property {number} minWidth
|
|
436
436
|
* The minimum width of a video track, in pixels.
|
|
437
|
+
* <br>
|
|
438
|
+
* Defaults to <code>0</code>.
|
|
437
439
|
* @property {number} maxWidth
|
|
438
440
|
* The maximum width of a video track, in pixels.
|
|
441
|
+
* <br>
|
|
442
|
+
* Defaults to <code>Infinity</code>.
|
|
439
443
|
* @property {number} minHeight
|
|
440
444
|
* The minimum height of a video track, in pixels.
|
|
445
|
+
* <br>
|
|
446
|
+
* Defaults to <code>0</code>.
|
|
441
447
|
* @property {number} maxHeight
|
|
442
448
|
* The maximum height of a video track, in pixels.
|
|
449
|
+
* <br>
|
|
450
|
+
* Defaults to <code>Infinity</code>.
|
|
443
451
|
* @property {number} minPixels
|
|
444
452
|
* The minimum number of total pixels in a video track (i.e.
|
|
445
453
|
* <code>width * height</code>).
|
|
454
|
+
* <br>
|
|
455
|
+
* Defaults to <code>0</code>.
|
|
446
456
|
* @property {number} maxPixels
|
|
447
457
|
* The maximum number of total pixels in a video track (i.e.
|
|
448
458
|
* <code>width * height</code>).
|
|
459
|
+
* <br>
|
|
460
|
+
* Defaults to <code>Infinity</code>.
|
|
449
461
|
*
|
|
450
462
|
* @property {number} minFrameRate
|
|
451
463
|
* The minimum framerate of a variant track.
|
|
464
|
+
* <br>
|
|
465
|
+
* Defaults to <code>0</code>.
|
|
452
466
|
* @property {number} maxFrameRate
|
|
453
467
|
* The maximum framerate of a variant track.
|
|
468
|
+
* <br>
|
|
469
|
+
* Defaults to <code>Infinity</code>.
|
|
454
470
|
*
|
|
455
471
|
* @property {number} minBandwidth
|
|
456
472
|
* The minimum bandwidth of a variant track, in bit/sec.
|
|
473
|
+
* <br>
|
|
474
|
+
* Defaults to <code>0</code>.
|
|
457
475
|
* @property {number} maxBandwidth
|
|
458
476
|
* The maximum bandwidth of a variant track, in bit/sec.
|
|
477
|
+
* <br>
|
|
478
|
+
* Defaults to <code>Infinity</code>.
|
|
459
479
|
*
|
|
460
480
|
* @property {number} minChannelsCount
|
|
461
481
|
* The minimum channels count of a variant track.
|
|
482
|
+
* <br>
|
|
483
|
+
* Defaults to <code>0</code>.
|
|
462
484
|
* @property {number} maxChannelsCount
|
|
463
485
|
* The maximum channels count of a variant track.
|
|
486
|
+
* <br>
|
|
487
|
+
* Defaults to <code>Infinity</code>.
|
|
464
488
|
* @exportDoc
|
|
465
489
|
*/
|
|
466
490
|
shaka.extern.Restrictions;
|
|
@@ -584,6 +608,42 @@ shaka.extern.MetadataRawFrame;
|
|
|
584
608
|
shaka.extern.MetadataFrame;
|
|
585
609
|
|
|
586
610
|
|
|
611
|
+
/**
|
|
612
|
+
* @typedef {{
|
|
613
|
+
* video: ?shaka.extern.PlaybackStreamInfo,
|
|
614
|
+
* audio: ?shaka.extern.PlaybackStreamInfo,
|
|
615
|
+
* text: ?shaka.extern.PlaybackStreamInfo
|
|
616
|
+
* }}
|
|
617
|
+
*
|
|
618
|
+
* @description Represents the state of the current variant and text.
|
|
619
|
+
* @property {?shaka.extern.PlaybackStreamInfo} video
|
|
620
|
+
* @property {?shaka.extern.PlaybackStreamInfo} audio
|
|
621
|
+
* @property {?shaka.extern.PlaybackStreamInfo} text
|
|
622
|
+
* @exportDoc
|
|
623
|
+
*/
|
|
624
|
+
shaka.extern.PlaybackInfo;
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
/**
|
|
628
|
+
* @typedef {{
|
|
629
|
+
* codecs: string,
|
|
630
|
+
* mimeType: string,
|
|
631
|
+
* bandwidth: number,
|
|
632
|
+
* width: ?number,
|
|
633
|
+
* height: ?number
|
|
634
|
+
* }}
|
|
635
|
+
*
|
|
636
|
+
* @description Represents the state of the given stream.
|
|
637
|
+
* @property {string} codecs
|
|
638
|
+
* @property {string} mimeType
|
|
639
|
+
* @property {number} bandwidth
|
|
640
|
+
* @property {?number} width
|
|
641
|
+
* @property {?number} height
|
|
642
|
+
* @exportDoc
|
|
643
|
+
*/
|
|
644
|
+
shaka.extern.PlaybackStreamInfo;
|
|
645
|
+
|
|
646
|
+
|
|
587
647
|
/**
|
|
588
648
|
* @typedef {{
|
|
589
649
|
* startTime: number,
|
|
@@ -596,7 +656,7 @@ shaka.extern.MetadataFrame;
|
|
|
596
656
|
* @property {!Array.<shaka.extern.MetadataFrame>} values
|
|
597
657
|
* @exportDoc
|
|
598
658
|
*/
|
|
599
|
-
shaka.extern.
|
|
659
|
+
shaka.extern.HLSInterstitial;
|
|
600
660
|
|
|
601
661
|
|
|
602
662
|
/**
|
|
@@ -758,23 +818,26 @@ shaka.extern.ProducerReferenceTime;
|
|
|
758
818
|
* }}
|
|
759
819
|
*
|
|
760
820
|
* @property {boolean} distinctiveIdentifierRequired
|
|
761
|
-
* <i>Defaults to false.</i> <br>
|
|
762
821
|
* True if the application requires the key system to support distinctive
|
|
763
822
|
* identifiers.
|
|
823
|
+
* <br>
|
|
824
|
+
* Defaults to <code>false</code>.
|
|
764
825
|
* @property {boolean} persistentStateRequired
|
|
765
|
-
* <i>Defaults to false.</i> <br>
|
|
766
826
|
* True if the application requires the key system to support persistent
|
|
767
827
|
* state, e.g., for persistent license storage.
|
|
828
|
+
* <br>
|
|
829
|
+
* Defaults to <code>false</code>.
|
|
768
830
|
* @property {string} videoRobustness
|
|
769
831
|
* A key-system-specific string that specifies a required security level for
|
|
770
832
|
* video.
|
|
771
|
-
* <
|
|
833
|
+
* <br>
|
|
834
|
+
* Defaults to <code>''</code>, i.e., no specific robustness required.
|
|
772
835
|
* @property {string} audioRobustness
|
|
773
836
|
* A key-system-specific string that specifies a required security level for
|
|
774
837
|
* audio.
|
|
775
|
-
* <
|
|
838
|
+
* <br>
|
|
839
|
+
* Defaults to <code>''</code>, i.e., no specific robustness required.
|
|
776
840
|
* @property {Uint8Array} serverCertificate
|
|
777
|
-
* <i>Defaults to null.</i> <br>
|
|
778
841
|
* <i>An empty certificate (<code>byteLength==0</code>) will be treated as
|
|
779
842
|
* <code>null</code>.</i> <br>
|
|
780
843
|
* <i>A certificate will be requested from the license server if
|
|
@@ -782,19 +845,27 @@ shaka.extern.ProducerReferenceTime;
|
|
|
782
845
|
* A key-system-specific server certificate used to encrypt license requests.
|
|
783
846
|
* Its use is optional and is meant as an optimization to avoid a round-trip
|
|
784
847
|
* to request a certificate.
|
|
848
|
+
* <br>
|
|
849
|
+
* Defaults to <code>null</code>.
|
|
785
850
|
* @property {string} serverCertificateUri
|
|
786
|
-
* <i>Defaults to <code>''</code>.</i><br>
|
|
787
851
|
* If given, will make a request to the given URI to get the server
|
|
788
852
|
* certificate. This is ignored if <code>serverCertificate</code> is set.
|
|
853
|
+
* <br>
|
|
854
|
+
* Defaults to <code>''</code>.
|
|
789
855
|
* @property {string} individualizationServer
|
|
790
856
|
* The server that handles an <code>'individualiation-request'</code>. If the
|
|
791
857
|
* server isn't given, it will default to the license server.
|
|
858
|
+
* <br>
|
|
859
|
+
* Defaults to <code>''</code>.
|
|
792
860
|
* @property {string} sessionType
|
|
793
|
-
* <i>Defaults to <code>'temporary'</code> for streaming.</i> <br>
|
|
794
861
|
* The MediaKey session type to create streaming licenses with. This doesn't
|
|
795
862
|
* affect offline storage.
|
|
863
|
+
* <br>
|
|
864
|
+
* Defaults to <code>'temporary'</code>.
|
|
796
865
|
* @property {!Object.<string, string>} headers
|
|
797
866
|
* The headers to use in the license request.
|
|
867
|
+
* <br>
|
|
868
|
+
* Defaults to <code>{}</code>.
|
|
798
869
|
*
|
|
799
870
|
* @exportDoc
|
|
800
871
|
*/
|
|
@@ -873,24 +944,34 @@ shaka.extern.PersistentSessionMetadata;
|
|
|
873
944
|
* A dictionary which maps key system IDs to their license servers.
|
|
874
945
|
* For example,
|
|
875
946
|
* <code>{'com.widevine.alpha': 'https://example.com/drm'}</code>.
|
|
947
|
+
* <br>
|
|
948
|
+
* Defaults to <code>{}</code>.
|
|
876
949
|
* @property {!Object.<string, string>} clearKeys
|
|
877
950
|
* <i>Forces the use of the Clear Key CDM.</i>
|
|
878
951
|
* A map of key IDs (hex or base64) to keys (hex or base64).
|
|
952
|
+
* <br>
|
|
953
|
+
* Defaults to <code>{}</code>.
|
|
879
954
|
* @property {boolean} delayLicenseRequestUntilPlayed
|
|
880
|
-
* <i>Defaults to false.</i> <br>
|
|
881
955
|
* True to configure drm to delay sending a license request until a user
|
|
882
956
|
* actually starts playing content.
|
|
957
|
+
* <br>
|
|
958
|
+
* Defaults to <code>false</code>.
|
|
883
959
|
* @property {boolean} persistentSessionOnlinePlayback
|
|
884
|
-
* <i>Defaults to false.</i> <br>
|
|
885
960
|
* True to configure drm to try playback with given persistent session ids
|
|
886
961
|
* before requesting a license. Also prevents the session removal at playback
|
|
887
962
|
* stop, as-to be able to re-use it later.
|
|
963
|
+
* <br>
|
|
964
|
+
* Defaults to <code>false</code>.
|
|
888
965
|
* @property {!Array.<PersistentSessionMetadata>} persistentSessionsMetadata
|
|
889
|
-
* Persistent sessions metadata to load before starting playback
|
|
966
|
+
* Persistent sessions metadata to load before starting playback.
|
|
967
|
+
* <br>
|
|
968
|
+
* Defaults to <code>[]</code>.
|
|
890
969
|
* @property {Object.<string, shaka.extern.AdvancedDrmConfiguration>} advanced
|
|
891
970
|
* <i>Optional.</i> <br>
|
|
892
971
|
* A dictionary which maps key system IDs to advanced DRM configuration for
|
|
893
972
|
* those key systems.
|
|
973
|
+
* <br>
|
|
974
|
+
* Defaults to <code>[]</code>.
|
|
894
975
|
* @property {shaka.extern.InitDataTransform|undefined} initDataTransform
|
|
895
976
|
* <i>Optional.</i><br>
|
|
896
977
|
* If given, this function is called with the init data from the
|
|
@@ -902,30 +983,41 @@ shaka.extern.PersistentSessionMetadata;
|
|
|
902
983
|
* This includes the init data, request, and response data, printed as base64
|
|
903
984
|
* strings. Don't use in production, for debugging only; has no affect in
|
|
904
985
|
* release builds as logging is removed.
|
|
986
|
+
* <br>
|
|
987
|
+
* Defaults to <code>false</code>.
|
|
905
988
|
* @property {number} updateExpirationTime
|
|
906
|
-
* <i>Defaults to 1.</i> <br>
|
|
907
989
|
* The frequency in seconds with which to check the expiration of a session.
|
|
990
|
+
* <br>
|
|
991
|
+
* Defaults to <code>1</code>.
|
|
908
992
|
* @property {!Array.<string>} preferredKeySystems
|
|
909
|
-
* <i>Defaults ['com.microsoft.playready'] on Xbox One and PlayStation 4, and
|
|
910
|
-
* an empty array for all other browsers.</i> <br>
|
|
911
993
|
* Specifies the priorties of available DRM key systems.
|
|
994
|
+
* <br>
|
|
995
|
+
* Defaults <code>['com.microsoft.playready']</code> on Xbox One and
|
|
996
|
+
* PlayStation 4, and <code>[]</code> for all other browsers.
|
|
912
997
|
* @property {Object.<string, string>} keySystemsMapping
|
|
913
998
|
* A map of key system name to key system name.
|
|
999
|
+
* <br>
|
|
1000
|
+
* Defaults to <code>{}</code>.
|
|
914
1001
|
* @property {boolean} parseInbandPsshEnabled
|
|
915
|
-
* <i>Defaults to true on Xbox One, and false for all other browsers.</i><br>
|
|
916
1002
|
* When true parse DRM init data from pssh boxes in media and init segments
|
|
917
1003
|
* and ignore 'encrypted' events.
|
|
918
1004
|
* This is required when using in-band key rotation on Xbox One.
|
|
1005
|
+
* <br>
|
|
1006
|
+
* Defaults to <code>true</code> on Xbox One, and <code>false</code> for all
|
|
1007
|
+
* other browsers.
|
|
919
1008
|
* @property {string} minHdcpVersion
|
|
920
|
-
* <i>By default (''), do not check the HDCP version.</i><br>
|
|
921
1009
|
* Indicates the minimum version of HDCP to start the playback of encrypted
|
|
922
1010
|
* streams. <b>May be ignored if not supported by the device.</b>
|
|
1011
|
+
* <br>
|
|
1012
|
+
* Defaults to <code>''</code>, do not check the HDCP version.
|
|
923
1013
|
* @property {boolean} ignoreDuplicateInitData
|
|
924
|
-
* <i>Defaults to false on Tizen 2, and true for all other browsers.</i><br>
|
|
925
1014
|
* When true indicate that the player doesn't ignore duplicate init data.
|
|
926
1015
|
* Note: Tizen 2015 and 2016 models will send multiple webkitneedkey events
|
|
927
1016
|
* with the same init data. If the duplicates are supressed, playback
|
|
928
1017
|
* will stall without errors.
|
|
1018
|
+
* <br>
|
|
1019
|
+
* Defaults to <code>false</code> on Tizen 2, and <code>true</code> for all
|
|
1020
|
+
* other browsers.
|
|
929
1021
|
* @exportDoc
|
|
930
1022
|
*/
|
|
931
1023
|
shaka.extern.DrmConfiguration;
|
|
@@ -993,46 +1085,59 @@ shaka.extern.xml.Node;
|
|
|
993
1085
|
* A default clock sync URI to be used with live streams which do not
|
|
994
1086
|
* contain any clock sync information. The <code>Date</code> header from this
|
|
995
1087
|
* URI will be used to determine the current time.
|
|
1088
|
+
* <br>
|
|
1089
|
+
* Defaults to <code>''</code>.
|
|
996
1090
|
* @property {boolean} ignoreDrmInfo
|
|
997
1091
|
* If true will cause DASH parser to ignore DRM information specified
|
|
998
1092
|
* by the manifest and treat it as if it signaled no particular key
|
|
999
|
-
* system and contained no init data.
|
|
1093
|
+
* system and contained no init data.
|
|
1094
|
+
* <br>
|
|
1095
|
+
* Defaults to <code>false</code>.
|
|
1000
1096
|
* @property {boolean} disableXlinkProcessing
|
|
1001
|
-
* If true, xlink-related processing will be disabled.
|
|
1002
|
-
* <
|
|
1097
|
+
* If true, xlink-related processing will be disabled.
|
|
1098
|
+
* <br>
|
|
1099
|
+
* Defaults to <code>false</code>.
|
|
1003
1100
|
* @property {boolean} xlinkFailGracefully
|
|
1004
1101
|
* If true, xlink-related errors will result in a fallback to the tag's
|
|
1005
1102
|
* existing contents. If false, xlink-related errors will be propagated
|
|
1006
|
-
* to the application and will result in a playback failure.
|
|
1007
|
-
*
|
|
1103
|
+
* to the application and will result in a playback failure.
|
|
1104
|
+
* <br>
|
|
1105
|
+
* Defaults to <code>false</code>.
|
|
1008
1106
|
* @property {boolean} ignoreMinBufferTime
|
|
1009
1107
|
* If true will cause DASH parser to ignore <code>minBufferTime</code> from
|
|
1010
1108
|
* manifest. It allows player config to take precedence over manifest for
|
|
1011
|
-
* <code>rebufferingGoal</code>.
|
|
1012
|
-
*
|
|
1109
|
+
* <code>rebufferingGoal</code>.
|
|
1110
|
+
* <br>
|
|
1111
|
+
* Defaults to <code>false</code>.
|
|
1013
1112
|
* @property {boolean} autoCorrectDrift
|
|
1014
1113
|
* If <code>true</code>, ignore the <code>availabilityStartTime</code> in the
|
|
1015
1114
|
* manifest and instead use the segments to determine the live edge. This
|
|
1016
1115
|
* allows us to play streams that have a lot of drift. If <code>false</code>,
|
|
1017
1116
|
* we can't play content where the manifest specifies segments in the future.
|
|
1117
|
+
* <br>
|
|
1018
1118
|
* Defaults to <code>true</code>.
|
|
1019
1119
|
* @property {number} initialSegmentLimit
|
|
1020
1120
|
* The maximum number of initial segments to generate for
|
|
1021
1121
|
* <code>SegmentTemplate</code> with fixed-duration segments. This is limited
|
|
1022
1122
|
* to avoid excessive memory consumption with very large
|
|
1023
1123
|
* <code>timeShiftBufferDepth</code> values.
|
|
1124
|
+
* <br>
|
|
1125
|
+
* Defaults to <code>1000</code>.
|
|
1024
1126
|
* @property {boolean} ignoreSuggestedPresentationDelay
|
|
1025
1127
|
* If true will cause DASH parser to ignore
|
|
1026
|
-
* <code>suggestedPresentationDelay</code> from manifest.
|
|
1027
|
-
* <
|
|
1128
|
+
* <code>suggestedPresentationDelay</code> from manifest.
|
|
1129
|
+
* <br>
|
|
1130
|
+
* Defaults to <code>false</code>.
|
|
1028
1131
|
* @property {boolean} ignoreEmptyAdaptationSet
|
|
1029
1132
|
* If true will cause DASH parser to ignore
|
|
1030
|
-
* empty <code>AdaptationSet</code> from manifest.
|
|
1031
|
-
* <
|
|
1133
|
+
* empty <code>AdaptationSet</code> from manifest.
|
|
1134
|
+
* <br>
|
|
1135
|
+
* Defaults to <code>false</code>.
|
|
1032
1136
|
* @property {boolean} ignoreMaxSegmentDuration
|
|
1033
1137
|
* If true will cause DASH parser to ignore
|
|
1034
|
-
* <code>maxSegmentDuration</code> from manifest.
|
|
1035
|
-
* <
|
|
1138
|
+
* <code>maxSegmentDuration</code> from manifest.
|
|
1139
|
+
* <br>
|
|
1140
|
+
* Defaults to <code>false</code>.
|
|
1036
1141
|
* @property {Object.<string, string>} keySystemsByURI
|
|
1037
1142
|
* A map of scheme URI to key system name. Defaults to default key systems
|
|
1038
1143
|
* mapping handled by Shaka.
|
|
@@ -1048,11 +1153,13 @@ shaka.extern.xml.Node;
|
|
|
1048
1153
|
* @property {boolean} sequenceMode
|
|
1049
1154
|
* If true, the media segments are appended to the SourceBuffer in
|
|
1050
1155
|
* "sequence mode" (ignoring their internal timestamps).
|
|
1051
|
-
* <
|
|
1156
|
+
* <br>
|
|
1157
|
+
* Defaults to <code>false</code>.
|
|
1052
1158
|
* @property {boolean} enableAudioGroups
|
|
1053
1159
|
* If set, audio streams will be grouped and filtered by their parent
|
|
1054
1160
|
* adaptation set ID.
|
|
1055
|
-
* <
|
|
1161
|
+
* <br>
|
|
1162
|
+
* Defaults to <code>false</code>.
|
|
1056
1163
|
* @property {boolean} multiTypeVariantsAllowed
|
|
1057
1164
|
* If true, the manifest parser will create variants that have multiple
|
|
1058
1165
|
* mimeTypes or codecs for video or for audio if there is no other choice.
|
|
@@ -1062,21 +1169,25 @@ shaka.extern.xml.Node;
|
|
|
1062
1169
|
* not match the main content.
|
|
1063
1170
|
* Might result in undesirable behavior if mediaSource.codecSwitchingStrategy
|
|
1064
1171
|
* is not set to SMOOTH.
|
|
1172
|
+
* <br>
|
|
1065
1173
|
* Defaults to true if SMOOTH codec switching is supported, RELOAD overwise.
|
|
1066
1174
|
* @property {boolean} useStreamOnceInPeriodFlattening
|
|
1067
1175
|
* If period combiner is used, this option ensures every stream is used
|
|
1068
1176
|
* only once in period flattening. It speeds up underlying algorithm
|
|
1069
1177
|
* but may raise issues if manifest does not have stream consistency
|
|
1070
1178
|
* between periods.
|
|
1179
|
+
* <br>
|
|
1071
1180
|
* Defaults to <code>false</code>.
|
|
1072
1181
|
* @property {number} updatePeriod
|
|
1073
1182
|
* Override the minimumUpdatePeriod of the manifest. The value is in second
|
|
1074
1183
|
* if the value is greater than the minimumUpdatePeriod, it will update the
|
|
1075
1184
|
* manifest less frequently. if you update the value during for a dynamic
|
|
1076
1185
|
* manifest, it will directly trigger a new download of the manifest
|
|
1186
|
+
* <br>
|
|
1077
1187
|
* Defaults to <code>-1</code>.
|
|
1078
1188
|
* @property {boolean} enableFastSwitching
|
|
1079
1189
|
* If false, disables fast switching track recognition.
|
|
1190
|
+
* <br>
|
|
1080
1191
|
* Defaults to <code>true</code>.
|
|
1081
1192
|
* @exportDoc
|
|
1082
1193
|
*/
|
|
@@ -1092,7 +1203,6 @@ shaka.extern.DashManifestConfiguration;
|
|
|
1092
1203
|
* ignoreManifestProgramDateTime: boolean,
|
|
1093
1204
|
* ignoreManifestProgramDateTimeForTypes: !Array<string>,
|
|
1094
1205
|
* mediaPlaylistFullMimeType: string,
|
|
1095
|
-
* useSafariBehaviorForLive: boolean,
|
|
1096
1206
|
* liveSegmentsDelay: number,
|
|
1097
1207
|
* sequenceMode: boolean,
|
|
1098
1208
|
* ignoreManifestTimestampsInSegmentsMode: boolean,
|
|
@@ -1104,22 +1214,29 @@ shaka.extern.DashManifestConfiguration;
|
|
|
1104
1214
|
* @property {boolean} ignoreTextStreamFailures
|
|
1105
1215
|
* If <code>true</code>, ignore any errors in a text stream and filter out
|
|
1106
1216
|
* those streams.
|
|
1217
|
+
* <br>
|
|
1218
|
+
* Defaults to <code>false</code>.
|
|
1107
1219
|
* @property {boolean} ignoreImageStreamFailures
|
|
1108
1220
|
* If <code>true</code>, ignore any errors in a image stream and filter out
|
|
1109
1221
|
* those streams.
|
|
1222
|
+
* <br>
|
|
1223
|
+
* Defaults to <code>false</code>.
|
|
1110
1224
|
* @property {string} defaultAudioCodec
|
|
1111
1225
|
* The default audio codec if it is not specified in the HLS playlist.
|
|
1112
|
-
* <
|
|
1226
|
+
* <br>
|
|
1227
|
+
* Defaults to <code>'mp4a.40.2'</code>.
|
|
1113
1228
|
* @property {string} defaultVideoCodec
|
|
1114
1229
|
* The default video codec if it is not specified in the HLS playlist.
|
|
1115
|
-
* <
|
|
1230
|
+
* <br>
|
|
1231
|
+
* Defaults to <code>'avc1.42E01E'</code>.
|
|
1116
1232
|
* @property {boolean} ignoreManifestProgramDateTime
|
|
1117
1233
|
* If <code>true</code>, the HLS parser will ignore the
|
|
1118
1234
|
* <code>EXT-X-PROGRAM-DATE-TIME</code> tags in the manifest and use media
|
|
1119
1235
|
* sequence numbers instead. It also causes EXT-X-DATERANGE tags to be
|
|
1120
1236
|
* ignored. Meant for streams where <code>EXT-X-PROGRAM-DATE-TIME</code> is
|
|
1121
1237
|
* incorrect or malformed.
|
|
1122
|
-
* <
|
|
1238
|
+
* <br>
|
|
1239
|
+
* Defaults to <code>false</code>.
|
|
1123
1240
|
* @property {!Array.<string>} ignoreManifestProgramDateTimeForTypes
|
|
1124
1241
|
* An array of strings representing types for which
|
|
1125
1242
|
* <code>EXT-X-PROGRAM-DATE-TIME</code> should be ignored. Only used if the
|
|
@@ -1127,7 +1244,8 @@ shaka.extern.DashManifestConfiguration;
|
|
|
1127
1244
|
* For example, setting this to ['text', 'video'] will cause the PDT values
|
|
1128
1245
|
* text and video streams to be ignored, while still using the PDT values for
|
|
1129
1246
|
* audio.
|
|
1130
|
-
* <
|
|
1247
|
+
* <br>
|
|
1248
|
+
* Defaults to <code>[]</code>.
|
|
1131
1249
|
* @property {string} mediaPlaylistFullMimeType
|
|
1132
1250
|
* A string containing a full mime type, including both the basic mime type
|
|
1133
1251
|
* and also the codecs. Used when the HLS parser parses a media playlist
|
|
@@ -1135,21 +1253,17 @@ shaka.extern.DashManifestConfiguration;
|
|
|
1135
1253
|
* contained within the master playlist.
|
|
1136
1254
|
* You can use the <code>shaka.util.MimeUtils.getFullType()</code> utility to
|
|
1137
1255
|
* format this value.
|
|
1138
|
-
* <
|
|
1139
|
-
* <code>'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'</code
|
|
1140
|
-
* @property {boolean} useSafariBehaviorForLive
|
|
1141
|
-
* If this is true, playback will set the availability window to the
|
|
1142
|
-
* presentation delay. The player will be able to buffer ahead three
|
|
1143
|
-
* segments, but the seek window will be zero-sized, to be consistent with
|
|
1144
|
-
* Safari. If this is false, the seek window will be the entire duration.
|
|
1145
|
-
* <i>Defaults to <code>true</code>.</i>
|
|
1256
|
+
* <br>
|
|
1257
|
+
* Defaults to <code>'video/mp2t; codecs="avc1.42E01E, mp4a.40.2"'</code>.
|
|
1146
1258
|
* @property {number} liveSegmentsDelay
|
|
1147
1259
|
* The default presentation delay will be calculated as a number of segments.
|
|
1148
|
-
* This is the number of segments for this calculation
|
|
1149
|
-
* <
|
|
1260
|
+
* This is the number of segments for this calculation.
|
|
1261
|
+
* <br>
|
|
1262
|
+
* Defaults to <code>3</code>.
|
|
1150
1263
|
* @property {boolean} sequenceMode
|
|
1151
1264
|
* If true, the media segments are appended to the SourceBuffer in
|
|
1152
1265
|
* "sequence mode" (ignoring their internal timestamps).
|
|
1266
|
+
* <br>
|
|
1153
1267
|
* Defaults to <code>true</code> except on WebOS 3, Tizen 2,
|
|
1154
1268
|
* Tizen 3 and PlayStation 4 whose default value is <code>false</code>.
|
|
1155
1269
|
* @property {boolean} ignoreManifestTimestampsInSegmentsMode
|
|
@@ -1158,24 +1272,28 @@ shaka.extern.DashManifestConfiguration;
|
|
|
1158
1272
|
* words, assume that there are no gaps in the segments when appending
|
|
1159
1273
|
* to the SourceBuffer, even if the manifest and segment times disagree.
|
|
1160
1274
|
* Only applies when sequenceMode is <code>false</code>.
|
|
1161
|
-
* <
|
|
1275
|
+
* <br>
|
|
1276
|
+
* Defaults to <code>false</code>.
|
|
1162
1277
|
* @property {boolean} disableCodecGuessing
|
|
1163
1278
|
* If set to true, the HLS parser won't automatically guess or assume default
|
|
1164
1279
|
* codec for playlists with no "CODECS" attribute. Instead, it will attempt to
|
|
1165
1280
|
* extract the missing information from the media segment.
|
|
1166
1281
|
* As a consequence, lazy-loading media playlists won't be possible for this
|
|
1167
1282
|
* use case, which may result in longer video startup times.
|
|
1168
|
-
* <
|
|
1283
|
+
* <br>
|
|
1284
|
+
* Defaults to <code>false</code>.
|
|
1169
1285
|
* @property {boolean} disableClosedCaptionsDetection
|
|
1170
1286
|
* If true, disables the automatic detection of closed captions.
|
|
1171
1287
|
* Otherwise, in the absence of a EXT-X-MEDIA tag with TYPE="CLOSED-CAPTIONS",
|
|
1172
1288
|
* Shaka Player will attempt to detect captions based on the media data.
|
|
1173
|
-
* <
|
|
1289
|
+
* <br>
|
|
1290
|
+
* Defaults to <code>false</code>.
|
|
1174
1291
|
* @property {boolean} allowLowLatencyByteRangeOptimization
|
|
1175
1292
|
* If set to true, the HLS parser will optimize operation with LL and partial
|
|
1176
1293
|
* byte range segments. More info in
|
|
1177
1294
|
* https://www.akamai.com/blog/performance/-using-ll-hls-with-byte-range-addressing-to-achieve-interoperabi
|
|
1178
|
-
* <
|
|
1295
|
+
* <br>
|
|
1296
|
+
* Defaults to <code>true</code>.
|
|
1179
1297
|
* @exportDoc
|
|
1180
1298
|
*/
|
|
1181
1299
|
shaka.extern.HlsManifestConfiguration;
|
|
@@ -1201,7 +1319,8 @@ shaka.extern.HlsManifestConfiguration;
|
|
|
1201
1319
|
* @property {boolean} sequenceMode
|
|
1202
1320
|
* If true, the media segments are appended to the SourceBuffer in
|
|
1203
1321
|
* "sequence mode" (ignoring their internal timestamps).
|
|
1204
|
-
* <
|
|
1322
|
+
* <br>
|
|
1323
|
+
* Defaults to <code>false</code>.
|
|
1205
1324
|
* @property {Object.<string, string>} keySystemsBySystemId
|
|
1206
1325
|
* A map of system id to key system name. Defaults to default key systems
|
|
1207
1326
|
* mapping handled by Shaka.
|
|
@@ -1234,29 +1353,37 @@ shaka.extern.MssManifestConfiguration;
|
|
|
1234
1353
|
* manifest, or <code>NaN</code> if the default value should be used. This is
|
|
1235
1354
|
* enforced by the manifest parser, so custom manifest parsers should take
|
|
1236
1355
|
* care to honor this parameter.
|
|
1356
|
+
* <br>
|
|
1357
|
+
* Defaults to <code>NaN</code>.
|
|
1237
1358
|
* @property {boolean} disableAudio
|
|
1238
1359
|
* If <code>true</code>, the audio tracks are ignored.
|
|
1360
|
+
* <br>
|
|
1239
1361
|
* Defaults to <code>false</code>.
|
|
1240
1362
|
* @property {boolean} disableVideo
|
|
1241
1363
|
* If <code>true</code>, the video tracks are ignored.
|
|
1364
|
+
* <br>
|
|
1242
1365
|
* Defaults to <code>false</code>.
|
|
1243
1366
|
* @property {boolean} disableText
|
|
1244
1367
|
* If <code>true</code>, the text tracks are ignored.
|
|
1368
|
+
* <br>
|
|
1245
1369
|
* Defaults to <code>false</code>.
|
|
1246
1370
|
* @property {boolean} disableThumbnails
|
|
1247
1371
|
* If <code>true</code>, the image tracks are ignored.
|
|
1372
|
+
* <br>
|
|
1248
1373
|
* Defaults to <code>false</code>.
|
|
1249
1374
|
* @property {number} defaultPresentationDelay
|
|
1250
|
-
* A default <code>presentationDelay</code> value.
|
|
1251
1375
|
* For DASH, it's a default <code>presentationDelay</code> value if
|
|
1252
1376
|
* <code>suggestedPresentationDelay</code> is missing in the MPEG DASH
|
|
1253
1377
|
* manifest. The default value is <code>1.5 * minBufferTime</code> if not
|
|
1254
1378
|
* configured or set as 0.
|
|
1255
1379
|
* For HLS, the default value is 3 segments duration if not configured or
|
|
1256
1380
|
* set as 0.
|
|
1381
|
+
* <br>
|
|
1382
|
+
* Defaults to <code>0</code>.
|
|
1257
1383
|
* @property {boolean} segmentRelativeVttTiming
|
|
1258
1384
|
* Option to calculate VTT text timings relative to the segment start
|
|
1259
1385
|
* instead of relative to the period start (which is the default).
|
|
1386
|
+
* <br>
|
|
1260
1387
|
* Defaults to <code>false</code>.
|
|
1261
1388
|
* @property {shaka.extern.DashManifestConfiguration} dash
|
|
1262
1389
|
* Advanced parameters used by the DASH manifest parser.
|
|
@@ -1266,11 +1393,13 @@ shaka.extern.MssManifestConfiguration;
|
|
|
1266
1393
|
* Advanced parameters used by the MSS manifest parser.
|
|
1267
1394
|
* @property {boolean} raiseFatalErrorOnManifestUpdateRequestFailure
|
|
1268
1395
|
* If true, manifest update request failures will cause a fatal error.
|
|
1269
|
-
*
|
|
1396
|
+
* <br>
|
|
1397
|
+
* Defaults to <code>false</code>.
|
|
1270
1398
|
* @property {boolean} continueLoadingWhenPaused
|
|
1271
1399
|
* If true, live manifest will be updated with the regular intervals even if
|
|
1272
1400
|
* the video is paused.
|
|
1273
|
-
*
|
|
1401
|
+
* <br>
|
|
1402
|
+
* Defaults to <code>true</code>.
|
|
1274
1403
|
* @exportDoc
|
|
1275
1404
|
*/
|
|
1276
1405
|
shaka.extern.ManifestConfiguration;
|
|
@@ -1294,25 +1423,35 @@ shaka.extern.ManifestConfiguration;
|
|
|
1294
1423
|
* when playback is stable (see <code>stabilityThreshold</code>). If
|
|
1295
1424
|
* there are rebuffering events, then the target latency will move towards
|
|
1296
1425
|
* the max latency value in increments of <code>rebufferIncrement</code>.
|
|
1297
|
-
*
|
|
1426
|
+
* <br>
|
|
1427
|
+
* Defaults to <code>false</code>
|
|
1298
1428
|
* @property {number} rebufferIncrement
|
|
1299
1429
|
* The value, in seconds, to increment the target latency towards
|
|
1300
|
-
* <code>maxLatency</code> after a rebuffering event.
|
|
1301
|
-
* <
|
|
1430
|
+
* <code>maxLatency</code> after a rebuffering event.
|
|
1431
|
+
* <br>
|
|
1432
|
+
* Defaults to <code>0.5</code>
|
|
1302
1433
|
* @property {number} stabilityThreshold
|
|
1303
1434
|
* Number of seconds after a rebuffering before we are considered stable and
|
|
1304
1435
|
* will move the target latency towards <code>minLatency</code>
|
|
1305
|
-
* value.
|
|
1436
|
+
* value.
|
|
1437
|
+
* <br>
|
|
1438
|
+
* Defaults to <code>60</code>.
|
|
1306
1439
|
* @property {number} maxAttempts
|
|
1307
1440
|
* Number of times that dynamic target latency will back off to
|
|
1308
1441
|
* <code>maxLatency</code> and attempt to adjust it closer to
|
|
1309
|
-
* <code>minLatency</code>.
|
|
1442
|
+
* <code>minLatency</code>.
|
|
1443
|
+
* <br>
|
|
1444
|
+
* Defaults to <code>10</code>.
|
|
1310
1445
|
* @property {number} maxLatency
|
|
1311
1446
|
* The latency to use when a rebuffering event causes us to back off from
|
|
1312
|
-
* the live edge.
|
|
1447
|
+
* the live edge.
|
|
1448
|
+
* <br>
|
|
1449
|
+
* Defaults to <code>4</code>.
|
|
1313
1450
|
* @property {number} minLatency
|
|
1314
1451
|
* The latency to work towards when the network is stable and we want to get
|
|
1315
|
-
* closer to the live edge.
|
|
1452
|
+
* closer to the live edge.
|
|
1453
|
+
* <br>
|
|
1454
|
+
* Defaults to <code>1</code>.
|
|
1316
1455
|
* @exportDoc
|
|
1317
1456
|
*/
|
|
1318
1457
|
shaka.extern.DynamicTargetLatencyConfiguration;
|
|
@@ -1335,31 +1474,41 @@ shaka.extern.DynamicTargetLatencyConfiguration;
|
|
|
1335
1474
|
*
|
|
1336
1475
|
* @property {boolean} enabled
|
|
1337
1476
|
* Enable the live stream sync against the live edge by changing the playback
|
|
1338
|
-
* rate.
|
|
1477
|
+
* rate.
|
|
1339
1478
|
* Note: on some SmartTVs, if this is activated, it may not work or the sound
|
|
1340
1479
|
* may be lost when activated.
|
|
1480
|
+
* <br>
|
|
1481
|
+
* Defaults to <code>false</code>.
|
|
1341
1482
|
* @property {number} targetLatency
|
|
1342
1483
|
* Preferred latency, in seconds. Effective only if liveSync is true.
|
|
1484
|
+
* <br>
|
|
1343
1485
|
* Defaults to <code>0.5</code>.
|
|
1344
1486
|
* @property {number} targetLatencyTolerance
|
|
1345
1487
|
* Latency tolerance for target latency, in seconds. Effective only if
|
|
1346
|
-
* liveSync is enabled.
|
|
1488
|
+
* liveSync is enabled.
|
|
1489
|
+
* <br>
|
|
1490
|
+
* Defaults to <code>0.5</code>.
|
|
1347
1491
|
* @property {number} maxPlaybackRate
|
|
1348
1492
|
* Max playback rate used for latency chasing. It is recommended to use a
|
|
1349
|
-
* value between 1 and 2. Effective only if liveSync is enabled.
|
|
1350
|
-
* <
|
|
1493
|
+
* value between 1 and 2. Effective only if liveSync is enabled.
|
|
1494
|
+
* <br>
|
|
1495
|
+
* Defaults to <code>1.1</code>.
|
|
1351
1496
|
* @property {number} minPlaybackRate
|
|
1352
1497
|
* Minimum playback rate used for latency chasing. It is recommended to use a
|
|
1353
|
-
* value between 0 and 1. Effective only if liveSync is enabled.
|
|
1354
|
-
* <
|
|
1498
|
+
* value between 0 and 1. Effective only if liveSync is enabled.
|
|
1499
|
+
* <br>
|
|
1500
|
+
* Defaults to <code>0.95</code>.
|
|
1355
1501
|
* @property {boolean} panicMode
|
|
1356
1502
|
* If <code>true</code>, panic mode for live sync is enabled. When enabled,
|
|
1357
1503
|
* will set the playback rate to the <code>minPlaybackRate</code>
|
|
1358
1504
|
* until playback has continued past a rebuffering for longer than the
|
|
1359
|
-
* <code>panicThreshold</code>.
|
|
1505
|
+
* <code>panicThreshold</code>.
|
|
1506
|
+
* <br>
|
|
1507
|
+
* Defaults to <code>false</code>.
|
|
1360
1508
|
* @property {number} panicThreshold
|
|
1361
1509
|
* Number of seconds that playback stays in panic mode after a rebuffering.
|
|
1362
|
-
*
|
|
1510
|
+
* <br>
|
|
1511
|
+
* Defaults to <code>60</code>.
|
|
1363
1512
|
* @property {shaka.extern.DynamicTargetLatencyConfiguration}
|
|
1364
1513
|
* dynamicTargetLatency
|
|
1365
1514
|
*
|
|
@@ -1395,6 +1544,7 @@ shaka.extern.LiveSyncConfiguration;
|
|
|
1395
1544
|
* autoLowLatencyMode: boolean,
|
|
1396
1545
|
* forceHTTP: boolean,
|
|
1397
1546
|
* forceHTTPS: boolean,
|
|
1547
|
+
* minBytesForProgressEvents: number,
|
|
1398
1548
|
* preferNativeHls: boolean,
|
|
1399
1549
|
* updateIntervalSeconds: number,
|
|
1400
1550
|
* dispatchAllEmsgBoxes: boolean,
|
|
@@ -1433,21 +1583,31 @@ shaka.extern.LiveSyncConfiguration;
|
|
|
1433
1583
|
* buffer before it can begin playback or can continue playback after it has
|
|
1434
1584
|
* entered into a buffering state (i.e., after it has depleted one more
|
|
1435
1585
|
* more of its buffers).
|
|
1586
|
+
* <br>
|
|
1587
|
+
* Defaults to <code>2</code>.
|
|
1436
1588
|
* @property {number} bufferingGoal
|
|
1437
1589
|
* The number of seconds of content that the StreamingEngine will attempt to
|
|
1438
1590
|
* buffer ahead of the playhead. This value must be greater than or equal to
|
|
1439
1591
|
* the rebuffering goal.
|
|
1592
|
+
* <br>
|
|
1593
|
+
* Defaults to <code>10</code>.
|
|
1440
1594
|
* @property {number} bufferBehind
|
|
1441
1595
|
* The maximum number of seconds of content that the StreamingEngine will keep
|
|
1442
1596
|
* in buffer behind the playhead when it appends a new media segment.
|
|
1443
1597
|
* The StreamingEngine will evict content to meet this limit.
|
|
1598
|
+
* <br>
|
|
1599
|
+
* Defaults to <code>30</code>.
|
|
1444
1600
|
* @property {number} evictionGoal
|
|
1445
1601
|
* The minimum duration in seconds of buffer overflow the StreamingEngine
|
|
1446
1602
|
* requires to start removing content from the buffer.
|
|
1447
1603
|
* Values less than <code>1.0</code> are not recommended.
|
|
1604
|
+
* <br>
|
|
1605
|
+
* Defaults to <code>1.0</code>.
|
|
1448
1606
|
* @property {boolean} ignoreTextStreamFailures
|
|
1449
1607
|
* If <code>true</code>, the player will ignore text stream failures and
|
|
1450
1608
|
* continue playing other streams.
|
|
1609
|
+
* <br>
|
|
1610
|
+
* Defaults to <code>false</code>.
|
|
1451
1611
|
* @property {boolean} alwaysStreamText
|
|
1452
1612
|
* If <code>true</code>, always stream text tracks, regardless of whether or
|
|
1453
1613
|
* not they are shown. This is necessary when using the browser's built-in
|
|
@@ -1457,153 +1617,211 @@ shaka.extern.LiveSyncConfiguration;
|
|
|
1457
1617
|
* @property {boolean} startAtSegmentBoundary
|
|
1458
1618
|
* If <code>true</code>, adjust the start time backwards so it is at the start
|
|
1459
1619
|
* of a segment. This affects both explicit start times and calculated start
|
|
1460
|
-
* time for live streams. This can put us further from the live edge.
|
|
1461
|
-
*
|
|
1620
|
+
* time for live streams. This can put us further from the live edge.
|
|
1621
|
+
* <br>
|
|
1622
|
+
* Defaults to <code>false</code>.
|
|
1462
1623
|
* @property {number} gapDetectionThreshold
|
|
1463
1624
|
* The maximum distance (in seconds) before a gap when we'll automatically
|
|
1464
|
-
* jump.
|
|
1625
|
+
* jump.
|
|
1626
|
+
* <br>
|
|
1627
|
+
* Defaults to <code>0.5</code>.
|
|
1465
1628
|
* @property {number} gapJumpTimerTime
|
|
1466
|
-
* The polling time in seconds to check for gaps in the media.
|
|
1467
|
-
*
|
|
1629
|
+
* The polling time in seconds to check for gaps in the media.
|
|
1630
|
+
* <br>
|
|
1631
|
+
* Defaults to <code>0.25</code>.
|
|
1468
1632
|
* @property {number} durationBackoff
|
|
1469
1633
|
* By default, we will not allow seeking to exactly the duration of a
|
|
1470
1634
|
* presentation. This field is the number of seconds before duration we will
|
|
1471
1635
|
* seek to when the user tries to seek to or start playback at the duration.
|
|
1472
1636
|
* To disable this behavior, the config can be set to 0. We recommend using
|
|
1473
1637
|
* the default value unless you have a good reason not to.
|
|
1638
|
+
* <br>
|
|
1639
|
+
* Defaults to <code>1</code>.
|
|
1474
1640
|
* @property {number} safeSeekOffset
|
|
1475
1641
|
* The amount of seconds that should be added when repositioning the playhead
|
|
1476
1642
|
* after falling out of the availability window or seek. This gives the player
|
|
1477
1643
|
* more time to buffer before falling outside again, but increases the forward
|
|
1478
1644
|
* jump in the stream skipping more content. This is helpful for lower
|
|
1479
|
-
* bandwidth scenarios.
|
|
1645
|
+
* bandwidth scenarios.
|
|
1646
|
+
* <br>
|
|
1647
|
+
* Defaults to <code>5</code>.
|
|
1480
1648
|
* @property {boolean} stallEnabled
|
|
1481
1649
|
* When set to <code>true</code>, the stall detector logic will run. If the
|
|
1482
1650
|
* playhead stops moving for <code>stallThreshold</code> seconds, the player
|
|
1483
1651
|
* will either seek or pause/play to resolve the stall, depending on the value
|
|
1484
1652
|
* of <code>stallSkip</code>.
|
|
1653
|
+
* <br>
|
|
1654
|
+
* Defaults to <code>true</code>.
|
|
1485
1655
|
* @property {number} stallThreshold
|
|
1486
1656
|
* The maximum number of seconds that may elapse without the playhead moving
|
|
1487
1657
|
* (when playback is expected) before it will be labeled as a stall.
|
|
1658
|
+
* <br>
|
|
1659
|
+
* Defaults to <code>1</code>.
|
|
1488
1660
|
* @property {number} stallSkip
|
|
1489
1661
|
* The number of seconds that the player will skip forward when a stall has
|
|
1490
1662
|
* been detected. If 0, the player will pause and immediately play instead of
|
|
1491
1663
|
* seeking. A value of 0 is recommended and provided as default on TV
|
|
1492
1664
|
* platforms (WebOS, Tizen, Chromecast, etc).
|
|
1665
|
+
* <br>
|
|
1666
|
+
* Defaults to <code>0.1</code> except on Tizen, WebOS, Chromecast,
|
|
1667
|
+
* Hisense whose default value is <code>0</code>.
|
|
1493
1668
|
* @property {boolean} useNativeHlsForFairPlay
|
|
1494
1669
|
* Desktop Safari has both MediaSource and their native HLS implementation.
|
|
1495
1670
|
* Depending on the application's needs, it may prefer one over the other.
|
|
1496
1671
|
* Warning when disabled: Where single-key DRM streams work fine, multi-keys
|
|
1497
1672
|
* streams is showing unexpected behaviours (stall, audio playing with video
|
|
1498
1673
|
* freezes, ...). Use with care.
|
|
1674
|
+
* <br>
|
|
1499
1675
|
* Defaults to <code>true</code>.
|
|
1500
1676
|
* @property {number} inaccurateManifestTolerance
|
|
1501
1677
|
* The maximum difference, in seconds, between the times in the manifest and
|
|
1502
1678
|
* the times in the segments. Larger values allow us to compensate for more
|
|
1503
1679
|
* drift (up to one segment duration). Smaller values reduce the incidence of
|
|
1504
1680
|
* extra segment requests necessary to compensate for drift.
|
|
1681
|
+
* <br>
|
|
1682
|
+
* Defaults to <code>2</code>.
|
|
1505
1683
|
* @property {boolean} lowLatencyMode
|
|
1506
1684
|
* If <code>true</code>, low latency streaming mode is enabled. If
|
|
1507
1685
|
* lowLatencyMode is set to true, it changes the default config values for
|
|
1508
1686
|
* other things, see: docs/tutorials/config.md
|
|
1687
|
+
* <br>
|
|
1688
|
+
* Defaults to <code>false</code>.
|
|
1509
1689
|
* @property {boolean} autoLowLatencyMode
|
|
1510
1690
|
* If the stream is low latency and the user has not configured the
|
|
1511
1691
|
* lowLatencyMode, but if it has been configured to activate the
|
|
1512
1692
|
* lowLatencyMode if a stream of this type is detected, we automatically
|
|
1513
|
-
* activate the lowLatencyMode.
|
|
1693
|
+
* activate the lowLatencyMode.
|
|
1694
|
+
* <br>
|
|
1695
|
+
* Defaults to <code>false</code>.
|
|
1514
1696
|
* @property {boolean} forceHTTP
|
|
1515
1697
|
* If true, if the protocol is HTTPs change it to HTTP.
|
|
1516
1698
|
* If both forceHTTP and forceHTTPS are set, forceHTTPS wins.
|
|
1699
|
+
* <br>
|
|
1700
|
+
* Defaults to <code>false</code>.
|
|
1517
1701
|
* @property {boolean} forceHTTPS
|
|
1518
1702
|
* If true, if the protocol is HTTP change it to HTTPs.
|
|
1519
1703
|
* If both forceHTTP and forceHTTPS are set, forceHTTPS wins.
|
|
1704
|
+
* <br>
|
|
1705
|
+
* Defaults to <code>false</code>.
|
|
1706
|
+
* @property {number} minBytesForProgressEvents
|
|
1707
|
+
* Defines minimum number of bytes that should be used to emit progress event,
|
|
1708
|
+
* if possible. To avoid issues around feeding ABR with request history, this
|
|
1709
|
+
* value should be greater than or equal to `abr.advanced.minBytes`.
|
|
1710
|
+
* By default equals 16e3 (the same value as `abr.advanced.minBytes`).
|
|
1520
1711
|
* @property {boolean} preferNativeHls
|
|
1521
1712
|
* If true, prefer native HLS playback when possible, regardless of platform.
|
|
1713
|
+
* <br>
|
|
1714
|
+
* Defaults to <code>false</code>.
|
|
1522
1715
|
* @property {number} updateIntervalSeconds
|
|
1523
1716
|
* The minimum number of seconds to see if the manifest has changes.
|
|
1717
|
+
* <br>
|
|
1718
|
+
* Defaults to <code>1</code>.
|
|
1524
1719
|
* @property {boolean} dispatchAllEmsgBoxes
|
|
1525
1720
|
* If true, all emsg boxes are parsed and dispatched.
|
|
1721
|
+
* <br>
|
|
1722
|
+
* Defaults to <code>false</code>.
|
|
1526
1723
|
* @property {boolean} observeQualityChanges
|
|
1527
1724
|
* If true, monitor media quality changes and emit
|
|
1528
1725
|
* <code>shaka.Player.MediaQualityChangedEvent</code>.
|
|
1726
|
+
* <br>
|
|
1727
|
+
* Defaults to <code>false</code>.
|
|
1529
1728
|
* @property {number} maxDisabledTime
|
|
1530
1729
|
* The maximum time a variant can be disabled when NETWORK HTTP_ERROR
|
|
1531
1730
|
* is reached, in seconds.
|
|
1532
1731
|
* If all variants are disabled this way, NETWORK HTTP_ERROR will be thrown.
|
|
1732
|
+
* <br>
|
|
1733
|
+
* Defaults to <code>30</code>.
|
|
1533
1734
|
* @property {boolean} parsePrftBox
|
|
1534
1735
|
* If <code>true</code>, will raise a shaka.extern.ProducerReferenceTime
|
|
1535
1736
|
* player event (event name 'prft').
|
|
1536
1737
|
* The event will be raised only once per playback session as program
|
|
1537
1738
|
* start date will not change, and would save parsing the segment multiple
|
|
1538
1739
|
* times needlessly.
|
|
1740
|
+
* <br>
|
|
1539
1741
|
* Defaults to <code>false</code>.
|
|
1540
1742
|
* @property {number} segmentPrefetchLimit
|
|
1541
1743
|
* The maximum number of segments for each active stream to be prefetched
|
|
1542
1744
|
* ahead of playhead in parallel.
|
|
1543
1745
|
* If <code>0</code>, the segments will be fetched sequentially.
|
|
1746
|
+
* <br>
|
|
1544
1747
|
* Defaults to <code>0</code>.
|
|
1545
1748
|
* @property {!Array<string>} prefetchAudioLanguages
|
|
1546
1749
|
* The audio languages to prefetch.
|
|
1547
|
-
*
|
|
1750
|
+
* <br>
|
|
1751
|
+
* Defaults to <code>[]</code>.
|
|
1548
1752
|
* @property {boolean} disableAudioPrefetch
|
|
1549
1753
|
* If set and prefetch limit is defined, it will prevent from prefetching data
|
|
1550
1754
|
* for audio.
|
|
1755
|
+
* <br>
|
|
1551
1756
|
* Defaults to <code>false</code>.
|
|
1552
1757
|
* @property {boolean} disableTextPrefetch
|
|
1553
1758
|
* If set and prefetch limit is defined, it will prevent from prefetching data
|
|
1554
1759
|
* for text.
|
|
1760
|
+
* <br>
|
|
1555
1761
|
* Defaults to <code>false</code>.
|
|
1556
1762
|
* @property {boolean} disableVideoPrefetch
|
|
1557
1763
|
* If set and prefetch limit is defined, it will prevent from prefetching data
|
|
1558
1764
|
* for video.
|
|
1765
|
+
* <br>
|
|
1559
1766
|
* Defaults to <code>false</code>.
|
|
1560
1767
|
* @property {shaka.extern.LiveSyncConfiguration} liveSync
|
|
1561
1768
|
* The live sync configuration for keeping near the live edge.
|
|
1562
1769
|
* @property {boolean} allowMediaSourceRecoveries
|
|
1563
1770
|
* Indicate if we should recover from VIDEO_ERROR resetting Media Source.
|
|
1771
|
+
* <br>
|
|
1564
1772
|
* Defaults to <code>true</code>.
|
|
1565
1773
|
* @property {number} minTimeBetweenRecoveries
|
|
1566
1774
|
* The minimum time between recoveries when VIDEO_ERROR is reached, in
|
|
1567
1775
|
* seconds.
|
|
1776
|
+
* <br>
|
|
1568
1777
|
* Defaults to <code>5</code>.
|
|
1569
1778
|
* @property {boolean} vodDynamicPlaybackRate
|
|
1570
|
-
* Adapt the playback rate of the player to keep the buffer full.
|
|
1571
|
-
* <
|
|
1779
|
+
* Adapt the playback rate of the player to keep the buffer full.
|
|
1780
|
+
* <br>
|
|
1781
|
+
* Defaults to <code>false</code>.
|
|
1572
1782
|
* @property {number} vodDynamicPlaybackRateLowBufferRate
|
|
1573
|
-
* Playback rate to use if the buffer is too small.
|
|
1574
|
-
* <
|
|
1783
|
+
* Playback rate to use if the buffer is too small.
|
|
1784
|
+
* <br>
|
|
1785
|
+
* Defaults to <code>0.95</code>.
|
|
1575
1786
|
* @property {number} vodDynamicPlaybackRateBufferRatio
|
|
1576
1787
|
* Ratio of the <code>bufferingGoal</code> as the low threshold for
|
|
1577
1788
|
* setting the playback rate to
|
|
1578
1789
|
* <code>vodDynamicPlaybackRateLowBufferRate</code>.
|
|
1790
|
+
* <br>
|
|
1579
1791
|
* Defaults to <code>0.5</code>.
|
|
1580
1792
|
* @property {boolean} infiniteLiveStreamDuration
|
|
1581
1793
|
* If <code>true</code>, the media source live duration
|
|
1582
1794
|
* set as a<code>Infinity</code>
|
|
1583
|
-
*
|
|
1795
|
+
* <br>
|
|
1796
|
+
* Defaults to <code>false</code>.
|
|
1584
1797
|
* @property {number} preloadNextUrlWindow
|
|
1585
1798
|
* The window of time at the end of the presentation to begin preloading the
|
|
1586
1799
|
* next URL, such as one specified by a urn:mpeg:dash:chaining:2016 element
|
|
1587
1800
|
* in DASH. Measured in seconds. If the value is 0, the next URL will not
|
|
1588
1801
|
* be preloaded at all.
|
|
1589
|
-
*
|
|
1802
|
+
* <br>
|
|
1803
|
+
* Defaults to <code>30</code>.
|
|
1590
1804
|
* @property {number} loadTimeout
|
|
1591
1805
|
* The maximum timeout to reject the load when using src= in case the content
|
|
1592
1806
|
* does not work correctly. Measured in seconds.
|
|
1593
|
-
*
|
|
1807
|
+
* <br>
|
|
1808
|
+
* Defaults to <code>30</code>.
|
|
1594
1809
|
* @property {boolean} clearDecodingCache
|
|
1595
1810
|
* Clears decodingInfo and MediaKeySystemAccess cache during player unload
|
|
1596
1811
|
* as these objects may become corrupt and cause issues during subsequent
|
|
1597
1812
|
* playbacks on some platforms.
|
|
1813
|
+
* <br>
|
|
1598
1814
|
* Defaults to <code>true</code> on PlayStation devices and to
|
|
1599
1815
|
* <code>false</code> on other devices.
|
|
1600
1816
|
* @property {boolean} dontChooseCodecs
|
|
1601
1817
|
* If true, we don't choose codecs in the player, and keep all the variants.
|
|
1818
|
+
* <br>
|
|
1602
1819
|
* Defaults to <code>false</code>.
|
|
1603
1820
|
* @property {boolean} shouldFixTimestampOffset
|
|
1604
1821
|
* If true, we will try to fix problems when the timestampOffset is less than
|
|
1605
1822
|
* the baseMediaDecodeTime. This only works when the manifest is DASH with
|
|
1606
1823
|
* MP4 segments.
|
|
1824
|
+
* <br>
|
|
1607
1825
|
* Defaults to <code>false</code> except on Tizen, WebOS whose default value
|
|
1608
1826
|
* is <code>true</code>.
|
|
1609
1827
|
* @exportDoc
|
|
@@ -1626,6 +1844,7 @@ shaka.extern.StreamingConfiguration;
|
|
|
1626
1844
|
* @property {shaka.config.CodecSwitchingStrategy} codecSwitchingStrategy
|
|
1627
1845
|
* Allow codec switching strategy. SMOOTH loading uses
|
|
1628
1846
|
* SourceBuffer.changeType. RELOAD uses cycling of MediaSource.
|
|
1847
|
+
* <br>
|
|
1629
1848
|
* Defaults to SMOOTH if SMOOTH codec switching is supported, RELOAD
|
|
1630
1849
|
* overwise.
|
|
1631
1850
|
* @property {function(string): string} addExtraFeaturesToSourceBuffer
|
|
@@ -1637,7 +1856,8 @@ shaka.extern.StreamingConfiguration;
|
|
|
1637
1856
|
* @property {boolean} forceTransmux
|
|
1638
1857
|
* If this is <code>true</code>, we will transmux AAC and TS content even if
|
|
1639
1858
|
* not strictly necessary for the assets to be played.
|
|
1640
|
-
*
|
|
1859
|
+
* <br>
|
|
1860
|
+
* Defaults to <code>false</code>.
|
|
1641
1861
|
* @property {boolean} insertFakeEncryptionInInit
|
|
1642
1862
|
* If true, will apply a work-around for non-encrypted init segments on
|
|
1643
1863
|
* encrypted content for some platforms.
|
|
@@ -1648,7 +1868,8 @@ shaka.extern.StreamingConfiguration;
|
|
|
1648
1868
|
* <code>false</code> to gain a few milliseconds on loading time and seek
|
|
1649
1869
|
* time.
|
|
1650
1870
|
* <br><br>
|
|
1651
|
-
*
|
|
1871
|
+
* <br>
|
|
1872
|
+
* Defaults to <code>true</code>.
|
|
1652
1873
|
* @property {shaka.extern.TextParser.ModifyCueCallback} modifyCueCallback
|
|
1653
1874
|
* A callback called for each cue after it is parsed, but right before it
|
|
1654
1875
|
* is appended to the presentation.
|
|
@@ -1672,17 +1893,20 @@ shaka.extern.MediaSourceConfiguration;
|
|
|
1672
1893
|
* If this is <code>true</code>, we create a custom playhead tracker for
|
|
1673
1894
|
* Client Side. This is useful because it allows you to implement the use of
|
|
1674
1895
|
* IMA on platforms that do not support multiple video elements.
|
|
1896
|
+
* <br>
|
|
1675
1897
|
* Defaults to <code>false</code> except on Tizen, WebOS, Chromecast,
|
|
1676
1898
|
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
|
1677
1899
|
* <code>true</code>.
|
|
1678
1900
|
* @property {boolean} skipPlayDetection
|
|
1679
1901
|
* If this is true, we will load Client Side ads without waiting for a play
|
|
1680
1902
|
* event.
|
|
1903
|
+
* <br>
|
|
1681
1904
|
* Defaults to <code>false</code> except on Tizen, WebOS, Chromecast,
|
|
1682
1905
|
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
|
1683
1906
|
* <code>true</code>.
|
|
1684
1907
|
* @property {boolean} supportsMultipleMediaElements
|
|
1685
1908
|
* If this is true, the browser supports multiple media elements.
|
|
1909
|
+
* <br>
|
|
1686
1910
|
* Defaults to <code>true</code> except on Tizen, WebOS, Chromecast,
|
|
1687
1911
|
* Hisense, PlayStation 4, PlayStation5, Xbox whose default value is
|
|
1688
1912
|
* <code>false</code>.
|
|
@@ -1708,20 +1932,26 @@ shaka.extern.AdsConfiguration;
|
|
|
1708
1932
|
* clearBufferSwitch: boolean,
|
|
1709
1933
|
* safeMarginSwitch: number,
|
|
1710
1934
|
* cacheLoadThreshold: number,
|
|
1711
|
-
* minTimeToSwitch: number
|
|
1935
|
+
* minTimeToSwitch: number,
|
|
1936
|
+
* preferNetworkInformationBandwidth: boolean
|
|
1712
1937
|
* }}
|
|
1713
1938
|
*
|
|
1714
1939
|
* @property {boolean} enabled
|
|
1715
|
-
* If true, enable adaptation by the current AbrManager.
|
|
1940
|
+
* If true, enable adaptation by the current AbrManager.
|
|
1941
|
+
* <br>
|
|
1942
|
+
* Defaults to <code>true</code>.
|
|
1716
1943
|
* @property {boolean} useNetworkInformation
|
|
1717
1944
|
* If true, use the Network Information API in the current AbrManager, if it
|
|
1718
1945
|
* is available in the browser environment. If the Network Information API is
|
|
1719
1946
|
* used, Shaka Player will ignore the defaultBandwidthEstimate config.
|
|
1720
|
-
*
|
|
1947
|
+
* <br>
|
|
1948
|
+
* Defaults to <code>true</code>.
|
|
1721
1949
|
* @property {number} defaultBandwidthEstimate
|
|
1722
1950
|
* The default bandwidth estimate to use if there is not enough data, in
|
|
1723
1951
|
* bit/sec. Only used if useNetworkInformation is false, or if the Network
|
|
1724
1952
|
* Information API is not available.
|
|
1953
|
+
* <br>
|
|
1954
|
+
* Defaults to <code>1e6</code>.
|
|
1725
1955
|
* @property {shaka.extern.Restrictions} restrictions
|
|
1726
1956
|
* The restrictions to apply to ABR decisions. These are "soft" restrictions.
|
|
1727
1957
|
* Any track that fails to meet these restrictions will not be selected
|
|
@@ -1733,48 +1963,69 @@ shaka.extern.AdsConfiguration;
|
|
|
1733
1963
|
* @property {number} switchInterval
|
|
1734
1964
|
* The minimum amount of time that must pass between switches, in
|
|
1735
1965
|
* seconds. This keeps us from changing too often and annoying the user.
|
|
1966
|
+
* <br>
|
|
1967
|
+
* Defaults to <code>8</code>.
|
|
1736
1968
|
* @property {number} bandwidthUpgradeTarget
|
|
1737
1969
|
* The fraction of the estimated bandwidth which we should try to use when
|
|
1738
1970
|
* upgrading.
|
|
1971
|
+
* <br>
|
|
1972
|
+
* Defaults to <code>0.85</code>.
|
|
1739
1973
|
* @property {number} bandwidthDowngradeTarget
|
|
1740
1974
|
* The largest fraction of the estimated bandwidth we should use. We should
|
|
1741
1975
|
* downgrade to avoid this.
|
|
1976
|
+
* <br>
|
|
1977
|
+
* Defaults to <code>0.95</code>.
|
|
1742
1978
|
* @property {shaka.extern.AdvancedAbrConfiguration} advanced
|
|
1743
1979
|
* Advanced ABR configuration
|
|
1744
1980
|
* @property {boolean} restrictToElementSize
|
|
1745
1981
|
* If true, restrict the quality to media element size.
|
|
1746
1982
|
* Note: The use of ResizeObserver is required for it to work properly. If
|
|
1747
1983
|
* true without ResizeObserver, it behaves as false.
|
|
1748
|
-
*
|
|
1984
|
+
* <br>
|
|
1985
|
+
* Defaults to <code>false</code>.
|
|
1749
1986
|
* @property {boolean} restrictToScreenSize
|
|
1750
1987
|
* If true, restrict the quality to screen size.
|
|
1751
|
-
*
|
|
1988
|
+
* <br>
|
|
1989
|
+
* Defaults to <code>false</code>.
|
|
1752
1990
|
* @property {boolean} ignoreDevicePixelRatio
|
|
1753
1991
|
* If true,device pixel ratio is ignored when restricting the quality to
|
|
1754
1992
|
* media element size or screen size.
|
|
1755
|
-
*
|
|
1993
|
+
* <br>
|
|
1994
|
+
* Defaults to <code>false</code>.
|
|
1756
1995
|
* @property {boolean} clearBufferSwitch
|
|
1757
1996
|
* If true, the buffer will be cleared during the switch.
|
|
1758
1997
|
* The default automatic behavior is false to have a smoother transition.
|
|
1759
1998
|
* On some device it's better to clear buffer.
|
|
1760
|
-
*
|
|
1999
|
+
* <br>
|
|
2000
|
+
* Defaults to <code>false</code>.
|
|
1761
2001
|
* @property {number} safeMarginSwitch
|
|
1762
2002
|
* Optional amount of buffer (in seconds) to
|
|
1763
2003
|
* retain when clearing the buffer during the automatic switch.
|
|
1764
2004
|
* Useful for switching variant quickly without causing a buffering event.
|
|
1765
|
-
*
|
|
2005
|
+
* Ignored if clearBuffer is false.
|
|
1766
2006
|
* Can cause hiccups on some browsers if chosen too small, e.g.
|
|
1767
2007
|
* The amount of two segments is a fair minimum to consider as safeMargin
|
|
1768
2008
|
* value.
|
|
2009
|
+
* <br>
|
|
2010
|
+
* Defaults to <code>o</code>.
|
|
1769
2011
|
* @property {number} cacheLoadThreshold
|
|
1770
2012
|
* Indicates the value in milliseconds from which a request is not
|
|
1771
2013
|
* considered cached.
|
|
2014
|
+
* <br>
|
|
1772
2015
|
* Defaults to <code>20</code>.
|
|
1773
2016
|
* @property {number} minTimeToSwitch
|
|
1774
2017
|
* Indicates the minimum time to change quality once the real bandwidth is
|
|
1775
2018
|
* available, in seconds. This time is only used on the first load.
|
|
2019
|
+
* <br>
|
|
1776
2020
|
* Defaults to <code>0</code> seconds except in Apple browsers whose default
|
|
1777
2021
|
* value is <code>0.5</code> seconds.
|
|
2022
|
+
* @property {boolean} preferNetworkInformationBandwidth
|
|
2023
|
+
* If true, use the Network Information API bandwidth estimation in the
|
|
2024
|
+
* current AbrManager, if it is available in the browser environment. This
|
|
2025
|
+
* way Shaka Player will never estimate the bandwidth and we will always
|
|
2026
|
+
* trust the information provided by the browser.
|
|
2027
|
+
* <br>
|
|
2028
|
+
* Defaults to <code>false</code>.
|
|
1778
2029
|
* @exportDoc
|
|
1779
2030
|
*/
|
|
1780
2031
|
shaka.extern.AbrConfiguration;
|
|
@@ -1791,20 +2042,28 @@ shaka.extern.AbrConfiguration;
|
|
|
1791
2042
|
* @property {number} minTotalBytes
|
|
1792
2043
|
* Minimum number of bytes sampled before we trust the estimate. If we have
|
|
1793
2044
|
* not sampled much data, our estimate may not be accurate enough to trust.
|
|
2045
|
+
* <br>
|
|
2046
|
+
* Defaults to <code>128e3</code>.
|
|
1794
2047
|
* @property {number} minBytes
|
|
1795
2048
|
* Minimum number of bytes, under which samples are discarded. Our models
|
|
1796
2049
|
* do not include latency information, so connection startup time (time to
|
|
1797
2050
|
* first byte) is considered part of the download time. Because of this, we
|
|
1798
2051
|
* should ignore very small downloads which would cause our estimate to be
|
|
1799
2052
|
* too low.
|
|
2053
|
+
* <br>
|
|
2054
|
+
* Defaults to <code>16e3</code>.
|
|
1800
2055
|
* @property {number} fastHalfLife
|
|
1801
2056
|
* The quantity of prior samples (by weight) used when creating a new
|
|
1802
2057
|
* estimate, in seconds. Those prior samples make up half of the
|
|
1803
2058
|
* new estimate.
|
|
2059
|
+
* <br>
|
|
2060
|
+
* Defaults to <code>2</code>.
|
|
1804
2061
|
* @property {number} slowHalfLife
|
|
1805
2062
|
* The quantity of prior samples (by weight) used when creating a new
|
|
1806
2063
|
* estimate, in seconds. Those prior samples make up half of the
|
|
1807
2064
|
* new estimate.
|
|
2065
|
+
* <br>
|
|
2066
|
+
* Defaults to <code>5</code>.
|
|
1808
2067
|
* @exportDoc
|
|
1809
2068
|
*/
|
|
1810
2069
|
shaka.extern.AdvancedAbrConfiguration;
|
|
@@ -1825,27 +2084,37 @@ shaka.extern.AdvancedAbrConfiguration;
|
|
|
1825
2084
|
*
|
|
1826
2085
|
* @property {boolean} enabled
|
|
1827
2086
|
* If <code>true</code>, enable CMCD data to be sent with media requests.
|
|
2087
|
+
* <br>
|
|
1828
2088
|
* Defaults to <code>false</code>.
|
|
1829
2089
|
* @property {boolean} useHeaders
|
|
1830
2090
|
* If <code>true</code>, send CMCD data using the header transmission mode
|
|
1831
|
-
* instead of query args.
|
|
2091
|
+
* instead of query args.
|
|
2092
|
+
* <br>
|
|
2093
|
+
* Defaults to <code>false</code>.
|
|
1832
2094
|
* @property {string} sessionId
|
|
1833
2095
|
* A GUID identifying the current playback session. A playback session
|
|
1834
2096
|
* typically ties together segments belonging to a single media asset.
|
|
1835
2097
|
* Maximum length is 64 characters. It is RECOMMENDED to conform to the UUID
|
|
1836
|
-
* specification.
|
|
2098
|
+
* specification.
|
|
2099
|
+
* <br>
|
|
2100
|
+
* By default the sessionId is automatically generated on each
|
|
1837
2101
|
* <code>load()</code> call.
|
|
1838
2102
|
* @property {string} contentId
|
|
1839
2103
|
* A unique string identifying the current content. Maximum length is 64
|
|
1840
2104
|
* characters. This value is consistent across multiple different sessions and
|
|
1841
2105
|
* devices and is defined and updated at the discretion of the service
|
|
1842
2106
|
* provider.
|
|
2107
|
+
* <br>
|
|
2108
|
+
* Defaults to <code>'false'</code>.
|
|
1843
2109
|
* @property {number} rtpSafetyFactor
|
|
1844
2110
|
* RTP safety factor.
|
|
2111
|
+
* <br>
|
|
1845
2112
|
* Defaults to <code>5</code>.
|
|
1846
2113
|
* @property {!Array<string>} includeKeys
|
|
1847
2114
|
* An array of keys to include in the CMCD data. If not provided, all keys
|
|
1848
2115
|
* will be included.
|
|
2116
|
+
* <br>
|
|
2117
|
+
* Defaults to <code>[]</code>.
|
|
1849
2118
|
* @exportDoc
|
|
1850
2119
|
*/
|
|
1851
2120
|
shaka.extern.CmcdConfiguration;
|
|
@@ -1863,14 +2132,17 @@ shaka.extern.CmcdConfiguration;
|
|
|
1863
2132
|
*
|
|
1864
2133
|
* @property {boolean} enabled
|
|
1865
2134
|
* If <code>true</code>, enables reading CMSD data in media requests.
|
|
2135
|
+
* <br>
|
|
1866
2136
|
* Defaults to <code>true</code>.
|
|
1867
2137
|
* @property {boolean} applyMaximumSuggestedBitrate
|
|
1868
2138
|
* If true, we must apply the maximum suggested bitrate. If false, we ignore
|
|
1869
2139
|
* this.
|
|
2140
|
+
* <br>
|
|
1870
2141
|
* Defaults to <code>true</code>.
|
|
1871
2142
|
* @property {number} estimatedThroughputWeightRatio
|
|
1872
2143
|
* How much the estimatedThroughput of the CMSD data should be weighted
|
|
1873
2144
|
* against the default estimate, between 0 and 1.
|
|
2145
|
+
* <br>
|
|
1874
2146
|
* Defaults to <code>0.5</code>.
|
|
1875
2147
|
* @exportDoc
|
|
1876
2148
|
*/
|
|
@@ -1900,6 +2172,7 @@ shaka.extern.CmsdConfiguration;
|
|
|
1900
2172
|
* decoding will be disabled for that playback session.
|
|
1901
2173
|
* If dynamicPerformanceScaling is false, LCEVC decode will be forced
|
|
1902
2174
|
* and will drop frames appropriately if performance is sub optimal.
|
|
2175
|
+
* <br>
|
|
1903
2176
|
* Defaults to <code>true</code>.
|
|
1904
2177
|
* @property {number} logLevel
|
|
1905
2178
|
* Loglevel 0-5 for logging.
|
|
@@ -1909,12 +2182,14 @@ shaka.extern.CmsdConfiguration;
|
|
|
1909
2182
|
* INFO = 3
|
|
1910
2183
|
* DEBUG = 4
|
|
1911
2184
|
* VERBOSE = 5
|
|
2185
|
+
* <br>
|
|
1912
2186
|
* Defaults to <code>0</code>.
|
|
1913
2187
|
* @property {boolean} drawLogo
|
|
1914
2188
|
* If <code>true</code>, LCEVC Logo is placed on the top left hand corner
|
|
1915
2189
|
* which only appears when the LCEVC enhanced frames are being rendered.
|
|
1916
2190
|
* Defaults to true for the lib but is forced to false in this integration
|
|
1917
2191
|
* unless explicitly set to true through config.
|
|
2192
|
+
* <br>
|
|
1918
2193
|
* Defaults to <code>false</code>.
|
|
1919
2194
|
* @exportDoc
|
|
1920
2195
|
*/
|
|
@@ -1949,11 +2224,13 @@ shaka.extern.LcevcConfiguration;
|
|
|
1949
2224
|
* If <code>false</code>, store protected content without a persistent
|
|
1950
2225
|
* license. A network will be required to retrieve a temporary license to
|
|
1951
2226
|
* view.
|
|
2227
|
+
* <br>
|
|
1952
2228
|
* Defaults to <code>true</code>.
|
|
1953
2229
|
* @property {number} numberOfParallelDownloads
|
|
1954
2230
|
* Number of parallel downloads.
|
|
1955
2231
|
* Note: normally browsers limit to 5 request in parallel, so putting a
|
|
1956
2232
|
* number higher than this will not help it download faster.
|
|
2233
|
+
* <br>
|
|
1957
2234
|
* Defaults to <code>5</code>.
|
|
1958
2235
|
* @exportDoc
|
|
1959
2236
|
*/
|
|
@@ -1970,6 +2247,7 @@ shaka.extern.OfflineConfiguration;
|
|
|
1970
2247
|
*
|
|
1971
2248
|
* @property {number} captionsUpdatePeriod
|
|
1972
2249
|
* The number of seconds to see if the captions should be updated.
|
|
2250
|
+
* <br>
|
|
1973
2251
|
* Defaults to <code>0.25</code>.
|
|
1974
2252
|
*
|
|
1975
2253
|
* @exportDoc
|
|
@@ -2016,6 +2294,9 @@ shaka.extern.TextDisplayerConfiguration;
|
|
|
2016
2294
|
* Ads configuration and settings.
|
|
2017
2295
|
* @property {shaka.config.AutoShowText} autoShowText
|
|
2018
2296
|
* Controls behavior of auto-showing text tracks on load().
|
|
2297
|
+
* <br>
|
|
2298
|
+
* Defaults to
|
|
2299
|
+
* {@link shaka.config.AutoShowText#IF_SUBTITLES_MAY_BE_NEEDED}.
|
|
2019
2300
|
* @property {shaka.extern.DrmConfiguration} drm
|
|
2020
2301
|
* DRM configuration and settings.
|
|
2021
2302
|
* @property {shaka.extern.ManifestConfiguration} manifest
|
|
@@ -2041,49 +2322,75 @@ shaka.extern.TextDisplayerConfiguration;
|
|
|
2041
2322
|
* The preferred language to use for audio tracks. If not given it will use
|
|
2042
2323
|
* the <code>'main'</code> track.
|
|
2043
2324
|
* Changing this during playback will not affect the current playback.
|
|
2325
|
+
* <br>
|
|
2326
|
+
* Defaults to <code>''</code>.
|
|
2044
2327
|
* @property {string} preferredAudioLabel
|
|
2045
|
-
* The preferred label to use for audio tracks
|
|
2328
|
+
* The preferred label to use for audio tracks.
|
|
2329
|
+
* <br>
|
|
2330
|
+
* Defaults to <code>''</code>.
|
|
2046
2331
|
* @property {string} preferredVideoLabel
|
|
2047
|
-
* The preferred label to use for video tracks
|
|
2332
|
+
* The preferred label to use for video tracks.
|
|
2333
|
+
* <br>
|
|
2334
|
+
* Defaults to <code>''</code>.
|
|
2048
2335
|
* @property {string} preferredTextLanguage
|
|
2049
2336
|
* The preferred language to use for text tracks. If a matching text track
|
|
2050
2337
|
* is found, and the selected audio and text tracks have different languages,
|
|
2051
2338
|
* the text track will be shown.
|
|
2052
2339
|
* Changing this during playback will not affect the current playback.
|
|
2340
|
+
* <br>
|
|
2341
|
+
* Defaults to <code>''</code>.
|
|
2053
2342
|
* @property {string} preferredVariantRole
|
|
2054
2343
|
* The preferred role to use for variants.
|
|
2344
|
+
* <br>
|
|
2345
|
+
* Defaults to <code>''</code>.
|
|
2055
2346
|
* @property {string} preferredTextRole
|
|
2056
2347
|
* The preferred role to use for text tracks.
|
|
2348
|
+
* <br>
|
|
2349
|
+
* Defaults to <code>''</code>.
|
|
2057
2350
|
* @property {!Array.<string>} preferredVideoCodecs
|
|
2058
2351
|
* The list of preferred video codecs, in order of highest to lowest priority.
|
|
2352
|
+
* <br>
|
|
2353
|
+
* Defaults to <code>[]</code>.
|
|
2059
2354
|
* @property {!Array.<string>} preferredAudioCodecs
|
|
2060
2355
|
* The list of preferred audio codecs, in order of highest to lowest priority.
|
|
2356
|
+
* <br>
|
|
2357
|
+
* Defaults to <code>[]</code>.
|
|
2061
2358
|
* @property {number} preferredAudioChannelCount
|
|
2062
2359
|
* The preferred number of audio channels.
|
|
2360
|
+
* <br>
|
|
2361
|
+
* Defaults to <code>2</code>.
|
|
2063
2362
|
* @property {string} preferredVideoHdrLevel
|
|
2064
2363
|
* The preferred HDR level of the video. If possible, this will cause the
|
|
2065
2364
|
* player to filter to assets that either have that HDR level, or no HDR level
|
|
2066
2365
|
* at all.
|
|
2067
2366
|
* Can be 'SDR', 'PQ', 'HLG', 'AUTO' for auto-detect, or '' for no preference.
|
|
2068
|
-
* Defaults to 'AUTO'.
|
|
2069
2367
|
* Note that one some platforms, such as Chrome, attempting to play PQ content
|
|
2070
2368
|
* may cause problems.
|
|
2369
|
+
* <br>
|
|
2370
|
+
* Defaults to <code>'AUTO'</code>.
|
|
2071
2371
|
* @property {string} preferredVideoLayout
|
|
2072
2372
|
* The preferred video layout of the video.
|
|
2073
2373
|
* Can be 'CH-STEREO', 'CH-MONO', or '' for no preference.
|
|
2074
2374
|
* If the content is predominantly stereoscopic you should use 'CH-STEREO'.
|
|
2075
2375
|
* If the content is predominantly monoscopic you should use 'CH-MONO'.
|
|
2076
|
-
*
|
|
2376
|
+
* <br>
|
|
2377
|
+
* Defaults to <code>''</code>.
|
|
2077
2378
|
* @property {!Array.<string>} preferredDecodingAttributes
|
|
2078
2379
|
* The list of preferred attributes of decodingInfo, in the order of their
|
|
2079
2380
|
* priorities.
|
|
2381
|
+
* <br>
|
|
2382
|
+
* Defaults to <code>[]</code>.
|
|
2080
2383
|
* @property {boolean} preferForcedSubs
|
|
2081
|
-
* If true, a forced text track is preferred.
|
|
2384
|
+
* If true, a forced text track is preferred.
|
|
2082
2385
|
* If the content has no forced captions and the value is true,
|
|
2083
2386
|
* no text track is chosen.
|
|
2084
2387
|
* Changing this during playback will not affect the current playback.
|
|
2388
|
+
* <br>
|
|
2389
|
+
* Defaults to <code>false</code>.
|
|
2085
2390
|
* @property {boolean} preferSpatialAudio
|
|
2086
|
-
* If true, a spatial audio track is preferred.
|
|
2391
|
+
* If true, a spatial audio track is preferred.
|
|
2392
|
+
* <br>
|
|
2393
|
+
* Defaults to <code>false</code>.
|
|
2087
2394
|
* @property {shaka.extern.Restrictions} restrictions
|
|
2088
2395
|
* The application restrictions to apply to the tracks. These are "hard"
|
|
2089
2396
|
* restrictions. Any track that fails to meet these restrictions will not
|
|
@@ -2092,9 +2399,13 @@ shaka.extern.TextDisplayerConfiguration;
|
|
|
2092
2399
|
* @property {number} playRangeStart
|
|
2093
2400
|
* Optional playback and seek start time in seconds. Defaults to 0 if
|
|
2094
2401
|
* not provided.
|
|
2402
|
+
* <br>
|
|
2403
|
+
* Defaults to <code>0</code>.
|
|
2095
2404
|
* @property {number} playRangeEnd
|
|
2096
2405
|
* Optional playback and seek end time in seconds. Defaults to the end of
|
|
2097
2406
|
* the presentation if not provided.
|
|
2407
|
+
* <br>
|
|
2408
|
+
* Defaults to <code>Infinity</code>.
|
|
2098
2409
|
* @property {shaka.extern.TextDisplayerConfiguration} textDisplayer
|
|
2099
2410
|
* Text displayer configuration and settings.
|
|
2100
2411
|
* @property {shaka.extern.TextDisplayer.Factory} textDisplayFactory
|