shaka-player 4.8.8 → 4.9.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 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/deps.js +5 -5
- package/dist/locales.js +33 -33
- package/dist/shaka-player.compiled.d.ts +39 -17
- package/dist/shaka-player.compiled.debug.d.ts +39 -17
- package/dist/shaka-player.compiled.debug.externs.js +32 -11
- package/dist/shaka-player.compiled.debug.js +574 -516
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +32 -11
- package/dist/shaka-player.compiled.js +1270 -1236
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +39 -17
- package/dist/shaka-player.ui.debug.d.ts +39 -17
- package/dist/shaka-player.ui.debug.externs.js +43 -22
- package/dist/shaka-player.ui.debug.js +601 -543
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +43 -22
- package/dist/shaka-player.ui.js +1483 -1448
- 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/cea/cea608_data_channel.js +9 -0
- package/lib/cea/cea_decoder.js +6 -2
- 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/drm_engine.js +274 -40
- package/lib/media/manifest_filterer.js +10 -14
- package/lib/media/preload_manager.js +3 -10
- 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 +27 -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 +221 -14
- package/lib/polyfill/media_capabilities.js +10 -35
- package/lib/util/config_utils.js +74 -6
- package/lib/util/error.js +7 -0
- 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 {
|
|
@@ -109,7 +109,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
109
109
|
// Remove duplicate entries with the same resolution or quality depending
|
|
110
110
|
// on content type. Pick an arbitrary one.
|
|
111
111
|
tracks = tracks.filter((track, idx) => {
|
|
112
|
-
// Keep the first one with the same height and
|
|
112
|
+
// Keep the first one with the same height and framerate or bandwidth.
|
|
113
113
|
let otherIdx = -1;
|
|
114
114
|
if (this.player.isAudioOnly()) {
|
|
115
115
|
otherIdx = tracks.findIndex((t) => t.bandwidth == track.bandwidth);
|
|
@@ -164,7 +164,7 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
164
164
|
if (this.player.isAudioOnly() && track.bandwidth) {
|
|
165
165
|
span.textContent = Math.round(track.bandwidth / 1000) + ' kbits/s';
|
|
166
166
|
} else if (track.height && track.width) {
|
|
167
|
-
span.textContent = this.getResolutionLabel_(track);
|
|
167
|
+
span.textContent = this.getResolutionLabel_(track, tracks);
|
|
168
168
|
} else {
|
|
169
169
|
span.textContent = 'Unknown';
|
|
170
170
|
}
|
|
@@ -222,10 +222,11 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
222
222
|
|
|
223
223
|
/**
|
|
224
224
|
* @param {!shaka.extern.Track} track
|
|
225
|
+
* @param {!Array.<!shaka.extern.Track>} tracks
|
|
225
226
|
* @return {string}
|
|
226
227
|
* @private
|
|
227
228
|
*/
|
|
228
|
-
getResolutionLabel_(track) {
|
|
229
|
+
getResolutionLabel_(track, tracks) {
|
|
229
230
|
const trackHeight = track.height || 0;
|
|
230
231
|
const trackWidth = track.width || 0;
|
|
231
232
|
let height = trackHeight;
|
|
@@ -247,6 +248,14 @@ shaka.ui.ResolutionSelection = class extends shaka.ui.SettingsMenu {
|
|
|
247
248
|
if (track.videoLayout == 'CH-STEREO') {
|
|
248
249
|
text += ' (3D)';
|
|
249
250
|
}
|
|
251
|
+
if (track.videoBandwidth) {
|
|
252
|
+
const hasDuplicateResolution = tracks.some((otherTrack) => {
|
|
253
|
+
return otherTrack != track && otherTrack.height == track.height;
|
|
254
|
+
});
|
|
255
|
+
if (hasDuplicateResolution) {
|
|
256
|
+
text += ' (' + Math.round(track.videoBandwidth / 1000) + ' kbits/s)';
|
|
257
|
+
}
|
|
258
|
+
}
|
|
250
259
|
return text;
|
|
251
260
|
}
|
|
252
261
|
|