shaka-player 4.6.4 → 4.6.6
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/CHANGELOG.md +31 -0
- package/CONTRIBUTORS +1 -0
- package/dist/deps.js +1 -1
- package/dist/locales.js +29 -29
- package/dist/shaka-player.compiled.debug.js +52 -53
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +630 -627
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.js +114 -115
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +730 -729
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/fairplay.md +2 -2
- package/externs/isoboxer.js +20 -12
- package/externs/shaka/codecs.js +4 -0
- package/lib/ads/media_tailor_ad_manager.js +3 -2
- package/lib/hls/hls_parser.js +2 -0
- package/lib/media/media_source_engine.js +1 -1
- package/lib/media/segment_prefetch.js +2 -2
- package/lib/net/networking_utils.js +12 -3
- package/lib/player.js +2 -2
- package/lib/text/ui_text_displayer.js +7 -0
- package/lib/transmuxer/mss_transmuxer.js +3 -2
- package/lib/transmuxer/ts_transmuxer.js +4 -4
- package/lib/util/mp4_generator.js +14 -10
- package/lib/util/platform.js +20 -1
- package/lib/util/ts_parser.js +27 -24
- package/lib/util/uint8array_utils.js +12 -7
- package/package.json +1 -1
- package/test/player_unit.js +31 -0
- package/test/text/ui_text_displayer_unit.js +9 -0
- package/ui/controls.js +2 -1
- package/ui/volume_bar.js +10 -6
package/ui/volume_bar.js
CHANGED
|
@@ -32,6 +32,10 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
|
|
|
32
32
|
/** @private {!shaka.extern.UIConfiguration} */
|
|
33
33
|
this.config_ = this.controls.getConfig();
|
|
34
34
|
|
|
35
|
+
// We use a range of 100 to avoid problems with Firefox.
|
|
36
|
+
// See https://github.com/shaka-project/shaka-player/issues/3987
|
|
37
|
+
this.setRange(0, 100);
|
|
38
|
+
|
|
35
39
|
this.eventManager.listen(this.video,
|
|
36
40
|
'volumechange',
|
|
37
41
|
() => this.onPresentationVolumeChange_());
|
|
@@ -74,9 +78,9 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
|
|
|
74
78
|
*/
|
|
75
79
|
onChange() {
|
|
76
80
|
if (this.ad && this.ad.isLinear()) {
|
|
77
|
-
this.ad.setVolume(this.getValue());
|
|
81
|
+
this.ad.setVolume(this.getValue() / 100);
|
|
78
82
|
} else {
|
|
79
|
-
this.video.volume = this.getValue();
|
|
83
|
+
this.video.volume = this.getValue() / 100;
|
|
80
84
|
if (this.video.volume == 0) {
|
|
81
85
|
this.video.muted = true;
|
|
82
86
|
} else {
|
|
@@ -90,7 +94,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
|
|
|
90
94
|
if (this.video.muted) {
|
|
91
95
|
this.setValue(0);
|
|
92
96
|
} else {
|
|
93
|
-
this.setValue(this.video.volume);
|
|
97
|
+
this.setValue(this.video.volume * 100);
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
this.updateColors_();
|
|
@@ -102,7 +106,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
|
|
|
102
106
|
'This.ad should exist at this point!');
|
|
103
107
|
|
|
104
108
|
const volume = this.ad.getVolume();
|
|
105
|
-
this.setValue(volume);
|
|
109
|
+
this.setValue(volume * 100);
|
|
106
110
|
this.updateColors_();
|
|
107
111
|
}
|
|
108
112
|
|
|
@@ -110,8 +114,8 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
|
|
|
110
114
|
updateColors_() {
|
|
111
115
|
const colors = this.config_.volumeBarColors;
|
|
112
116
|
const gradient = ['to right'];
|
|
113
|
-
gradient.push(colors.level +
|
|
114
|
-
gradient.push(colors.base +
|
|
117
|
+
gradient.push(colors.level + this.getValue() + '%');
|
|
118
|
+
gradient.push(colors.base + this.getValue() + '%');
|
|
115
119
|
gradient.push(colors.base + '100%');
|
|
116
120
|
|
|
117
121
|
this.container.style.background =
|