shaka-player 3.3.0 → 3.3.1
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/CHANGELOG.md +54 -0
- package/build/conformance.textproto +183 -169
- package/dist/controls.css +1 -1
- package/dist/deps.js +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +25 -2
- package/dist/shaka-player.compiled.debug.d.ts +25 -2
- package/dist/shaka-player.compiled.debug.externs.js +22 -1
- package/dist/shaka-player.compiled.debug.js +226 -222
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +22 -1
- package/dist/shaka-player.compiled.js +814 -812
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +25 -2
- package/dist/shaka-player.ui.debug.d.ts +25 -2
- package/dist/shaka-player.ui.debug.externs.js +22 -1
- package/dist/shaka-player.ui.debug.js +244 -240
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +22 -1
- package/dist/shaka-player.ui.js +995 -992
- package/dist/shaka-player.ui.map +4 -4
- package/externs/cmcd.js +186 -0
- package/externs/shaka/player.js +8 -0
- package/externs/shaka/text.js +10 -0
- package/lib/hls/hls_parser.js +30 -0
- package/lib/media/segment_index.js +2 -1
- package/lib/media/segment_reference.js +19 -1
- package/lib/media/streaming_engine.js +5 -2
- package/lib/player.js +23 -17
- package/lib/polyfill/media_capabilities.js +30 -15
- package/lib/text/cue.js +6 -0
- package/lib/text/ttml_text_parser.js +84 -58
- package/lib/text/ui_text_displayer.js +17 -11
- package/lib/util/cmcd_manager.js +47 -201
- package/lib/util/stream_utils.js +86 -10
- package/lib/util/xml_utils.js +19 -0
- package/package.json +2 -2
- package/test/media/drm_engine_unit.js +3 -3
- package/test/media/streaming_engine_integration.js +2 -1
- package/test/media/streaming_engine_unit.js +145 -0
- package/test/player_integration.js +41 -8
- package/test/player_src_equals_integration.js +41 -8
- package/test/player_unit.js +19 -9
- package/test/test/assets/chapters.vtt +2 -2
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/util/ttml_utils.js +81 -0
- package/test/text/mp4_ttml_parser_unit.js +11 -18
- package/test/text/ttml_text_parser_unit.js +499 -230
- package/test/util/cmcd_manager_unit.js +29 -15
- package/test/util/stream_utils_unit.js +36 -30
- package/third_party/closure-uri/uri.js +21 -0
- package/ui/text_selection.js +1 -0
- package/externs/media_capabilities.js +0 -16
|
@@ -1128,7 +1128,7 @@ declare namespace shaka.media {
|
|
|
1128
1128
|
*/
|
|
1129
1129
|
class SegmentReference {
|
|
1130
1130
|
private noStructuralTyping_shaka_media_SegmentReference : any;
|
|
1131
|
-
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null ) ;
|
|
1131
|
+
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null , tileDuration ? : number | null ) ;
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Returns the offset from the start of the resource to the end of the
|
|
1134
1134
|
* segment, inclusive. A value of null indicates that the segment extends to
|
|
@@ -1148,6 +1148,11 @@ declare namespace shaka.media {
|
|
|
1148
1148
|
* Returns the segment's start time in seconds.
|
|
1149
1149
|
*/
|
|
1150
1150
|
getStartTime ( ) : number ;
|
|
1151
|
+
/**
|
|
1152
|
+
* Returns the segment's explicit tile duration.
|
|
1153
|
+
* Only defined in image segments.
|
|
1154
|
+
*/
|
|
1155
|
+
getTileDuration ( ) : number | null ;
|
|
1151
1156
|
/**
|
|
1152
1157
|
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1153
1158
|
*/
|
|
@@ -1503,6 +1508,12 @@ declare namespace shaka.polyfill {
|
|
|
1503
1508
|
* Install the polyfill if needed.
|
|
1504
1509
|
*/
|
|
1505
1510
|
static install ( ) : any ;
|
|
1511
|
+
/**
|
|
1512
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
1513
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
1514
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
1515
|
+
*/
|
|
1516
|
+
static originalMcap : any | null ;
|
|
1506
1517
|
}
|
|
1507
1518
|
}
|
|
1508
1519
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.externs.js
|
|
@@ -1646,6 +1657,7 @@ declare namespace shaka.text {
|
|
|
1646
1657
|
fontStyle : any ;
|
|
1647
1658
|
fontWeight : any ;
|
|
1648
1659
|
id : any ;
|
|
1660
|
+
isContainer : any ;
|
|
1649
1661
|
letterSpacing : any ;
|
|
1650
1662
|
line : any ;
|
|
1651
1663
|
/**
|
|
@@ -2874,6 +2886,10 @@ declare namespace chrome.cast.SessionStatus {
|
|
|
2874
2886
|
declare namespace chrome.cast {
|
|
2875
2887
|
let isAvailable : boolean ;
|
|
2876
2888
|
}
|
|
2889
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/cmcd.js
|
|
2890
|
+
declare namespace ಠ_ಠ.clutz {
|
|
2891
|
+
type CmcdData = { bl ? : number , br ? : number , bs ? : boolean , cid ? : string , d ? : number , dl ? : number , mtp ? : number , nor ? : string , nrr ? : string , ot ? : string , pr ? : number , rtp ? : number , sf ? : string , sid ? : string , st ? : string , su ? : boolean , tb ? : number , v ? : number } ;
|
|
2892
|
+
}
|
|
2877
2893
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/ima.js
|
|
2878
2894
|
declare namespace google.ima.AdErrorEvent {
|
|
2879
2895
|
enum Type {
|
|
@@ -3843,7 +3859,7 @@ declare namespace shaka.extern {
|
|
|
3843
3859
|
}
|
|
3844
3860
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3845
3861
|
declare namespace shaka.extern {
|
|
3846
|
-
type Thumbnail = { duration : number , height : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3862
|
+
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3847
3863
|
}
|
|
3848
3864
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3849
3865
|
declare namespace shaka.extern {
|
|
@@ -3920,6 +3936,13 @@ declare namespace shaka.extern {
|
|
|
3920
3936
|
* Id of the cue.
|
|
3921
3937
|
*/
|
|
3922
3938
|
id : string ;
|
|
3939
|
+
/**
|
|
3940
|
+
* If true, this represents a container element that is "above" the main
|
|
3941
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
3942
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
3943
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
3944
|
+
*/
|
|
3945
|
+
isContainer : boolean ;
|
|
3923
3946
|
/**
|
|
3924
3947
|
* Text letter spacing as a CSS letter-spacing value.
|
|
3925
3948
|
*/
|
|
@@ -1128,7 +1128,7 @@ declare namespace shaka.media {
|
|
|
1128
1128
|
*/
|
|
1129
1129
|
class SegmentReference {
|
|
1130
1130
|
private noStructuralTyping_shaka_media_SegmentReference : any;
|
|
1131
|
-
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null ) ;
|
|
1131
|
+
constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null , tileDuration ? : number | null ) ;
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Returns the offset from the start of the resource to the end of the
|
|
1134
1134
|
* segment, inclusive. A value of null indicates that the segment extends to
|
|
@@ -1148,6 +1148,11 @@ declare namespace shaka.media {
|
|
|
1148
1148
|
* Returns the segment's start time in seconds.
|
|
1149
1149
|
*/
|
|
1150
1150
|
getStartTime ( ) : number ;
|
|
1151
|
+
/**
|
|
1152
|
+
* Returns the segment's explicit tile duration.
|
|
1153
|
+
* Only defined in image segments.
|
|
1154
|
+
*/
|
|
1155
|
+
getTileDuration ( ) : number | null ;
|
|
1151
1156
|
/**
|
|
1152
1157
|
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1153
1158
|
*/
|
|
@@ -1503,6 +1508,12 @@ declare namespace shaka.polyfill {
|
|
|
1503
1508
|
* Install the polyfill if needed.
|
|
1504
1509
|
*/
|
|
1505
1510
|
static install ( ) : any ;
|
|
1511
|
+
/**
|
|
1512
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
1513
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
1514
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
1515
|
+
*/
|
|
1516
|
+
static originalMcap : any | null ;
|
|
1506
1517
|
}
|
|
1507
1518
|
}
|
|
1508
1519
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.compiled.debug.externs.js
|
|
@@ -1646,6 +1657,7 @@ declare namespace shaka.text {
|
|
|
1646
1657
|
fontStyle : any ;
|
|
1647
1658
|
fontWeight : any ;
|
|
1648
1659
|
id : any ;
|
|
1660
|
+
isContainer : any ;
|
|
1649
1661
|
letterSpacing : any ;
|
|
1650
1662
|
line : any ;
|
|
1651
1663
|
/**
|
|
@@ -2874,6 +2886,10 @@ declare namespace chrome.cast.SessionStatus {
|
|
|
2874
2886
|
declare namespace chrome.cast {
|
|
2875
2887
|
let isAvailable : boolean ;
|
|
2876
2888
|
}
|
|
2889
|
+
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/cmcd.js
|
|
2890
|
+
declare namespace ಠ_ಠ.clutz {
|
|
2891
|
+
type CmcdData = { bl ? : number , br ? : number , bs ? : boolean , cid ? : string , d ? : number , dl ? : number , mtp ? : number , nor ? : string , nrr ? : string , ot ? : string , pr ? : number , rtp ? : number , sf ? : string , sid ? : string , st ? : string , su ? : boolean , tb ? : number , v ? : number } ;
|
|
2892
|
+
}
|
|
2877
2893
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/ima.js
|
|
2878
2894
|
declare namespace google.ima.AdErrorEvent {
|
|
2879
2895
|
enum Type {
|
|
@@ -3843,7 +3859,7 @@ declare namespace shaka.extern {
|
|
|
3843
3859
|
}
|
|
3844
3860
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3845
3861
|
declare namespace shaka.extern {
|
|
3846
|
-
type Thumbnail = { duration : number , height : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3862
|
+
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
3847
3863
|
}
|
|
3848
3864
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
3849
3865
|
declare namespace shaka.extern {
|
|
@@ -3920,6 +3936,13 @@ declare namespace shaka.extern {
|
|
|
3920
3936
|
* Id of the cue.
|
|
3921
3937
|
*/
|
|
3922
3938
|
id : string ;
|
|
3939
|
+
/**
|
|
3940
|
+
* If true, this represents a container element that is "above" the main
|
|
3941
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
3942
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
3943
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
3944
|
+
*/
|
|
3945
|
+
isContainer : boolean ;
|
|
3923
3946
|
/**
|
|
3924
3947
|
* Text letter spacing as a CSS letter-spacing value.
|
|
3925
3948
|
*/
|
|
@@ -178,6 +178,10 @@ shaka.text.Cue.prototype.id;
|
|
|
178
178
|
* @override
|
|
179
179
|
*/
|
|
180
180
|
shaka.text.Cue.prototype.nestedCues;
|
|
181
|
+
/**
|
|
182
|
+
* @override
|
|
183
|
+
*/
|
|
184
|
+
shaka.text.Cue.prototype.isContainer;
|
|
181
185
|
/**
|
|
182
186
|
* @override
|
|
183
187
|
*/
|
|
@@ -1705,8 +1709,12 @@ shaka.media.SegmentReference = class {
|
|
|
1705
1709
|
* The value is a grid-item-dimension consisting of two positive decimal
|
|
1706
1710
|
* integers in the format: column-x-row ('4x3'). It describes the
|
|
1707
1711
|
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
|
|
1712
|
+
* @param {?number=} tileDuration
|
|
1713
|
+
* The explicit duration of an individual tile within the tiles grid.
|
|
1714
|
+
* If not provided, the duration should be automatically calculated based on
|
|
1715
|
+
* the duration of the reference.
|
|
1708
1716
|
*/
|
|
1709
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout) {}
|
|
1717
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
|
|
1710
1718
|
/**
|
|
1711
1719
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1712
1720
|
* @return {!Array.<string>}
|
|
@@ -1740,6 +1748,12 @@ shaka.media.SegmentReference = class {
|
|
|
1740
1748
|
* @return {?string}
|
|
1741
1749
|
*/
|
|
1742
1750
|
getTilesLayout() {}
|
|
1751
|
+
/**
|
|
1752
|
+
* Returns the segment's explicit tile duration.
|
|
1753
|
+
* Only defined in image segments.
|
|
1754
|
+
* @return {?number}
|
|
1755
|
+
*/
|
|
1756
|
+
getTileDuration() {}
|
|
1743
1757
|
};
|
|
1744
1758
|
/**
|
|
1745
1759
|
* PresentationTimeline.
|
|
@@ -3710,6 +3724,13 @@ shaka.polyfill.MediaCapabilities = class {
|
|
|
3710
3724
|
*/
|
|
3711
3725
|
static install() {}
|
|
3712
3726
|
};
|
|
3727
|
+
/**
|
|
3728
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
3729
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
3730
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
3731
|
+
* @type {MediaCapabilities}
|
|
3732
|
+
*/
|
|
3733
|
+
shaka.polyfill.MediaCapabilities.originalMcap;
|
|
3713
3734
|
/**
|
|
3714
3735
|
* @summary A polyfill to patch MSE bugs.
|
|
3715
3736
|
*/
|