shaka-player 4.8.10 → 4.9.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/README.md +5 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +5 -5
- package/dist/locales.js +34 -34
- package/dist/shaka-player.compiled.d.ts +39 -18
- package/dist/shaka-player.compiled.debug.d.ts +39 -18
- package/dist/shaka-player.compiled.debug.externs.js +32 -12
- package/dist/shaka-player.compiled.debug.js +638 -579
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +32 -12
- package/dist/shaka-player.compiled.js +1272 -1237
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +39 -18
- package/dist/shaka-player.ui.debug.d.ts +39 -18
- package/dist/shaka-player.ui.debug.externs.js +43 -23
- package/dist/shaka-player.ui.debug.js +668 -609
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +43 -23
- package/dist/shaka-player.ui.js +1487 -1451
- package/dist/shaka-player.ui.map +4 -4
- package/externs/shaka/manifest.js +11 -1
- package/externs/shaka/offline.js +3 -0
- package/externs/shaka/player.js +105 -12
- package/externs/tizen.js +1 -1
- package/lib/abr/simple_abr_manager.js +5 -0
- package/lib/ads/media_tailor_ad.js +11 -0
- package/lib/ads/media_tailor_ad_manager.js +37 -3
- package/lib/dash/dash_parser.js +655 -46
- package/lib/dash/mpd_utils.js +7 -8
- package/lib/dash/segment_template.js +65 -10
- package/lib/hls/hls_parser.js +92 -34
- package/lib/media/content_workarounds.js +4 -2
- package/lib/media/drm_engine.js +274 -40
- package/lib/media/manifest_filterer.js +2 -2
- package/lib/media/media_source_engine.js +66 -31
- package/lib/media/segment_utils.js +14 -3
- package/lib/mss/mss_parser.js +2 -0
- package/lib/net/http_plugin_utils.js +2 -1
- package/lib/net/networking_engine.js +14 -0
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +2 -0
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +220 -14
- package/lib/polyfill/media_capabilities.js +10 -35
- package/lib/transmuxer/aac_transmuxer.js +4 -2
- package/lib/transmuxer/ac3_transmuxer.js +2 -1
- package/lib/transmuxer/ec3_transmuxer.js +2 -1
- package/lib/transmuxer/mp3_transmuxer.js +4 -2
- package/lib/transmuxer/mpeg_ts_transmuxer.js +2 -1
- package/lib/transmuxer/mss_transmuxer.js +4 -2
- package/lib/transmuxer/ts_transmuxer.js +44 -24
- package/lib/util/config_utils.js +74 -6
- package/lib/util/error.js +17 -8
- package/lib/util/mp4_box_parsers.js +23 -2
- package/lib/util/periods.js +51 -28
- package/lib/util/platform.js +3 -1
- package/lib/util/player_configuration.js +20 -8
- package/lib/util/stream_utils.js +62 -30
- package/lib/util/tXml.js +74 -6
- package/package.json +2 -2
- package/support.html +1 -0
- package/ui/controls.js +4 -0
- package/ui/less/ad_controls.less +2 -1
- package/ui/resolution_selection.js +12 -3
package/ui/controls.js
CHANGED
|
@@ -21,6 +21,7 @@ goog.require('shaka.ui.HiddenRewindButton');
|
|
|
21
21
|
goog.require('shaka.ui.Locales');
|
|
22
22
|
goog.require('shaka.ui.Localization');
|
|
23
23
|
goog.require('shaka.ui.SeekBar');
|
|
24
|
+
goog.require('shaka.ui.SkipAdButton');
|
|
24
25
|
goog.require('shaka.ui.Utils');
|
|
25
26
|
goog.require('shaka.ui.VRManager');
|
|
26
27
|
goog.require('shaka.util.Dom');
|
|
@@ -968,6 +969,9 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
|
|
|
968
969
|
|
|
969
970
|
const adCounter = new shaka.ui.AdCounter(this.adPanel_, this);
|
|
970
971
|
this.elements_.push(adCounter);
|
|
972
|
+
|
|
973
|
+
const skipButton = new shaka.ui.SkipAdButton(this.adPanel_, this);
|
|
974
|
+
this.elements_.push(skipButton);
|
|
971
975
|
}
|
|
972
976
|
|
|
973
977
|
/** @private */
|
package/ui/less/ad_controls.less
CHANGED
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
font-size: initial;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
div:not(.shaka-skip-ad-counter) {
|
|
64
|
+
div:not(.shaka-skip-ad-counter):not(.shaka-skip-ad-container) {
|
|
65
65
|
.bottom-panels-elements-margin();
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -90,6 +90,7 @@
|
|
|
90
90
|
display: flex;
|
|
91
91
|
flex-direction: row;
|
|
92
92
|
margin: 0;
|
|
93
|
+
margin-left: auto;
|
|
93
94
|
}
|
|
94
95
|
|
|
95
96
|
.shaka-skip-ad-button {
|
|
@@ -113,7 +113,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
113
113
|
// Remove duplicate entries with the same resolution or quality depending
|
|
114
114
|
// on content type. Pick an arbitrary one.
|
|
115
115
|
tracks = tracks.filter((track, idx) => {
|
|
116
|
-
// Keep the first one with the same height and
|
|
116
|
+
// Keep the first one with the same height and framerate or bandwidth.
|
|
117
117
|
let otherIdx = -1;
|
|
118
118
|
if (this.player.isAudioOnly()) {
|
|
119
119
|
otherIdx = tracks.findIndex((t) => t.bandwidth == track.bandwidth);
|
|
@@ -168,7 +168,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
168
168
|
if (this.player.isAudioOnly() && track.bandwidth) {
|
|
169
169
|
span.textContent = Math.round(track.bandwidth / 1000) + ' kbits/s';
|
|
170
170
|
} else if (track.height && track.width) {
|
|
171
|
-
span.textContent = this.getResolutionLabel_(track);
|
|
171
|
+
span.textContent = this.getResolutionLabel_(track, tracks);
|
|
172
172
|
} else {
|
|
173
173
|
span.textContent = 'Unknown';
|
|
174
174
|
}
|
|
@@ -226,10 +226,11 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* @param {!shaka.extern.Track} track
|
|
229
|
+
* @param {!Array.<!shaka.extern.Track>} tracks
|
|
229
230
|
* @return {string}
|
|
230
231
|
* @private
|
|
231
232
|
*/
|
|
232
|
-
getResolutionLabel_(track) {
|
|
233
|
+
getResolutionLabel_(track, tracks) {
|
|
233
234
|
const trackHeight = track.height || 0;
|
|
234
235
|
const trackWidth = track.width || 0;
|
|
235
236
|
let height = trackHeight;
|
|
@@ -251,6 +252,14 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
251
252
|
if (track.videoLayout == 'CH-STEREO') {
|
|
252
253
|
text += ' (3D)';
|
|
253
254
|
}
|
|
255
|
+
if (track.videoBandwidth) {
|
|
256
|
+
const hasDuplicateResolution = tracks.some((otherTrack) => {
|
|
257
|
+
return otherTrack != track && otherTrack.height == track.height;
|
|
258
|
+
});
|
|
259
|
+
if (hasDuplicateResolution) {
|
|
260
|
+
text += ' (' + Math.round(track.videoBandwidth / 1000) + ' kbits/s)';
|
|
261
|
+
}
|
|
262
|
+
}
|
|
254
263
|
return text;
|
|
255
264
|
}
|
|
256
265
|
|