shaka-player 3.2.2 → 3.2.3
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 +46 -0
- package/dist/controls.css +2 -2
- package/dist/controls.css.map +1 -1
- package/dist/locales.js +30 -30
- package/dist/shaka-player.compiled.d.ts +21 -2
- package/dist/shaka-player.compiled.debug.d.ts +21 -2
- package/dist/shaka-player.compiled.debug.externs.js +22 -1
- package/dist/shaka-player.compiled.debug.js +205 -202
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +22 -1
- package/dist/shaka-player.compiled.js +727 -723
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +21 -2
- package/dist/shaka-player.ui.debug.d.ts +21 -2
- package/dist/shaka-player.ui.debug.externs.js +22 -1
- package/dist/shaka-player.ui.debug.js +221 -218
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +22 -1
- package/dist/shaka-player.ui.js +829 -825
- package/dist/shaka-player.ui.map +4 -4
- package/externs/shaka/player.js +8 -0
- package/externs/shaka/text.js +10 -0
- package/lib/dash/dash_parser.js +4 -2
- 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 +20 -13
- 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/stream_utils.js +86 -10
- package/lib/util/xml_utils.js +19 -0
- package/package.json +2 -2
- package/test/dash/dash_parser_manifest_unit.js +33 -1
- 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 +495 -228
- package/test/util/stream_utils_unit.js +36 -30
- package/ui/less/buttons.less +0 -4
- package/ui/text_selection.js +1 -0
- package/externs/media_capabilities.js +0 -16
|
@@ -1119,7 +1119,7 @@ declare namespace shaka.media {
|
|
|
1119
1119
|
*/
|
|
1120
1120
|
class SegmentReference {
|
|
1121
1121
|
private noStructuralTyping_shaka_media_SegmentReference : any;
|
|
1122
|
-
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 ) ;
|
|
1122
|
+
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 ) ;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Returns the offset from the start of the resource to the end of the
|
|
1125
1125
|
* segment, inclusive. A value of null indicates that the segment extends to
|
|
@@ -1139,6 +1139,11 @@ declare namespace shaka.media {
|
|
|
1139
1139
|
* Returns the segment's start time in seconds.
|
|
1140
1140
|
*/
|
|
1141
1141
|
getStartTime ( ) : number ;
|
|
1142
|
+
/**
|
|
1143
|
+
* Returns the segment's explicit tile duration.
|
|
1144
|
+
* Only defined in image segments.
|
|
1145
|
+
*/
|
|
1146
|
+
getTileDuration ( ) : number | null ;
|
|
1142
1147
|
/**
|
|
1143
1148
|
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1144
1149
|
*/
|
|
@@ -1486,6 +1491,12 @@ declare namespace shaka.polyfill {
|
|
|
1486
1491
|
* Install the polyfill if needed.
|
|
1487
1492
|
*/
|
|
1488
1493
|
static install ( ) : any ;
|
|
1494
|
+
/**
|
|
1495
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
1496
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
1497
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
1498
|
+
*/
|
|
1499
|
+
static originalMcap : any | null ;
|
|
1489
1500
|
}
|
|
1490
1501
|
}
|
|
1491
1502
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.externs.js
|
|
@@ -1619,6 +1630,7 @@ declare namespace shaka.text {
|
|
|
1619
1630
|
fontStyle : any ;
|
|
1620
1631
|
fontWeight : any ;
|
|
1621
1632
|
id : any ;
|
|
1633
|
+
isContainer : any ;
|
|
1622
1634
|
letterSpacing : any ;
|
|
1623
1635
|
line : any ;
|
|
1624
1636
|
/**
|
|
@@ -4120,7 +4132,7 @@ declare namespace shaka.extern {
|
|
|
4120
4132
|
}
|
|
4121
4133
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
4122
4134
|
declare namespace shaka.extern {
|
|
4123
|
-
type Thumbnail = { duration : number , height : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
4135
|
+
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
4124
4136
|
}
|
|
4125
4137
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
4126
4138
|
declare namespace shaka.extern {
|
|
@@ -4197,6 +4209,13 @@ declare namespace shaka.extern {
|
|
|
4197
4209
|
* Id of the cue.
|
|
4198
4210
|
*/
|
|
4199
4211
|
id : string ;
|
|
4212
|
+
/**
|
|
4213
|
+
* If true, this represents a container element that is "above" the main
|
|
4214
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
4215
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
4216
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
4217
|
+
*/
|
|
4218
|
+
isContainer : boolean ;
|
|
4200
4219
|
/**
|
|
4201
4220
|
* Text letter spacing as a CSS letter-spacing value.
|
|
4202
4221
|
*/
|
|
@@ -1119,7 +1119,7 @@ declare namespace shaka.media {
|
|
|
1119
1119
|
*/
|
|
1120
1120
|
class SegmentReference {
|
|
1121
1121
|
private noStructuralTyping_shaka_media_SegmentReference : any;
|
|
1122
|
-
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 ) ;
|
|
1122
|
+
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 ) ;
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Returns the offset from the start of the resource to the end of the
|
|
1125
1125
|
* segment, inclusive. A value of null indicates that the segment extends to
|
|
@@ -1139,6 +1139,11 @@ declare namespace shaka.media {
|
|
|
1139
1139
|
* Returns the segment's start time in seconds.
|
|
1140
1140
|
*/
|
|
1141
1141
|
getStartTime ( ) : number ;
|
|
1142
|
+
/**
|
|
1143
|
+
* Returns the segment's explicit tile duration.
|
|
1144
|
+
* Only defined in image segments.
|
|
1145
|
+
*/
|
|
1146
|
+
getTileDuration ( ) : number | null ;
|
|
1142
1147
|
/**
|
|
1143
1148
|
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1144
1149
|
*/
|
|
@@ -1486,6 +1491,12 @@ declare namespace shaka.polyfill {
|
|
|
1486
1491
|
* Install the polyfill if needed.
|
|
1487
1492
|
*/
|
|
1488
1493
|
static install ( ) : any ;
|
|
1494
|
+
/**
|
|
1495
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
1496
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
1497
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
1498
|
+
*/
|
|
1499
|
+
static originalMcap : any | null ;
|
|
1489
1500
|
}
|
|
1490
1501
|
}
|
|
1491
1502
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/dist/shaka-player.ui.debug.externs.js
|
|
@@ -1619,6 +1630,7 @@ declare namespace shaka.text {
|
|
|
1619
1630
|
fontStyle : any ;
|
|
1620
1631
|
fontWeight : any ;
|
|
1621
1632
|
id : any ;
|
|
1633
|
+
isContainer : any ;
|
|
1622
1634
|
letterSpacing : any ;
|
|
1623
1635
|
line : any ;
|
|
1624
1636
|
/**
|
|
@@ -4120,7 +4132,7 @@ declare namespace shaka.extern {
|
|
|
4120
4132
|
}
|
|
4121
4133
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
4122
4134
|
declare namespace shaka.extern {
|
|
4123
|
-
type Thumbnail = { duration : number , height : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
4135
|
+
type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , startTime : number , uris : string [] , width : number } ;
|
|
4124
4136
|
}
|
|
4125
4137
|
// Generated from /usr/local/google/home/joeyparrish/hacking/shaka/clean/externs/shaka/player.js
|
|
4126
4138
|
declare namespace shaka.extern {
|
|
@@ -4197,6 +4209,13 @@ declare namespace shaka.extern {
|
|
|
4197
4209
|
* Id of the cue.
|
|
4198
4210
|
*/
|
|
4199
4211
|
id : string ;
|
|
4212
|
+
/**
|
|
4213
|
+
* If true, this represents a container element that is "above" the main
|
|
4214
|
+
* cues. For example, the <body> and <div> tags that contain the <p> tags
|
|
4215
|
+
* in a TTML file. This controls the flow of the final cues; any nested cues
|
|
4216
|
+
* within an "isContainer" cue will be laid out as separate lines.
|
|
4217
|
+
*/
|
|
4218
|
+
isContainer : boolean ;
|
|
4200
4219
|
/**
|
|
4201
4220
|
* Text letter spacing as a CSS letter-spacing value.
|
|
4202
4221
|
*/
|
|
@@ -541,6 +541,10 @@ shaka.text.Cue.prototype.id;
|
|
|
541
541
|
* @override
|
|
542
542
|
*/
|
|
543
543
|
shaka.text.Cue.prototype.nestedCues;
|
|
544
|
+
/**
|
|
545
|
+
* @override
|
|
546
|
+
*/
|
|
547
|
+
shaka.text.Cue.prototype.isContainer;
|
|
544
548
|
/**
|
|
545
549
|
* @override
|
|
546
550
|
*/
|
|
@@ -1640,8 +1644,12 @@ shaka.media.SegmentReference = class {
|
|
|
1640
1644
|
* The value is a grid-item-dimension consisting of two positive decimal
|
|
1641
1645
|
* integers in the format: column-x-row ('4x3'). It describes the
|
|
1642
1646
|
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
|
|
1647
|
+
* @param {?number=} tileDuration
|
|
1648
|
+
* The explicit duration of an individual tile within the tiles grid.
|
|
1649
|
+
* If not provided, the duration should be automatically calculated based on
|
|
1650
|
+
* the duration of the reference.
|
|
1643
1651
|
*/
|
|
1644
|
-
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout) {}
|
|
1652
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
|
|
1645
1653
|
/**
|
|
1646
1654
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1647
1655
|
* @return {!Array.<string>}
|
|
@@ -1675,6 +1683,12 @@ shaka.media.SegmentReference = class {
|
|
|
1675
1683
|
* @return {?string}
|
|
1676
1684
|
*/
|
|
1677
1685
|
getTilesLayout() {}
|
|
1686
|
+
/**
|
|
1687
|
+
* Returns the segment's explicit tile duration.
|
|
1688
|
+
* Only defined in image segments.
|
|
1689
|
+
* @return {?number}
|
|
1690
|
+
*/
|
|
1691
|
+
getTileDuration() {}
|
|
1678
1692
|
};
|
|
1679
1693
|
/**
|
|
1680
1694
|
* PresentationTimeline.
|
|
@@ -3585,6 +3599,13 @@ shaka.polyfill.MediaCapabilities = class {
|
|
|
3585
3599
|
*/
|
|
3586
3600
|
static install() {}
|
|
3587
3601
|
};
|
|
3602
|
+
/**
|
|
3603
|
+
* A copy of the MediaCapabilities instance, to prevent Safari from
|
|
3604
|
+
* garbage-collecting the polyfilled method on it. We make it public and export
|
|
3605
|
+
* it to ensure that it is not stripped out by the compiler.
|
|
3606
|
+
* @type {MediaCapabilities}
|
|
3607
|
+
*/
|
|
3608
|
+
shaka.polyfill.MediaCapabilities.originalMcap;
|
|
3588
3609
|
/**
|
|
3589
3610
|
* @summary A polyfill to patch MSE bugs.
|
|
3590
3611
|
*/
|