shaka-player 4.7.13 → 4.8.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/AUTHORS +1 -0
- package/CONTRIBUTORS +1 -0
- package/LICENSE +54 -0
- package/README.md +22 -1
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +34 -23
- package/dist/locales.js +44 -34
- package/dist/shaka-player.compiled.d.ts +194 -44
- package/dist/shaka-player.compiled.debug.d.ts +194 -44
- package/dist/shaka-player.compiled.debug.externs.js +474 -337
- package/dist/shaka-player.compiled.debug.js +949 -832
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +474 -337
- package/dist/shaka-player.compiled.js +1237 -1171
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +257 -47
- package/dist/shaka-player.ui.debug.d.ts +257 -47
- package/dist/shaka-player.ui.debug.externs.js +591 -376
- package/dist/shaka-player.ui.debug.js +1165 -965
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +591 -376
- package/dist/shaka-player.ui.js +1521 -1404
- package/dist/shaka-player.ui.map +4 -4
- package/externs/device_sensor_event.js +18 -0
- package/externs/hisense.js +16 -0
- package/externs/playstation.js +31 -0
- package/externs/shaka/abr_manager.js +3 -1
- package/externs/shaka/ads.js +5 -0
- package/externs/shaka/codecs.js +13 -0
- package/externs/shaka/manifest.js +58 -6
- package/externs/shaka/net.js +13 -1
- package/externs/shaka/player.js +184 -13
- package/externs/shaka/text.js +19 -0
- package/externs/tizen.js +41 -0
- package/externs/webos.js +19 -0
- package/externs/xbox.js +43 -0
- package/lib/abr/simple_abr_manager.js +9 -1
- package/lib/ads/ad_manager.js +19 -2
- package/lib/ads/client_side_ad_manager.js +5 -3
- package/lib/ads/media_tailor_ad_manager.js +9 -0
- package/lib/cast/cast_receiver.js +0 -14
- package/lib/cast/cast_utils.js +1 -0
- package/lib/cea/mp4_cea_parser.js +6 -1
- package/lib/dash/content_protection.js +97 -53
- package/lib/dash/dash_parser.js +230 -176
- package/lib/dash/mpd_utils.js +72 -65
- package/lib/dash/segment_base.js +27 -21
- package/lib/dash/segment_list.js +18 -16
- package/lib/dash/segment_template.js +26 -21
- package/lib/hls/hls_parser.js +358 -164
- package/lib/media/buffering_observer.js +25 -1
- package/lib/media/drm_engine.js +91 -71
- package/lib/media/manifest_filterer.js +220 -0
- package/lib/media/media_source_engine.js +34 -5
- package/lib/media/preload_manager.js +827 -0
- package/lib/media/presentation_timeline.js +11 -0
- package/lib/media/segment_index.js +40 -30
- package/lib/media/segment_prefetch.js +140 -43
- package/lib/media/segment_reference.js +31 -8
- package/lib/media/segment_utils.js +208 -25
- package/lib/media/streaming_engine.js +319 -63
- package/lib/mss/content_protection.js +31 -25
- package/lib/mss/mss_parser.js +74 -55
- package/lib/net/networking_engine.js +49 -4
- package/lib/offline/storage.js +3 -3
- package/lib/player.js +882 -673
- package/lib/polyfill/media_capabilities.js +16 -1
- package/lib/text/simple_text_displayer.js +9 -0
- package/lib/text/stub_text_displayer.js +7 -0
- package/lib/text/text_engine.js +16 -3
- package/lib/text/ttml_text_parser.js +116 -114
- package/lib/text/ui_text_displayer.js +28 -11
- package/lib/text/vtt_text_parser.js +54 -115
- package/lib/transmuxer/opus.js +91 -0
- package/lib/transmuxer/ts_transmuxer.js +115 -0
- package/lib/util/cmcd_manager.js +152 -3
- package/lib/util/dom_utils.js +11 -0
- package/lib/util/error.js +5 -0
- package/lib/util/fake_event.js +2 -0
- package/lib/util/manifest_parser_utils.js +97 -3
- package/lib/util/mp4_box_parsers.js +346 -17
- package/lib/util/mp4_generator.js +23 -0
- package/lib/util/periods.js +19 -0
- package/lib/util/platform.js +161 -9
- package/lib/util/player_configuration.js +61 -3
- package/lib/util/stats.js +16 -0
- package/lib/util/stream_utils.js +16 -6
- package/lib/util/string_utils.js +36 -0
- package/lib/util/tXml.js +814 -0
- package/lib/util/ts_parser.js +50 -0
- package/lib/util/xml_utils.js +10 -338
- package/package.json +2 -2
- package/shaka-player.uncompiled.js +8 -0
- package/ui/controls.js +187 -5
- package/ui/enums.js +2 -0
- package/ui/externs/ui.js +30 -3
- package/ui/gl_matrix/matrix_4x4.js +568 -0
- package/ui/gl_matrix/matrix_quaternion.js +45 -0
- package/ui/less/containers.less +11 -0
- package/ui/locales/en-GB.json +2 -0
- package/ui/locales/en.json +2 -0
- package/ui/locales/es-419.json +2 -0
- package/ui/locales/es.json +2 -0
- package/ui/locales/source.json +8 -0
- package/ui/recenter_vr.js +126 -0
- package/ui/resolution_selection.js +25 -5
- package/ui/statistics_button.js +12 -0
- package/ui/text_selection.js +1 -1
- package/ui/toggle_stereoscopic.js +127 -0
- package/ui/ui.js +74 -38
- package/ui/vr_manager.js +557 -0
- package/ui/vr_utils.js +232 -0
- package/ui/vr_webgl.js +697 -0
|
@@ -891,6 +891,7 @@ shaka.util.Error.Code = {
|
|
|
891
891
|
'NO_VIDEO_ELEMENT': 7002,
|
|
892
892
|
'OBJECT_DESTROYED': 7003,
|
|
893
893
|
'CONTENT_NOT_LOADED': 7004,
|
|
894
|
+
'SRC_EQUALS_PRELOAD_NOT_SUPPORTED': 7005,
|
|
894
895
|
'CAST_API_UNAVAILABLE': 8000,
|
|
895
896
|
'NO_CAST_RECEIVERS': 8001,
|
|
896
897
|
'ALREADY_CASTING': 8002,
|
|
@@ -920,6 +921,137 @@ shaka.util.Error.Code = {
|
|
|
920
921
|
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004,
|
|
921
922
|
'MT_AD_MANAGER_NOT_INITIALIZED': 10005
|
|
922
923
|
};
|
|
924
|
+
/**
|
|
925
|
+
* A timer allows a single function to be executed at a later time or at
|
|
926
|
+
* regular intervals.
|
|
927
|
+
* @final
|
|
928
|
+
*/
|
|
929
|
+
shaka.util.Timer = class {
|
|
930
|
+
/**
|
|
931
|
+
* Create a new timer. A timer is committed to a single callback function.
|
|
932
|
+
* While there is no technical reason to do this, it is far easier to
|
|
933
|
+
* understand and use timers when they are connected to one functional idea.
|
|
934
|
+
* @param {function()} onTick
|
|
935
|
+
*/
|
|
936
|
+
constructor(onTick) {}
|
|
937
|
+
/**
|
|
938
|
+
* Have the timer call |onTick| now.
|
|
939
|
+
* @return {!shaka.util.Timer}
|
|
940
|
+
*/
|
|
941
|
+
tickNow() {}
|
|
942
|
+
/**
|
|
943
|
+
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
944
|
+
* called first.
|
|
945
|
+
* @param {number} seconds
|
|
946
|
+
* @return {!shaka.util.Timer}
|
|
947
|
+
*/
|
|
948
|
+
tickAfter(seconds) {}
|
|
949
|
+
/**
|
|
950
|
+
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
951
|
+
* @param {number} seconds
|
|
952
|
+
* @return {!shaka.util.Timer}
|
|
953
|
+
*/
|
|
954
|
+
tickEvery(seconds) {}
|
|
955
|
+
/**
|
|
956
|
+
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
957
|
+
* after calling |stop|.
|
|
958
|
+
*/
|
|
959
|
+
stop() {}
|
|
960
|
+
};
|
|
961
|
+
/**
|
|
962
|
+
* @namespace shaka.util.StringUtils
|
|
963
|
+
* @summary A set of string utility functions.
|
|
964
|
+
*/
|
|
965
|
+
shaka.util.StringUtils = class {
|
|
966
|
+
/**
|
|
967
|
+
* Creates a string from the given buffer as UTF-8 encoding.
|
|
968
|
+
* @param {?BufferSource} data
|
|
969
|
+
* @return {string}
|
|
970
|
+
*/
|
|
971
|
+
static fromUTF8(data) {}
|
|
972
|
+
/**
|
|
973
|
+
* Creates a string from the given buffer as UTF-16 encoding.
|
|
974
|
+
* @param {?BufferSource} data
|
|
975
|
+
* @param {boolean} littleEndian
|
|
976
|
+
true to read little endian, false to read big.
|
|
977
|
+
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
978
|
+
* expect invalid input. If noThrow is true and the data has an odd
|
|
979
|
+
* length,it will be truncated.
|
|
980
|
+
* @return {string}
|
|
981
|
+
*/
|
|
982
|
+
static fromUTF16(data, littleEndian, noThrow) {}
|
|
983
|
+
/**
|
|
984
|
+
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
985
|
+
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
986
|
+
* @param {?BufferSource} data
|
|
987
|
+
* @return {string}
|
|
988
|
+
*/
|
|
989
|
+
static fromBytesAutoDetect(data) {}
|
|
990
|
+
/**
|
|
991
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
992
|
+
* @param {string} str
|
|
993
|
+
* @return {!ArrayBuffer}
|
|
994
|
+
*/
|
|
995
|
+
static toUTF8(str) {}
|
|
996
|
+
/**
|
|
997
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
998
|
+
* @param {string} str
|
|
999
|
+
* @param {boolean} littleEndian
|
|
1000
|
+
* @return {!ArrayBuffer}
|
|
1001
|
+
*/
|
|
1002
|
+
static toUTF16(str, littleEndian) {}
|
|
1003
|
+
/**
|
|
1004
|
+
* Resets the fromCharCode method's implementation.
|
|
1005
|
+
* For debug use.
|
|
1006
|
+
*/
|
|
1007
|
+
static resetFromCharCode() {}
|
|
1008
|
+
};
|
|
1009
|
+
/**
|
|
1010
|
+
* @summary A set of Uint8Array utility functions.
|
|
1011
|
+
*/
|
|
1012
|
+
shaka.util.Uint8ArrayUtils = class {
|
|
1013
|
+
/**
|
|
1014
|
+
* Convert a buffer to a base64 string. The output will be standard
|
|
1015
|
+
* alphabet as opposed to base64url safe alphabet.
|
|
1016
|
+
* @param {BufferSource} data
|
|
1017
|
+
* @return {string}
|
|
1018
|
+
*/
|
|
1019
|
+
static toStandardBase64(data) {}
|
|
1020
|
+
/**
|
|
1021
|
+
* Convert a buffer to a base64 string. The output will always use the
|
|
1022
|
+
* alternate encoding/alphabet also known as "base64url".
|
|
1023
|
+
* @param {BufferSource} data
|
|
1024
|
+
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
1025
|
+
* Defaults to true.
|
|
1026
|
+
* @return {string}
|
|
1027
|
+
*/
|
|
1028
|
+
static toBase64(data, padding) {}
|
|
1029
|
+
/**
|
|
1030
|
+
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
1031
|
+
* alphabet or the alternate "base64url" alphabet.
|
|
1032
|
+
* @param {string} str
|
|
1033
|
+
* @return {!Uint8Array}
|
|
1034
|
+
*/
|
|
1035
|
+
static fromBase64(str) {}
|
|
1036
|
+
/**
|
|
1037
|
+
* Convert a hex string to a Uint8Array.
|
|
1038
|
+
* @param {string} str
|
|
1039
|
+
* @return {!Uint8Array}
|
|
1040
|
+
*/
|
|
1041
|
+
static fromHex(str) {}
|
|
1042
|
+
/**
|
|
1043
|
+
* Convert a buffer to a hex string.
|
|
1044
|
+
* @param {BufferSource} data
|
|
1045
|
+
* @return {string}
|
|
1046
|
+
*/
|
|
1047
|
+
static toHex(data) {}
|
|
1048
|
+
/**
|
|
1049
|
+
* Concatenate buffers.
|
|
1050
|
+
* @param {...BufferSource} varArgs
|
|
1051
|
+
* @return {!Uint8Array}
|
|
1052
|
+
*/
|
|
1053
|
+
static concat(...varArgs) {}
|
|
1054
|
+
};
|
|
923
1055
|
/**
|
|
924
1056
|
* @summary A set of utility functions for dealing with MIME types.
|
|
925
1057
|
*/
|
|
@@ -1109,43 +1241,6 @@ shaka.util.LanguageUtils = class {
|
|
|
1109
1241
|
*/
|
|
1110
1242
|
static findClosestLocale(target, searchSpace) {}
|
|
1111
1243
|
};
|
|
1112
|
-
/**
|
|
1113
|
-
* A timer allows a single function to be executed at a later time or at
|
|
1114
|
-
* regular intervals.
|
|
1115
|
-
* @final
|
|
1116
|
-
*/
|
|
1117
|
-
shaka.util.Timer = class {
|
|
1118
|
-
/**
|
|
1119
|
-
* Create a new timer. A timer is committed to a single callback function.
|
|
1120
|
-
* While there is no technical reason to do this, it is far easier to
|
|
1121
|
-
* understand and use timers when they are connected to one functional idea.
|
|
1122
|
-
* @param {function()} onTick
|
|
1123
|
-
*/
|
|
1124
|
-
constructor(onTick) {}
|
|
1125
|
-
/**
|
|
1126
|
-
* Have the timer call |onTick| now.
|
|
1127
|
-
* @return {!shaka.util.Timer}
|
|
1128
|
-
*/
|
|
1129
|
-
tickNow() {}
|
|
1130
|
-
/**
|
|
1131
|
-
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
1132
|
-
* called first.
|
|
1133
|
-
* @param {number} seconds
|
|
1134
|
-
* @return {!shaka.util.Timer}
|
|
1135
|
-
*/
|
|
1136
|
-
tickAfter(seconds) {}
|
|
1137
|
-
/**
|
|
1138
|
-
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
1139
|
-
* @param {number} seconds
|
|
1140
|
-
* @return {!shaka.util.Timer}
|
|
1141
|
-
*/
|
|
1142
|
-
tickEvery(seconds) {}
|
|
1143
|
-
/**
|
|
1144
|
-
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
1145
|
-
* after calling |stop|.
|
|
1146
|
-
*/
|
|
1147
|
-
stop() {}
|
|
1148
|
-
};
|
|
1149
1244
|
/**
|
|
1150
1245
|
* @summary A set of utility functions for dealing with Streams and Manifests.
|
|
1151
1246
|
*/
|
|
@@ -1212,9 +1307,16 @@ shaka.abr.SimpleAbrManager = class {
|
|
|
1212
1307
|
*/
|
|
1213
1308
|
disable() {}
|
|
1214
1309
|
/**
|
|
1310
|
+
* @param {number} deltaTimeMs The duration, in milliseconds, that the request
|
|
1311
|
+
* took to complete.
|
|
1312
|
+
* @param {number} numBytes The total number of bytes transferred.
|
|
1313
|
+
* @param {boolean} allowSwitch Indicate if the segment is allowed to switch
|
|
1314
|
+
* to another stream.
|
|
1315
|
+
* @param {shaka.extern.Request=} request
|
|
1316
|
+
* A reference to the request
|
|
1215
1317
|
* @override
|
|
1216
1318
|
*/
|
|
1217
|
-
segmentDownloaded(deltaTimeMs, numBytes, allowSwitch) {}
|
|
1319
|
+
segmentDownloaded(deltaTimeMs, numBytes, allowSwitch, request) {}
|
|
1218
1320
|
/**
|
|
1219
1321
|
* @override
|
|
1220
1322
|
*/
|
|
@@ -1419,7 +1521,8 @@ shaka.util.FakeEventTarget.ListenerType;
|
|
|
1419
1521
|
*/
|
|
1420
1522
|
shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
1421
1523
|
/**
|
|
1422
|
-
* @param {
|
|
1524
|
+
* @param {shaka.net.NetworkingEngine.onProgressUpdated=} onProgressUpdated
|
|
1525
|
+
* Called when
|
|
1423
1526
|
* a progress event is triggered. Passed the duration, in milliseconds,
|
|
1424
1527
|
* that the request took, the number of bytes transferred, and the boolean
|
|
1425
1528
|
* of whether the switching is allowed.
|
|
@@ -1431,8 +1534,10 @@ shaka.net.NetworkingEngine = class extends shaka.util.FakeEventTarget {
|
|
|
1431
1534
|
* Called when a request is made
|
|
1432
1535
|
* @param {shaka.net.NetworkingEngine.OnRetry=} onRetry
|
|
1433
1536
|
* Called when a request retry is made
|
|
1537
|
+
* @param {shaka.net.NetworkingEngine.OnResponse=} onResponse
|
|
1538
|
+
* Called when receive the response
|
|
1434
1539
|
*/
|
|
1435
|
-
constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry) {}
|
|
1540
|
+
constructor(onProgressUpdated, onHeadersReceived, onDownloadFailed, onRequest, onRetry, onResponse) {}
|
|
1436
1541
|
/**
|
|
1437
1542
|
* @param {boolean} forceHTTPS
|
|
1438
1543
|
*/
|
|
@@ -1601,6 +1706,19 @@ shaka.net.NetworkingEngine.PluginPriority = {
|
|
|
1601
1706
|
* the player, plus some extra data.
|
|
1602
1707
|
*/
|
|
1603
1708
|
shaka.net.NetworkingEngine.OnHeadersReceived;
|
|
1709
|
+
/**
|
|
1710
|
+
* @typedef {function(
|
|
1711
|
+
* number,
|
|
1712
|
+
* number,
|
|
1713
|
+
* boolean,
|
|
1714
|
+
* shaka.extern.Request=)}
|
|
1715
|
+
* @description
|
|
1716
|
+
* A callback that is passed the duration, in milliseconds,
|
|
1717
|
+
* that the request took, the number of bytes transferred, a boolean
|
|
1718
|
+
* representing whether the switching is allowed and a ref to the
|
|
1719
|
+
* original request.
|
|
1720
|
+
*/
|
|
1721
|
+
shaka.net.NetworkingEngine.onProgressUpdated;
|
|
1604
1722
|
/**
|
|
1605
1723
|
* @typedef {function(
|
|
1606
1724
|
* !shaka.extern.Request,
|
|
@@ -1633,53 +1751,14 @@ shaka.net.NetworkingEngine.OnRequest;
|
|
|
1633
1751
|
*/
|
|
1634
1752
|
shaka.net.NetworkingEngine.OnRetry;
|
|
1635
1753
|
/**
|
|
1636
|
-
* @
|
|
1637
|
-
*
|
|
1754
|
+
* @typedef {function(
|
|
1755
|
+
* !shaka.net.NetworkingEngine.RequestType,
|
|
1756
|
+
* !shaka.extern.Response,
|
|
1757
|
+
* (shaka.extern.RequestContext|undefined))}
|
|
1758
|
+
* @description
|
|
1759
|
+
* A callback function called on every request
|
|
1638
1760
|
*/
|
|
1639
|
-
shaka.
|
|
1640
|
-
/**
|
|
1641
|
-
* Creates a string from the given buffer as UTF-8 encoding.
|
|
1642
|
-
* @param {?BufferSource} data
|
|
1643
|
-
* @return {string}
|
|
1644
|
-
*/
|
|
1645
|
-
static fromUTF8(data) {}
|
|
1646
|
-
/**
|
|
1647
|
-
* Creates a string from the given buffer as UTF-16 encoding.
|
|
1648
|
-
* @param {?BufferSource} data
|
|
1649
|
-
* @param {boolean} littleEndian
|
|
1650
|
-
true to read little endian, false to read big.
|
|
1651
|
-
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
1652
|
-
* expect invalid input. If noThrow is true and the data has an odd
|
|
1653
|
-
* length,it will be truncated.
|
|
1654
|
-
* @return {string}
|
|
1655
|
-
*/
|
|
1656
|
-
static fromUTF16(data, littleEndian, noThrow) {}
|
|
1657
|
-
/**
|
|
1658
|
-
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
1659
|
-
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
1660
|
-
* @param {?BufferSource} data
|
|
1661
|
-
* @return {string}
|
|
1662
|
-
*/
|
|
1663
|
-
static fromBytesAutoDetect(data) {}
|
|
1664
|
-
/**
|
|
1665
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
1666
|
-
* @param {string} str
|
|
1667
|
-
* @return {!ArrayBuffer}
|
|
1668
|
-
*/
|
|
1669
|
-
static toUTF8(str) {}
|
|
1670
|
-
/**
|
|
1671
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
1672
|
-
* @param {string} str
|
|
1673
|
-
* @param {boolean} littleEndian
|
|
1674
|
-
* @return {!ArrayBuffer}
|
|
1675
|
-
*/
|
|
1676
|
-
static toUTF16(str, littleEndian) {}
|
|
1677
|
-
/**
|
|
1678
|
-
* Resets the fromCharCode method's implementation.
|
|
1679
|
-
* For debug use.
|
|
1680
|
-
*/
|
|
1681
|
-
static resetFromCharCode() {}
|
|
1682
|
-
};
|
|
1761
|
+
shaka.net.NetworkingEngine.OnResponse;
|
|
1683
1762
|
/**
|
|
1684
1763
|
* @summary DataViewReader abstracts a DataView object.
|
|
1685
1764
|
*/
|
|
@@ -1866,52 +1945,6 @@ shaka.util.Mp4Parser = class {
|
|
|
1866
1945
|
* @typedef {function(!shaka.extern.ParsedBox)}
|
|
1867
1946
|
*/
|
|
1868
1947
|
shaka.util.Mp4Parser.CallbackType;
|
|
1869
|
-
/**
|
|
1870
|
-
* @summary A set of Uint8Array utility functions.
|
|
1871
|
-
*/
|
|
1872
|
-
shaka.util.Uint8ArrayUtils = class {
|
|
1873
|
-
/**
|
|
1874
|
-
* Convert a buffer to a base64 string. The output will be standard
|
|
1875
|
-
* alphabet as opposed to base64url safe alphabet.
|
|
1876
|
-
* @param {BufferSource} data
|
|
1877
|
-
* @return {string}
|
|
1878
|
-
*/
|
|
1879
|
-
static toStandardBase64(data) {}
|
|
1880
|
-
/**
|
|
1881
|
-
* Convert a buffer to a base64 string. The output will always use the
|
|
1882
|
-
* alternate encoding/alphabet also known as "base64url".
|
|
1883
|
-
* @param {BufferSource} data
|
|
1884
|
-
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
1885
|
-
* Defaults to true.
|
|
1886
|
-
* @return {string}
|
|
1887
|
-
*/
|
|
1888
|
-
static toBase64(data, padding) {}
|
|
1889
|
-
/**
|
|
1890
|
-
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
1891
|
-
* alphabet or the alternate "base64url" alphabet.
|
|
1892
|
-
* @param {string} str
|
|
1893
|
-
* @return {!Uint8Array}
|
|
1894
|
-
*/
|
|
1895
|
-
static fromBase64(str) {}
|
|
1896
|
-
/**
|
|
1897
|
-
* Convert a hex string to a Uint8Array.
|
|
1898
|
-
* @param {string} str
|
|
1899
|
-
* @return {!Uint8Array}
|
|
1900
|
-
*/
|
|
1901
|
-
static fromHex(str) {}
|
|
1902
|
-
/**
|
|
1903
|
-
* Convert a buffer to a hex string.
|
|
1904
|
-
* @param {BufferSource} data
|
|
1905
|
-
* @return {string}
|
|
1906
|
-
*/
|
|
1907
|
-
static toHex(data) {}
|
|
1908
|
-
/**
|
|
1909
|
-
* Concatenate buffers.
|
|
1910
|
-
* @param {...BufferSource} varArgs
|
|
1911
|
-
* @return {!Uint8Array}
|
|
1912
|
-
*/
|
|
1913
|
-
static concat(...varArgs) {}
|
|
1914
|
-
};
|
|
1915
1948
|
/**
|
|
1916
1949
|
* @summary An interface to register manifest parsers.
|
|
1917
1950
|
*/
|
|
@@ -1960,10 +1993,10 @@ shaka.media.InitSegmentReference = class {
|
|
|
1960
1993
|
* the quality of the media associated with this init segment.
|
|
1961
1994
|
* @param {(null|number)=} timescale
|
|
1962
1995
|
* @param {(null|BufferSource)=} segmentData
|
|
1963
|
-
* @param {?shaka.extern.
|
|
1996
|
+
* @param {?shaka.extern.aesKey=} aesKey
|
|
1964
1997
|
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
1965
1998
|
*/
|
|
1966
|
-
constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData,
|
|
1999
|
+
constructor(uris, startByte, endByte, mediaQuality, timescale, segmentData, aesKey) {}
|
|
1967
2000
|
/**
|
|
1968
2001
|
* Returns the offset from the start of the resource to the
|
|
1969
2002
|
* start of the segment.
|
|
@@ -2036,12 +2069,12 @@ shaka.media.SegmentReference = class {
|
|
|
2036
2069
|
* @param {shaka.media.SegmentReference.Status=} status
|
|
2037
2070
|
* The segment status is used to indicate that a segment does not exist or is
|
|
2038
2071
|
* not available.
|
|
2039
|
-
* @param {?shaka.extern.
|
|
2072
|
+
* @param {?shaka.extern.aesKey=} aesKey
|
|
2040
2073
|
* The segment's AES-128-CBC full segment encryption key and iv.
|
|
2041
2074
|
* @param {boolean=} allPartialSegments
|
|
2042
2075
|
* Indicate if the segment has all partial segments
|
|
2043
2076
|
*/
|
|
2044
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status,
|
|
2077
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration, syncTime, status, aesKey, allPartialSegments) {}
|
|
2045
2078
|
/**
|
|
2046
2079
|
* Creates and returns the URIs of the resource containing the segment.
|
|
2047
2080
|
* @return {!Array.<string>}
|
|
@@ -2159,6 +2192,16 @@ shaka.media.SegmentReference = class {
|
|
|
2159
2192
|
* @param {number} lowestSyncTime
|
|
2160
2193
|
*/
|
|
2161
2194
|
syncAgainst(lowestSyncTime) {}
|
|
2195
|
+
/**
|
|
2196
|
+
* Set the segment data.
|
|
2197
|
+
* @param {!BufferSource} segmentData
|
|
2198
|
+
*/
|
|
2199
|
+
setSegmentData(segmentData) {}
|
|
2200
|
+
/**
|
|
2201
|
+
* Return the segment data.
|
|
2202
|
+
* @return {?BufferSource}
|
|
2203
|
+
*/
|
|
2204
|
+
getSegmentData() {}
|
|
2162
2205
|
};
|
|
2163
2206
|
/**
|
|
2164
2207
|
* Rather than using booleans to communicate what the state of the reference,
|
|
@@ -2396,6 +2439,11 @@ shaka.media.PresentationTimeline = class {
|
|
|
2396
2439
|
* availability duration in seconds.
|
|
2397
2440
|
*/
|
|
2398
2441
|
setSegmentAvailabilityDuration(segmentAvailabilityDuration) {}
|
|
2442
|
+
/**
|
|
2443
|
+
* Gets the presentation's segment availability duration.
|
|
2444
|
+
* @return {number}
|
|
2445
|
+
*/
|
|
2446
|
+
getSegmentAvailabilityDuration() {}
|
|
2399
2447
|
/**
|
|
2400
2448
|
* Sets the presentation delay in seconds.
|
|
2401
2449
|
* @param {number} delay
|
|
@@ -2561,6 +2609,7 @@ shaka.media.PresentationTimeline = class {
|
|
|
2561
2609
|
shaka.media.PresentationTimeline.TimeRange;
|
|
2562
2610
|
/**
|
|
2563
2611
|
* SegmentIndex.
|
|
2612
|
+
* @implements {shaka.extern.SegmentIndex}
|
|
2564
2613
|
* @implements {shaka.util.IReleasable}
|
|
2565
2614
|
* @implements {Iterable.<!shaka.media.SegmentReference>}
|
|
2566
2615
|
*/
|
|
@@ -2571,6 +2620,14 @@ shaka.media.SegmentIndex = class {
|
|
|
2571
2620
|
* (ascending) and second by their end times (ascending).
|
|
2572
2621
|
*/
|
|
2573
2622
|
constructor(references) {}
|
|
2623
|
+
/**
|
|
2624
|
+
* @override
|
|
2625
|
+
*/
|
|
2626
|
+
getNumReferences() {}
|
|
2627
|
+
/**
|
|
2628
|
+
* @override
|
|
2629
|
+
*/
|
|
2630
|
+
getNumEvicted() {}
|
|
2574
2631
|
/**
|
|
2575
2632
|
* @override
|
|
2576
2633
|
*/
|
|
@@ -2583,20 +2640,11 @@ shaka.media.SegmentIndex = class {
|
|
|
2583
2640
|
*/
|
|
2584
2641
|
markImmutable() {}
|
|
2585
2642
|
/**
|
|
2586
|
-
*
|
|
2587
|
-
* to the start of the presentation. Returns the position of the segment
|
|
2588
|
-
* with the largest end time if more than one segment is known for the given
|
|
2589
|
-
* time.
|
|
2590
|
-
* @param {number} time
|
|
2591
|
-
* @return {?number} The position of the segment, or null if the position of
|
|
2592
|
-
* the segment could not be determined.
|
|
2643
|
+
* @override
|
|
2593
2644
|
*/
|
|
2594
2645
|
find(time) {}
|
|
2595
2646
|
/**
|
|
2596
|
-
*
|
|
2597
|
-
* @param {number} position The position of the segment as returned by find().
|
|
2598
|
-
* @return {shaka.media.SegmentReference} The SegmentReference, or null if
|
|
2599
|
-
* no such SegmentReference exists.
|
|
2647
|
+
* @override
|
|
2600
2648
|
*/
|
|
2601
2649
|
get(position) {}
|
|
2602
2650
|
/**
|
|
@@ -2654,9 +2702,10 @@ shaka.media.SegmentIndex = class {
|
|
|
2654
2702
|
* RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
|
|
2655
2703
|
* Playlist will contain at least one independent frame."
|
|
2656
2704
|
* @param {number} time
|
|
2705
|
+
* @param {boolean=} allowNonIndepedent
|
|
2657
2706
|
* @return {?shaka.media.SegmentIterator}
|
|
2658
2707
|
*/
|
|
2659
|
-
getIteratorForTime(time) {}
|
|
2708
|
+
getIteratorForTime(time, allowNonIndepedent) {}
|
|
2660
2709
|
/**
|
|
2661
2710
|
* Create a SegmentIndex for a single segment of the given start time and
|
|
2662
2711
|
* duration at the given URIs.
|
|
@@ -2689,65 +2738,231 @@ shaka.media.SegmentIterator = class {
|
|
|
2689
2738
|
/**
|
|
2690
2739
|
* @override
|
|
2691
2740
|
*/
|
|
2692
|
-
next() {}
|
|
2693
|
-
};
|
|
2694
|
-
/**
|
|
2695
|
-
* A meta-SegmentIndex composed of multiple other SegmentIndexes.
|
|
2696
|
-
* Used in constructing multi-Period Streams for DASH.
|
|
2697
|
-
* @extends shaka.media.SegmentIndex
|
|
2698
|
-
* @implements {shaka.util.IReleasable}
|
|
2699
|
-
* @implements {Iterable.<!shaka.media.SegmentReference>}
|
|
2700
|
-
*/
|
|
2701
|
-
shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
|
|
2702
|
-
/** */
|
|
2703
|
-
constructor() {}
|
|
2741
|
+
next() {}
|
|
2742
|
+
};
|
|
2743
|
+
/**
|
|
2744
|
+
* A meta-SegmentIndex composed of multiple other SegmentIndexes.
|
|
2745
|
+
* Used in constructing multi-Period Streams for DASH.
|
|
2746
|
+
* @extends shaka.media.SegmentIndex
|
|
2747
|
+
* @implements {shaka.util.IReleasable}
|
|
2748
|
+
* @implements {Iterable.<!shaka.media.SegmentReference>}
|
|
2749
|
+
*/
|
|
2750
|
+
shaka.media.MetaSegmentIndex = class extends shaka.media.SegmentIndex {
|
|
2751
|
+
/** */
|
|
2752
|
+
constructor() {}
|
|
2753
|
+
/**
|
|
2754
|
+
* @override
|
|
2755
|
+
*/
|
|
2756
|
+
release() {}
|
|
2757
|
+
/**
|
|
2758
|
+
* @override
|
|
2759
|
+
*/
|
|
2760
|
+
forEachTopLevelReference(fn) {}
|
|
2761
|
+
/**
|
|
2762
|
+
* @override
|
|
2763
|
+
*/
|
|
2764
|
+
find(time) {}
|
|
2765
|
+
/**
|
|
2766
|
+
* @override
|
|
2767
|
+
*/
|
|
2768
|
+
get(position) {}
|
|
2769
|
+
/**
|
|
2770
|
+
* @override
|
|
2771
|
+
*/
|
|
2772
|
+
offset(offset) {}
|
|
2773
|
+
/**
|
|
2774
|
+
* @override
|
|
2775
|
+
*/
|
|
2776
|
+
merge(references) {}
|
|
2777
|
+
/**
|
|
2778
|
+
* @override
|
|
2779
|
+
*/
|
|
2780
|
+
evict(time) {}
|
|
2781
|
+
/**
|
|
2782
|
+
* @override
|
|
2783
|
+
*/
|
|
2784
|
+
mergeAndEvict(references, windowStart) {}
|
|
2785
|
+
/**
|
|
2786
|
+
* @override
|
|
2787
|
+
*/
|
|
2788
|
+
fit(windowStart, windowEnd) {}
|
|
2789
|
+
/**
|
|
2790
|
+
* @override
|
|
2791
|
+
*/
|
|
2792
|
+
updateEvery(interval, updateCallback) {}
|
|
2793
|
+
};
|
|
2794
|
+
/**
|
|
2795
|
+
* @typedef {function(
|
|
2796
|
+
* !(shaka.media.InitSegmentReference|shaka.media.SegmentReference),
|
|
2797
|
+
* shaka.extern.Stream,
|
|
2798
|
+
* ?function(BufferSource):!Promise=
|
|
2799
|
+
* ):!shaka.net.NetworkingEngine.PendingRequest}
|
|
2800
|
+
* @description
|
|
2801
|
+
* A callback function that fetches a segment.
|
|
2802
|
+
*/
|
|
2803
|
+
shaka.media.SegmentPrefetch.FetchDispatcher;
|
|
2804
|
+
/** */
|
|
2805
|
+
shaka.util.ConfigUtils = class {
|
|
2806
|
+
/**
|
|
2807
|
+
* @param {!Object} destination
|
|
2808
|
+
* @param {!Object} source
|
|
2809
|
+
* @param {!Object} template supplies default values
|
|
2810
|
+
* @param {!Object} overrides
|
|
2811
|
+
* Supplies override type checking. When the current path matches
|
|
2812
|
+
* the key in this object, each sub-value must match the type in this
|
|
2813
|
+
* object. If this contains an Object, it is used as the template.
|
|
2814
|
+
* @param {string} path to this part of the config
|
|
2815
|
+
* @return {boolean}
|
|
2816
|
+
*/
|
|
2817
|
+
static mergeConfigObjects(destination, source, template, overrides, path) {}
|
|
2818
|
+
/**
|
|
2819
|
+
* Convert config from ('fieldName', value) format to a partial config object.
|
|
2820
|
+
* E. g. from ('manifest.retryParameters.maxAttempts', 1) to
|
|
2821
|
+
* { manifest: { retryParameters: { maxAttempts: 1 }}}.
|
|
2822
|
+
* @param {string} fieldName
|
|
2823
|
+
* @param {*} value
|
|
2824
|
+
* @return {!Object}
|
|
2825
|
+
*/
|
|
2826
|
+
static convertToConfigObject(fieldName, value) {}
|
|
2827
|
+
};
|
|
2828
|
+
/**
|
|
2829
|
+
* @summary A set of FairPlay utility functions.
|
|
2830
|
+
*/
|
|
2831
|
+
shaka.util.FairPlayUtils = class {
|
|
2832
|
+
/**
|
|
2833
|
+
* Check if FairPlay is supported.
|
|
2834
|
+
* @return {!Promise.<boolean>}
|
|
2835
|
+
*/
|
|
2836
|
+
static isFairPlaySupported() {}
|
|
2837
|
+
/**
|
|
2838
|
+
* Using the default method, extract a content ID from the init data. This is
|
|
2839
|
+
* based on the FairPlay example documentation.
|
|
2840
|
+
* @param {!BufferSource} initData
|
|
2841
|
+
* @return {string}
|
|
2842
|
+
*/
|
|
2843
|
+
static defaultGetContentId(initData) {}
|
|
2844
|
+
/**
|
|
2845
|
+
* Transforms the init data buffer using the given data. The format is:
|
|
2846
|
+
* <pre>
|
|
2847
|
+
* [4 bytes] initDataSize
|
|
2848
|
+
* [initDataSize bytes] initData
|
|
2849
|
+
* [4 bytes] contentIdSize
|
|
2850
|
+
* [contentIdSize bytes] contentId
|
|
2851
|
+
* [4 bytes] certSize
|
|
2852
|
+
* [certSize bytes] cert
|
|
2853
|
+
* </pre>
|
|
2854
|
+
* @param {!BufferSource} initData
|
|
2855
|
+
* @param {!BufferSource|string} contentId
|
|
2856
|
+
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
2857
|
+
* provided.
|
|
2858
|
+
* @return {!Uint8Array}
|
|
2859
|
+
*/
|
|
2860
|
+
static initDataTransform(initData, contentId, cert) {}
|
|
2861
|
+
/**
|
|
2862
|
+
* Verimatrix initDataTransform configuration.
|
|
2863
|
+
* @param {!Uint8Array} initData
|
|
2864
|
+
* @param {string} initDataType
|
|
2865
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2866
|
+
*/
|
|
2867
|
+
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2868
|
+
/**
|
|
2869
|
+
* EZDRM initDataTransform configuration.
|
|
2870
|
+
* @param {!Uint8Array} initData
|
|
2871
|
+
* @param {string} initDataType
|
|
2872
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2873
|
+
*/
|
|
2874
|
+
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2875
|
+
/**
|
|
2876
|
+
* Conax initDataTransform configuration.
|
|
2877
|
+
* @param {!Uint8Array} initData
|
|
2878
|
+
* @param {string} initDataType
|
|
2879
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2880
|
+
*/
|
|
2881
|
+
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2882
|
+
/**
|
|
2883
|
+
* ExpressPlay initDataTransform configuration.
|
|
2884
|
+
* @param {!Uint8Array} initData
|
|
2885
|
+
* @param {string} initDataType
|
|
2886
|
+
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2887
|
+
*/
|
|
2888
|
+
static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2889
|
+
/**
|
|
2890
|
+
* Verimatrix FairPlay request.
|
|
2891
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2892
|
+
* @param {shaka.extern.Request} request
|
|
2893
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2894
|
+
*/
|
|
2895
|
+
static verimatrixFairPlayRequest(type, request, context) {}
|
|
2704
2896
|
/**
|
|
2705
|
-
*
|
|
2897
|
+
* EZDRM FairPlay request.
|
|
2898
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2899
|
+
* @param {shaka.extern.Request} request
|
|
2900
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2706
2901
|
*/
|
|
2707
|
-
|
|
2902
|
+
static ezdrmFairPlayRequest(type, request, context) {}
|
|
2708
2903
|
/**
|
|
2709
|
-
*
|
|
2904
|
+
* Conax FairPlay request.
|
|
2905
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2906
|
+
* @param {shaka.extern.Request} request
|
|
2907
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2710
2908
|
*/
|
|
2711
|
-
|
|
2909
|
+
static conaxFairPlayRequest(type, request, context) {}
|
|
2712
2910
|
/**
|
|
2713
|
-
*
|
|
2911
|
+
* ExpressPlay FairPlay request.
|
|
2912
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2913
|
+
* @param {shaka.extern.Request} request
|
|
2914
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2714
2915
|
*/
|
|
2715
|
-
|
|
2916
|
+
static expressplayFairPlayRequest(type, request, context) {}
|
|
2716
2917
|
/**
|
|
2717
|
-
*
|
|
2918
|
+
* Common FairPlay response transform for some DRMs providers.
|
|
2919
|
+
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2920
|
+
* @param {shaka.extern.Response} response
|
|
2921
|
+
* @param {shaka.extern.RequestContext=} context
|
|
2718
2922
|
*/
|
|
2719
|
-
|
|
2923
|
+
static commonFairPlayResponse(type, response, context) {}
|
|
2924
|
+
};
|
|
2925
|
+
/**
|
|
2926
|
+
* @final
|
|
2927
|
+
*/
|
|
2928
|
+
shaka.util.PlayerConfiguration = class {
|
|
2720
2929
|
/**
|
|
2721
|
-
* @
|
|
2930
|
+
* @return {shaka.extern.PlayerConfiguration}
|
|
2722
2931
|
*/
|
|
2723
|
-
|
|
2932
|
+
static createDefault() {}
|
|
2724
2933
|
/**
|
|
2725
|
-
*
|
|
2934
|
+
* Merges the given configuration changes into the given destination. This
|
|
2935
|
+
* uses the default Player configurations as the template.
|
|
2936
|
+
* @param {shaka.extern.PlayerConfiguration} destination
|
|
2937
|
+
* @param {!Object} updates
|
|
2938
|
+
* @param {shaka.extern.PlayerConfiguration=} template
|
|
2939
|
+
* @return {boolean}
|
|
2726
2940
|
*/
|
|
2727
|
-
|
|
2941
|
+
static mergeConfigObjects(destination, updates, template) {}
|
|
2942
|
+
};
|
|
2943
|
+
/**
|
|
2944
|
+
* @implements {shaka.util.IDestroyable}
|
|
2945
|
+
*/
|
|
2946
|
+
shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
|
|
2728
2947
|
/**
|
|
2729
|
-
* @
|
|
2948
|
+
* @param {string} assetUri
|
|
2949
|
+
* @param {?string} mimeType
|
|
2950
|
+
* @param {number} startTimeOfLoad
|
|
2951
|
+
* @param {?number} startTime
|
|
2952
|
+
* @param {*} playerInterface
|
|
2730
2953
|
*/
|
|
2731
|
-
|
|
2954
|
+
constructor(assetUri, mimeType, startTimeOfLoad, startTime, playerInterface) {}
|
|
2732
2955
|
/**
|
|
2733
|
-
*
|
|
2956
|
+
* Waits for the loading to be finished (or to fail with an error).
|
|
2957
|
+
* @return {!Promise}
|
|
2734
2958
|
*/
|
|
2735
|
-
|
|
2959
|
+
waitForFinish() {}
|
|
2736
2960
|
/**
|
|
2961
|
+
* Releases or stops all non-entrusted resources.
|
|
2737
2962
|
* @override
|
|
2738
2963
|
*/
|
|
2739
|
-
|
|
2964
|
+
destroy() {}
|
|
2740
2965
|
};
|
|
2741
|
-
/**
|
|
2742
|
-
* @typedef {function(
|
|
2743
|
-
* !(shaka.media.InitSegmentReference|shaka.media.SegmentReference),
|
|
2744
|
-
* shaka.extern.Stream,
|
|
2745
|
-
* ?function(BufferSource):!Promise=
|
|
2746
|
-
* ):!shaka.net.NetworkingEngine.PendingRequest}
|
|
2747
|
-
* @description
|
|
2748
|
-
* A callback function that fetches a segment.
|
|
2749
|
-
*/
|
|
2750
|
-
shaka.media.SegmentPrefetch.FetchDispatcher;
|
|
2751
2966
|
/**
|
|
2752
2967
|
* A text displayer plugin using the browser's native VTTCue interface.
|
|
2753
2968
|
* @implements {shaka.extern.TextDisplayer}
|
|
@@ -2758,6 +2973,10 @@ shaka.text.SimpleTextDisplayer = class {
|
|
|
2758
2973
|
* @param {string} label
|
|
2759
2974
|
*/
|
|
2760
2975
|
constructor(video, label) {}
|
|
2976
|
+
/**
|
|
2977
|
+
* @override
|
|
2978
|
+
*/
|
|
2979
|
+
configure(config) {}
|
|
2761
2980
|
/**
|
|
2762
2981
|
* @override
|
|
2763
2982
|
*/
|
|
@@ -2784,6 +3003,10 @@ shaka.text.SimpleTextDisplayer = class {
|
|
|
2784
3003
|
* @implements {shaka.extern.TextDisplayer}
|
|
2785
3004
|
*/
|
|
2786
3005
|
shaka.text.StubTextDisplayer = class {
|
|
3006
|
+
/**
|
|
3007
|
+
* @override
|
|
3008
|
+
*/
|
|
3009
|
+
configure(config) {}
|
|
2787
3010
|
/**
|
|
2788
3011
|
* @override
|
|
2789
3012
|
*/
|
|
@@ -2824,8 +3047,13 @@ shaka.text.UITextDisplayer = class {
|
|
|
2824
3047
|
* Constructor.
|
|
2825
3048
|
* @param {HTMLMediaElement} video
|
|
2826
3049
|
* @param {HTMLElement} videoContainer
|
|
3050
|
+
* @param {shaka.extern.TextDisplayerConfiguration} config
|
|
3051
|
+
*/
|
|
3052
|
+
constructor(video, videoContainer, config) {}
|
|
3053
|
+
/**
|
|
3054
|
+
* @override
|
|
2827
3055
|
*/
|
|
2828
|
-
|
|
3056
|
+
configure(config) {}
|
|
2829
3057
|
/**
|
|
2830
3058
|
* @override
|
|
2831
3059
|
*/
|
|
@@ -2902,145 +3130,6 @@ shaka.util.CmsdManager = class {
|
|
|
2902
3130
|
*/
|
|
2903
3131
|
getBandwidthEstimate(defaultEstimate) {}
|
|
2904
3132
|
};
|
|
2905
|
-
/** */
|
|
2906
|
-
shaka.util.ConfigUtils = class {
|
|
2907
|
-
/**
|
|
2908
|
-
* @param {!Object} destination
|
|
2909
|
-
* @param {!Object} source
|
|
2910
|
-
* @param {!Object} template supplies default values
|
|
2911
|
-
* @param {!Object} overrides
|
|
2912
|
-
* Supplies override type checking. When the current path matches
|
|
2913
|
-
* the key in this object, each sub-value must match the type in this
|
|
2914
|
-
* object. If this contains an Object, it is used as the template.
|
|
2915
|
-
* @param {string} path to this part of the config
|
|
2916
|
-
* @return {boolean}
|
|
2917
|
-
*/
|
|
2918
|
-
static mergeConfigObjects(destination, source, template, overrides, path) {}
|
|
2919
|
-
/**
|
|
2920
|
-
* Convert config from ('fieldName', value) format to a partial config object.
|
|
2921
|
-
* E. g. from ('manifest.retryParameters.maxAttempts', 1) to
|
|
2922
|
-
* { manifest: { retryParameters: { maxAttempts: 1 }}}.
|
|
2923
|
-
* @param {string} fieldName
|
|
2924
|
-
* @param {*} value
|
|
2925
|
-
* @return {!Object}
|
|
2926
|
-
*/
|
|
2927
|
-
static convertToConfigObject(fieldName, value) {}
|
|
2928
|
-
};
|
|
2929
|
-
/**
|
|
2930
|
-
* @summary A set of FairPlay utility functions.
|
|
2931
|
-
*/
|
|
2932
|
-
shaka.util.FairPlayUtils = class {
|
|
2933
|
-
/**
|
|
2934
|
-
* Check if FairPlay is supported.
|
|
2935
|
-
* @return {!Promise.<boolean>}
|
|
2936
|
-
*/
|
|
2937
|
-
static isFairPlaySupported() {}
|
|
2938
|
-
/**
|
|
2939
|
-
* Using the default method, extract a content ID from the init data. This is
|
|
2940
|
-
* based on the FairPlay example documentation.
|
|
2941
|
-
* @param {!BufferSource} initData
|
|
2942
|
-
* @return {string}
|
|
2943
|
-
*/
|
|
2944
|
-
static defaultGetContentId(initData) {}
|
|
2945
|
-
/**
|
|
2946
|
-
* Transforms the init data buffer using the given data. The format is:
|
|
2947
|
-
* <pre>
|
|
2948
|
-
* [4 bytes] initDataSize
|
|
2949
|
-
* [initDataSize bytes] initData
|
|
2950
|
-
* [4 bytes] contentIdSize
|
|
2951
|
-
* [contentIdSize bytes] contentId
|
|
2952
|
-
* [4 bytes] certSize
|
|
2953
|
-
* [certSize bytes] cert
|
|
2954
|
-
* </pre>
|
|
2955
|
-
* @param {!BufferSource} initData
|
|
2956
|
-
* @param {!BufferSource|string} contentId
|
|
2957
|
-
* @param {?BufferSource} cert The server certificate; this will throw if not
|
|
2958
|
-
* provided.
|
|
2959
|
-
* @return {!Uint8Array}
|
|
2960
|
-
*/
|
|
2961
|
-
static initDataTransform(initData, contentId, cert) {}
|
|
2962
|
-
/**
|
|
2963
|
-
* Verimatrix initDataTransform configuration.
|
|
2964
|
-
* @param {!Uint8Array} initData
|
|
2965
|
-
* @param {string} initDataType
|
|
2966
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2967
|
-
*/
|
|
2968
|
-
static verimatrixInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2969
|
-
/**
|
|
2970
|
-
* EZDRM initDataTransform configuration.
|
|
2971
|
-
* @param {!Uint8Array} initData
|
|
2972
|
-
* @param {string} initDataType
|
|
2973
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2974
|
-
*/
|
|
2975
|
-
static ezdrmInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2976
|
-
/**
|
|
2977
|
-
* Conax initDataTransform configuration.
|
|
2978
|
-
* @param {!Uint8Array} initData
|
|
2979
|
-
* @param {string} initDataType
|
|
2980
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2981
|
-
*/
|
|
2982
|
-
static conaxInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2983
|
-
/**
|
|
2984
|
-
* ExpressPlay initDataTransform configuration.
|
|
2985
|
-
* @param {!Uint8Array} initData
|
|
2986
|
-
* @param {string} initDataType
|
|
2987
|
-
* @param {?shaka.extern.DrmInfo} drmInfo
|
|
2988
|
-
*/
|
|
2989
|
-
static expressplayInitDataTransform(initData, initDataType, drmInfo) {}
|
|
2990
|
-
/**
|
|
2991
|
-
* Verimatrix FairPlay request.
|
|
2992
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
2993
|
-
* @param {shaka.extern.Request} request
|
|
2994
|
-
* @param {shaka.extern.RequestContext=} context
|
|
2995
|
-
*/
|
|
2996
|
-
static verimatrixFairPlayRequest(type, request, context) {}
|
|
2997
|
-
/**
|
|
2998
|
-
* EZDRM FairPlay request.
|
|
2999
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
3000
|
-
* @param {shaka.extern.Request} request
|
|
3001
|
-
* @param {shaka.extern.RequestContext=} context
|
|
3002
|
-
*/
|
|
3003
|
-
static ezdrmFairPlayRequest(type, request, context) {}
|
|
3004
|
-
/**
|
|
3005
|
-
* Conax FairPlay request.
|
|
3006
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
3007
|
-
* @param {shaka.extern.Request} request
|
|
3008
|
-
* @param {shaka.extern.RequestContext=} context
|
|
3009
|
-
*/
|
|
3010
|
-
static conaxFairPlayRequest(type, request, context) {}
|
|
3011
|
-
/**
|
|
3012
|
-
* ExpressPlay FairPlay request.
|
|
3013
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
3014
|
-
* @param {shaka.extern.Request} request
|
|
3015
|
-
* @param {shaka.extern.RequestContext=} context
|
|
3016
|
-
*/
|
|
3017
|
-
static expressplayFairPlayRequest(type, request, context) {}
|
|
3018
|
-
/**
|
|
3019
|
-
* Common FairPlay response transform for some DRMs providers.
|
|
3020
|
-
* @param {shaka.net.NetworkingEngine.RequestType} type
|
|
3021
|
-
* @param {shaka.extern.Response} response
|
|
3022
|
-
* @param {shaka.extern.RequestContext=} context
|
|
3023
|
-
*/
|
|
3024
|
-
static commonFairPlayResponse(type, response, context) {}
|
|
3025
|
-
};
|
|
3026
|
-
/**
|
|
3027
|
-
* @final
|
|
3028
|
-
*/
|
|
3029
|
-
shaka.util.PlayerConfiguration = class {
|
|
3030
|
-
/**
|
|
3031
|
-
* @return {shaka.extern.PlayerConfiguration}
|
|
3032
|
-
*/
|
|
3033
|
-
static createDefault() {}
|
|
3034
|
-
/**
|
|
3035
|
-
* Merges the given configuration changes into the given destination. This
|
|
3036
|
-
* uses the default Player configurations as the template.
|
|
3037
|
-
* @param {shaka.extern.PlayerConfiguration} destination
|
|
3038
|
-
* @param {!Object} updates
|
|
3039
|
-
* @param {shaka.extern.PlayerConfiguration=} template
|
|
3040
|
-
* @return {boolean}
|
|
3041
|
-
*/
|
|
3042
|
-
static mergeConfigObjects(destination, updates, template) {}
|
|
3043
|
-
};
|
|
3044
3133
|
/**
|
|
3045
3134
|
* @summary The main player object for Shaka Player.
|
|
3046
3135
|
* @implements {shaka.util.IDestroyable}
|
|
@@ -3133,7 +3222,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3133
3222
|
/**
|
|
3134
3223
|
* Loads a new stream.
|
|
3135
3224
|
* If another stream was already playing, first unloads that stream.
|
|
3136
|
-
* @param {string}
|
|
3225
|
+
* @param {string|shaka.media.PreloadManager} assetUriOrPreloader
|
|
3137
3226
|
* @param {?number=} startTime
|
|
3138
3227
|
* When <code>startTime</code> is <code>null</code> or
|
|
3139
3228
|
* <code>undefined</code>, playback will start at the default start time (0
|
|
@@ -3141,7 +3230,39 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3141
3230
|
* @param {?string=} mimeType
|
|
3142
3231
|
* @return {!Promise}
|
|
3143
3232
|
*/
|
|
3144
|
-
load(
|
|
3233
|
+
load(assetUriOrPreloader, startTime, mimeType) {}
|
|
3234
|
+
/**
|
|
3235
|
+
* Unloads the currently playing stream, if any, and returns a PreloadManager
|
|
3236
|
+
* that contains the loaded manifest of that asset, if any.
|
|
3237
|
+
* Allows for the asset to be re-loaded by this player faster, in the future.
|
|
3238
|
+
* When in src= mode, this unloads but does not make a PreloadManager.
|
|
3239
|
+
* @param {boolean=} initializeMediaSource
|
|
3240
|
+
* @param {boolean=} keepAdManager
|
|
3241
|
+
* @return {!Promise.<?shaka.media.PreloadManager>}
|
|
3242
|
+
*/
|
|
3243
|
+
unloadAndSavePreload(initializeMediaSource, keepAdManager) {}
|
|
3244
|
+
/**
|
|
3245
|
+
* Starts to preload a given asset, and returns a PreloadManager object that
|
|
3246
|
+
* represents that preloading process.
|
|
3247
|
+
* The PreloadManager will load the manifest for that asset, as well as the
|
|
3248
|
+
* initialization segment. It will not preload anything more than that;
|
|
3249
|
+
* this feature is intended for reducing start-time latency, not for fully
|
|
3250
|
+
* downloading assets before playing them (for that, use
|
|
3251
|
+
* |shaka.offline.Storage|).
|
|
3252
|
+
* You can pass that PreloadManager object in to the |load| method on this
|
|
3253
|
+
* Player instance to finish loading that particular asset, or you can call
|
|
3254
|
+
* the |destroy| method on the manager if the preload is no longer necessary.
|
|
3255
|
+
* If this returns null rather than a PreloadManager, that indicates that the
|
|
3256
|
+
* asset must be played with src=, which cannot be preloaded.
|
|
3257
|
+
* @param {string} assetUri
|
|
3258
|
+
* @param {?number=} startTime
|
|
3259
|
+
* When <code>startTime</code> is <code>null</code> or
|
|
3260
|
+
* <code>undefined</code>, playback will start at the default start time (0
|
|
3261
|
+
* for VOD and liveEdge for LIVE).
|
|
3262
|
+
* @param {?string=} mimeType
|
|
3263
|
+
* @return {!Promise.<?shaka.media.PreloadManager>}
|
|
3264
|
+
*/
|
|
3265
|
+
preload(assetUri, startTime, mimeType) {}
|
|
3145
3266
|
/**
|
|
3146
3267
|
* Releases all of the mutexes of the player. Meant for use by the tests.
|
|
3147
3268
|
*/
|
|
@@ -3472,19 +3593,22 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3472
3593
|
*/
|
|
3473
3594
|
setTextTrackVisibility(isVisible) {}
|
|
3474
3595
|
/**
|
|
3475
|
-
* Get the current playhead position as a date.
|
|
3476
|
-
* when the player has loaded a live stream. If the player has not loaded a
|
|
3477
|
-
* live stream, this will return <code>null</code>.
|
|
3596
|
+
* Get the current playhead position as a date.
|
|
3478
3597
|
* @return {Date}
|
|
3479
3598
|
*/
|
|
3480
3599
|
getPlayheadTimeAsDate() {}
|
|
3481
3600
|
/**
|
|
3482
|
-
* Get the presentation start time as a date.
|
|
3483
|
-
* the player has loaded a live stream. If the player has not loaded a live
|
|
3484
|
-
* stream, this will return <code>null</code>.
|
|
3601
|
+
* Get the presentation start time as a date.
|
|
3485
3602
|
* @return {Date}
|
|
3486
3603
|
*/
|
|
3487
3604
|
getPresentationStartTimeAsDate() {}
|
|
3605
|
+
/**
|
|
3606
|
+
* Get the presentation segment availability duration. This should only be
|
|
3607
|
+
* called when the player has loaded a live stream. If the player has not
|
|
3608
|
+
* loaded a live stream, this will return <code>null</code>.
|
|
3609
|
+
* @return {?number}
|
|
3610
|
+
*/
|
|
3611
|
+
getSegmentAvailabilityDuration() {}
|
|
3488
3612
|
/**
|
|
3489
3613
|
* Get information about what the player has buffered. If the player has not
|
|
3490
3614
|
* loaded content or is currently loading content, the buffered content will
|
|
@@ -3536,8 +3660,6 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
3536
3660
|
addChaptersTrack(uri, language, mimeType) {}
|
|
3537
3661
|
/**
|
|
3538
3662
|
* Set the maximum resolution that the platform's hardware can handle.
|
|
3539
|
-
* This will be called automatically by <code>shaka.cast.CastReceiver</code>
|
|
3540
|
-
* to enforce limitations of the Chromecast hardware.
|
|
3541
3663
|
* @param {number} width
|
|
3542
3664
|
* @param {number} height
|
|
3543
3665
|
*/
|
|
@@ -4041,6 +4163,11 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
4041
4163
|
* @override
|
|
4042
4164
|
*/
|
|
4043
4165
|
requestMediaTailorStream(url, adsParams, backupUrl) {}
|
|
4166
|
+
/**
|
|
4167
|
+
* @param {string} url
|
|
4168
|
+
* @override
|
|
4169
|
+
*/
|
|
4170
|
+
addMediaTailorTrackingUrl(url) {}
|
|
4044
4171
|
/**
|
|
4045
4172
|
* @override
|
|
4046
4173
|
*/
|
|
@@ -4446,6 +4573,16 @@ shaka.util.PeriodCombiner = class {
|
|
|
4446
4573
|
* @return {!Promise}
|
|
4447
4574
|
*/
|
|
4448
4575
|
combinePeriods(periods, isDynamic) {}
|
|
4576
|
+
/**
|
|
4577
|
+
* @param {boolean} allowed If set to true, multi-mimeType or multi-codec
|
|
4578
|
+
* variants will be allowed.
|
|
4579
|
+
*/
|
|
4580
|
+
setAllowMultiTypeVariants(allowed) {}
|
|
4581
|
+
/**
|
|
4582
|
+
* @param {boolean} useOnce if true, stream will be used only once in period
|
|
4583
|
+
* flattening algoritnm.
|
|
4584
|
+
*/
|
|
4585
|
+
setUseStreamOnce(useOnce) {}
|
|
4449
4586
|
};
|
|
4450
4587
|
/**
|
|
4451
4588
|
* Creates a new DASH parser.
|