shaka-player 3.2.2 → 3.3.2

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.
Files changed (188) hide show
  1. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  2. package/.github/ISSUE_TEMPLATE/feature_request.md +1 -1
  3. package/.github/ISSUE_TEMPLATE/question.md +1 -1
  4. package/.github/workflows/build_and_test.yaml +73 -0
  5. package/.github/workflows/release.yaml +53 -0
  6. package/AUTHORS +6 -5
  7. package/CHANGELOG.md +314 -1
  8. package/CONTRIBUTORS +4 -2
  9. package/build/checkversion.py +1 -1
  10. package/build/conformance.textproto +183 -169
  11. package/build/test.py +6 -0
  12. package/build/types/core +3 -0
  13. package/build/types/offline +1 -0
  14. package/build/types/polyfill +1 -0
  15. package/build/types/ui +2 -0
  16. package/demo/common/assets.js +18 -0
  17. package/demo/common/message_ids.js +13 -1
  18. package/demo/config.js +31 -1
  19. package/demo/index.html +1 -1
  20. package/demo/locales/en.json +12 -0
  21. package/demo/locales/source.json +48 -0
  22. package/dist/controls.css +26 -2
  23. package/dist/controls.css.map +1 -1
  24. package/dist/demo.compiled.debug.js +19 -16
  25. package/dist/demo.compiled.debug.map +3 -3
  26. package/dist/demo.compiled.js +19 -16
  27. package/dist/demo.compiled.map +3 -3
  28. package/dist/deps.js +21 -14
  29. package/dist/locales.js +31 -29
  30. package/dist/receiver.compiled.debug.js +11 -9
  31. package/dist/receiver.compiled.debug.map +3 -3
  32. package/dist/receiver.compiled.js +11 -9
  33. package/dist/receiver.compiled.map +3 -3
  34. package/dist/shaka-player.compiled.d.ts +232 -18
  35. package/dist/shaka-player.compiled.debug.d.ts +232 -18
  36. package/dist/shaka-player.compiled.debug.externs.js +293 -17
  37. package/dist/shaka-player.compiled.debug.js +481 -422
  38. package/dist/shaka-player.compiled.debug.map +4 -4
  39. package/dist/shaka-player.compiled.externs.js +293 -17
  40. package/dist/shaka-player.compiled.js +846 -817
  41. package/dist/shaka-player.compiled.map +4 -4
  42. package/dist/shaka-player.ui.d.ts +250 -30
  43. package/dist/shaka-player.ui.debug.d.ts +250 -30
  44. package/dist/shaka-player.ui.debug.externs.js +322 -28
  45. package/dist/shaka-player.ui.debug.js +630 -553
  46. package/dist/shaka-player.ui.debug.map +4 -4
  47. package/dist/shaka-player.ui.externs.js +322 -28
  48. package/dist/shaka-player.ui.js +1048 -1006
  49. package/dist/shaka-player.ui.map +4 -4
  50. package/docs/design/bg-fetch-after.gv +29 -0
  51. package/docs/design/bg-fetch-after.gv.png +0 -0
  52. package/docs/design/bg-fetch-before.gv +18 -0
  53. package/docs/design/bg-fetch-before.gv.png +0 -0
  54. package/docs/design/bg-fetch.md +134 -0
  55. package/docs/tutorials/blob-url.md +15 -0
  56. package/docs/tutorials/index.json +1 -0
  57. package/docs/tutorials/ui-customization.md +66 -0
  58. package/docs/tutorials/ui.md +5 -5
  59. package/externs/cmcd.js +186 -0
  60. package/externs/ima.js +3 -0
  61. package/externs/shaka/ads.js +5 -0
  62. package/externs/shaka/manifest.js +12 -1
  63. package/externs/shaka/manifest_parser.js +10 -1
  64. package/externs/shaka/net.js +20 -4
  65. package/externs/shaka/offline.js +31 -2
  66. package/externs/shaka/player.js +138 -5
  67. package/externs/shaka/text.js +24 -0
  68. package/externs/webcrypto.js +18 -0
  69. package/karma.conf.js +19 -15
  70. package/lib/abr/ewma.js +14 -0
  71. package/lib/abr/ewma_bandwidth_estimator.js +16 -2
  72. package/lib/abr/simple_abr_manager.js +6 -0
  73. package/lib/ads/ad_manager.js +1 -0
  74. package/lib/ads/client_side_ad.js +8 -0
  75. package/lib/ads/client_side_ad_manager.js +8 -4
  76. package/lib/ads/server_side_ad.js +7 -0
  77. package/lib/cast/cast_proxy.js +3 -0
  78. package/lib/cast/cast_receiver.js +3 -0
  79. package/lib/cast/cast_utils.js +1 -0
  80. package/lib/dash/dash_parser.js +79 -33
  81. package/lib/dash/segment_base.js +25 -1
  82. package/lib/dash/segment_list.js +18 -9
  83. package/lib/dash/segment_template.js +23 -10
  84. package/lib/hls/hls_parser.js +116 -23
  85. package/lib/hls/manifest_text_parser.js +1 -0
  86. package/lib/media/quality_observer.js +274 -0
  87. package/lib/media/region_observer.js +39 -33
  88. package/lib/media/region_timeline.js +17 -19
  89. package/lib/media/segment_index.js +8 -1
  90. package/lib/media/segment_reference.js +37 -4
  91. package/lib/media/streaming_engine.js +47 -6
  92. package/lib/net/http_fetch_plugin.js +31 -11
  93. package/lib/net/http_plugin_utils.js +1 -0
  94. package/lib/net/http_xhr_plugin.js +40 -14
  95. package/lib/net/networking_engine.js +85 -18
  96. package/lib/offline/download_info.js +68 -0
  97. package/lib/offline/download_manager.js +13 -5
  98. package/lib/offline/indexeddb/base_storage_cell.js +35 -0
  99. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  100. package/lib/offline/indexeddb/v5_storage_cell.js +5 -0
  101. package/lib/offline/storage.js +401 -293
  102. package/lib/offline/stored_content_utils.js +2 -0
  103. package/lib/player.js +254 -27
  104. package/lib/polyfill/media_capabilities.js +30 -15
  105. package/lib/polyfill/random_uuid.js +52 -0
  106. package/lib/text/cue.js +18 -0
  107. package/lib/text/ttml_text_parser.js +109 -60
  108. package/lib/text/ui_text_displayer.js +19 -13
  109. package/lib/util/cmcd_manager.js +672 -0
  110. package/lib/util/error.js +6 -0
  111. package/lib/util/fake_event_target.js +21 -1
  112. package/lib/util/language_utils.js +12 -0
  113. package/lib/util/mutex.js +52 -0
  114. package/lib/util/periods.js +98 -64
  115. package/lib/util/player_configuration.js +18 -0
  116. package/lib/util/stream_utils.js +86 -10
  117. package/lib/util/xml_utils.js +19 -0
  118. package/package.json +3 -6
  119. package/shaka-player.uncompiled.js +3 -0
  120. package/test/dash/dash_parser_content_protection_unit.js +2 -0
  121. package/test/dash/dash_parser_live_unit.js +144 -1
  122. package/test/dash/dash_parser_manifest_unit.js +37 -2
  123. package/test/dash/dash_parser_segment_base_unit.js +2 -0
  124. package/test/dash/dash_parser_segment_list_unit.js +2 -1
  125. package/test/dash/dash_parser_segment_template_unit.js +2 -1
  126. package/test/hls/hls_live_unit.js +2 -0
  127. package/test/hls/hls_parser_unit.js +76 -0
  128. package/test/media/drm_engine_unit.js +3 -3
  129. package/test/media/quality_observer_unit.js +142 -0
  130. package/test/media/region_observer_unit.js +40 -5
  131. package/test/media/region_timeline_unit.js +40 -22
  132. package/test/media/segment_reference_unit.js +16 -1
  133. package/test/media/streaming_engine_integration.js +4 -2
  134. package/test/media/streaming_engine_unit.js +147 -0
  135. package/test/net/http_plugin_unit.js +20 -15
  136. package/test/offline/storage_integration.js +108 -4
  137. package/test/player_integration.js +140 -8
  138. package/test/player_src_equals_integration.js +41 -8
  139. package/test/player_unit.js +19 -9
  140. package/test/test/assets/chapters.vtt +2 -2
  141. package/test/test/assets/chapters2.vtt +10 -0
  142. package/test/test/util/dash_parser_util.js +4 -0
  143. package/test/test/util/fake_ad.js +7 -0
  144. package/test/test/util/fake_drm_engine.js +9 -2
  145. package/test/test/util/manifest_generator.js +3 -2
  146. package/test/test/util/test_scheme.js +14 -1
  147. package/test/test/util/ttml_utils.js +81 -0
  148. package/test/test/util/util.js +10 -7
  149. package/test/text/mp4_ttml_parser_unit.js +11 -18
  150. package/test/text/ttml_text_parser_unit.js +544 -228
  151. package/test/ui/text_displayer_layout_unit.js +8 -7
  152. package/test/ui/ui_unit.js +250 -0
  153. package/test/util/cmcd_manager_unit.js +291 -0
  154. package/test/util/stream_utils_unit.js +36 -30
  155. package/third_party/closure-uri/uri.js +21 -0
  156. package/ui/airplay_button.js +1 -0
  157. package/ui/audio_language_selection.js +7 -0
  158. package/ui/cast_button.js +1 -0
  159. package/ui/context_menu.js +109 -0
  160. package/ui/controls.js +44 -7
  161. package/ui/controls.less +1 -0
  162. package/ui/enums.js +4 -0
  163. package/ui/externs/ui.js +28 -1
  164. package/ui/fast_forward_button.js +14 -5
  165. package/ui/fullscreen_button.js +1 -0
  166. package/ui/less/buttons.less +0 -4
  167. package/ui/less/containers.less +74 -0
  168. package/ui/less/overflow_menu.less +0 -10
  169. package/ui/less/tooltip.less +97 -0
  170. package/ui/locales/en.json +1 -0
  171. package/ui/locales/source.json +4 -0
  172. package/ui/localization.js +12 -36
  173. package/ui/loop_button.js +5 -0
  174. package/ui/mute_button.js +2 -1
  175. package/ui/overflow_menu.js +5 -25
  176. package/ui/pip_button.js +5 -0
  177. package/ui/play_button.js +2 -2
  178. package/ui/playback_rate_selection.js +8 -9
  179. package/ui/resolution_selection.js +7 -0
  180. package/ui/rewind_button.js +15 -6
  181. package/ui/seek_bar.js +4 -2
  182. package/ui/settings_menu.js +36 -4
  183. package/ui/small_play_button.js +1 -0
  184. package/ui/statistics_button.js +253 -0
  185. package/ui/text_selection.js +12 -4
  186. package/ui/ui.js +30 -0
  187. package/ui/volume_bar.js +1 -1
  188. package/externs/media_capabilities.js +0 -16
@@ -0,0 +1,253 @@
1
+ /*! @license
2
+ * Shaka Player
3
+ * Copyright 2016 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+
8
+ goog.provide('shaka.ui.StatisticsButton');
9
+
10
+ goog.require('shaka.log');
11
+ goog.require('shaka.ui.ContextMenu');
12
+ goog.require('shaka.ui.Controls');
13
+ goog.require('shaka.ui.Element');
14
+ goog.require('shaka.ui.Enums');
15
+ goog.require('shaka.ui.Locales');
16
+ goog.require('shaka.ui.Localization');
17
+ goog.require('shaka.ui.OverflowMenu');
18
+ goog.require('shaka.ui.Utils');
19
+ goog.require('shaka.util.Dom');
20
+ goog.require('shaka.util.Timer');
21
+ goog.requireType('shaka.ui.Controls');
22
+
23
+
24
+ /**
25
+ * @extends {shaka.ui.Element}
26
+ * @final
27
+ * @export
28
+ */
29
+ shaka.ui.StatisticsButton = class extends shaka.ui.Element {
30
+ /**
31
+ * @param {!HTMLElement} parent
32
+ * @param {!shaka.ui.Controls} controls
33
+ */
34
+ constructor(parent, controls) {
35
+ super(parent, controls);
36
+
37
+ /** @private {!HTMLButtonElement} */
38
+ this.button_ = shaka.util.Dom.createButton();
39
+ this.button_.classList.add('shaka-statistics-button');
40
+
41
+ /** @private {!HTMLElement} */
42
+ this.icon_ = shaka.util.Dom.createHTMLElement('i');
43
+ this.icon_.classList.add('material-icons-round');
44
+ this.icon_.textContent =
45
+ shaka.ui.Enums.MaterialDesignIcons.STATISTICS_ON;
46
+ this.button_.appendChild(this.icon_);
47
+
48
+ const label = shaka.util.Dom.createHTMLElement('label');
49
+ label.classList.add('shaka-overflow-button-label');
50
+
51
+ /** @private {!HTMLElement} */
52
+ this.nameSpan_ = shaka.util.Dom.createHTMLElement('span');
53
+ label.appendChild(this.nameSpan_);
54
+
55
+ /** @private {!HTMLElement} */
56
+ this.stateSpan_ = shaka.util.Dom.createHTMLElement('span');
57
+ this.stateSpan_.classList.add('shaka-current-selection-span');
58
+ label.appendChild(this.stateSpan_);
59
+
60
+ this.button_.appendChild(label);
61
+
62
+ this.parent.appendChild(this.button_);
63
+
64
+ /** @private {!HTMLElement} */
65
+ this.container_ = shaka.util.Dom.createHTMLElement('div');
66
+ this.container_.classList.add('shaka-no-propagation');
67
+ this.container_.classList.add('shaka-show-controls-on-mouse-over');
68
+ this.container_.classList.add('shaka-statistics-container');
69
+ this.container_.classList.add('shaka-hidden');
70
+
71
+ const controlsContainer = this.controls.getControlsContainer();
72
+ controlsContainer.appendChild(this.container_);
73
+
74
+ /** @private {!Array} */
75
+ this.statisticsList_ = [];
76
+
77
+ /** @private {!Array} */
78
+ this.skippedStats_ = ['stateHistory', 'switchHistory'];
79
+
80
+ /** @private {!Object.<string, number>} */
81
+ this.currentStats_ = this.player.getStats();
82
+
83
+ /** @private {!Object.<string, HTMLElement>} */
84
+ this.displayedElements_ = {};
85
+
86
+
87
+ const parsePx = (name) => {
88
+ return this.currentStats_[name] + ' (px)';
89
+ };
90
+
91
+ const parsePercent = (name) => {
92
+ return this.currentStats_[name] + ' (%)';
93
+ };
94
+
95
+ const parseFrames = (name) => {
96
+ return this.currentStats_[name] + ' (frames)';
97
+ };
98
+
99
+ const parseSeconds = (name) => {
100
+ return this.currentStats_[name].toFixed(2) + ' (s)';
101
+ };
102
+
103
+ const parseBits = (name) => {
104
+ return Math.round(this.currentStats_[name] / 1000) + ' (kbits/s)';
105
+ };
106
+
107
+ const parseTime = (name) => {
108
+ return shaka.ui.Utils.buildTimeString(
109
+ this.currentStats_[name], false) + ' (m)';
110
+ };
111
+
112
+ /** @private {!Object.<string, function(string):string>} */
113
+ this.parseFrom_ = {
114
+ 'width': parsePx,
115
+ 'height': parsePx,
116
+ 'completionPercent': parsePercent,
117
+ 'bufferingTime': parseSeconds,
118
+ 'drmTimeSeconds': parseSeconds,
119
+ 'licenseTime': parseSeconds,
120
+ 'liveLatency': parseSeconds,
121
+ 'loadLatency': parseSeconds,
122
+ 'manifestTimeSeconds': parseSeconds,
123
+ 'estimatedBandwidth': parseBits,
124
+ 'streamBandwidth': parseBits,
125
+ 'maxSegmentDuration': parseTime,
126
+ 'pauseTime': parseTime,
127
+ 'playTime': parseTime,
128
+ 'corruptedFrames': parseFrames,
129
+ 'decodedFrames': parseFrames,
130
+ 'droppedFrames': parseFrames,
131
+ };
132
+
133
+ /** @private {shaka.util.Timer} */
134
+ this.timer_ = new shaka.util.Timer(() => {
135
+ this.onTimerTick_();
136
+ });
137
+
138
+ this.updateLocalizedStrings_();
139
+
140
+ this.loadContainer_();
141
+
142
+ this.eventManager.listen(
143
+ this.localization, shaka.ui.Localization.LOCALE_UPDATED, () => {
144
+ this.updateLocalizedStrings_();
145
+ });
146
+
147
+ this.eventManager.listen(
148
+ this.localization, shaka.ui.Localization.LOCALE_CHANGED, () => {
149
+ this.updateLocalizedStrings_();
150
+ });
151
+
152
+ this.eventManager.listen(this.button_, 'click', () => {
153
+ this.onClick_();
154
+ this.updateLocalizedStrings_();
155
+ });
156
+ }
157
+
158
+ /** @private */
159
+ onClick_() {
160
+ shaka.ui.Utils.setDisplay(this.parent, false);
161
+
162
+ if (this.container_.classList.contains('shaka-hidden')) {
163
+ this.icon_.textContent =
164
+ shaka.ui.Enums.MaterialDesignIcons.STATISTICS_OFF;
165
+ this.timer_.tickEvery(0.1);
166
+ shaka.ui.Utils.setDisplay(this.container_, true);
167
+ } else {
168
+ this.icon_.textContent =
169
+ shaka.ui.Enums.MaterialDesignIcons.STATISTICS_ON;
170
+ this.timer_.stop();
171
+ shaka.ui.Utils.setDisplay(this.container_, false);
172
+ }
173
+ }
174
+
175
+ /** @private */
176
+ updateLocalizedStrings_() {
177
+ const LocIds = shaka.ui.Locales.Ids;
178
+
179
+ this.nameSpan_.textContent =
180
+ this.localization.resolve(LocIds.STATISTICS);
181
+
182
+ this.button_.ariaLabel = this.localization.resolve(LocIds.STATISTICS);
183
+
184
+ const labelText = this.container_.classList.contains('shaka-hidden') ?
185
+ LocIds.OFF : LocIds.ON;
186
+ this.stateSpan_.textContent = this.localization.resolve(labelText);
187
+ }
188
+
189
+ /** @private */
190
+ generateComponent_(name) {
191
+ const section = shaka.util.Dom.createHTMLElement('div');
192
+
193
+ const label = shaka.util.Dom.createHTMLElement('label');
194
+ label.textContent = name + ':';
195
+ section.appendChild(label);
196
+
197
+ const value = shaka.util.Dom.createHTMLElement('span');
198
+ value.textContent = this.parseFrom_[name](name);
199
+ section.appendChild(value);
200
+
201
+ this.displayedElements_[name] = value;
202
+
203
+ return section;
204
+ }
205
+
206
+ /** @private */
207
+ loadContainer_() {
208
+ for (const name of this.controls.getConfig().statisticsList) {
209
+ if (name in this.currentStats_ && !this.skippedStats_.includes(name)) {
210
+ this.container_.appendChild(this.generateComponent_(name));
211
+ this.statisticsList_.push(name);
212
+ } else {
213
+ shaka.log.alwaysWarn('Unrecognized statistic element:', name);
214
+ }
215
+ }
216
+ }
217
+
218
+ /** @private */
219
+ onTimerTick_() {
220
+ this.currentStats_ = this.player.getStats();
221
+
222
+ for (const name of this.statisticsList_) {
223
+ this.displayedElements_[name].textContent =
224
+ this.parseFrom_[name](name);
225
+ }
226
+ }
227
+
228
+ /** @override */
229
+ release() {
230
+ this.timer_.stop();
231
+ this.timer_ = null;
232
+ super.release();
233
+ }
234
+ };
235
+
236
+
237
+ /**
238
+ * @implements {shaka.extern.IUIElement.Factory}
239
+ * @final
240
+ */
241
+ shaka.ui.StatisticsButton.Factory = class {
242
+ /** @override */
243
+ create(rootElement, controls) {
244
+ return new shaka.ui.StatisticsButton(rootElement, controls);
245
+ }
246
+ };
247
+
248
+
249
+ shaka.ui.OverflowMenu.registerElement(
250
+ 'statistics', new shaka.ui.StatisticsButton.Factory());
251
+
252
+ shaka.ui.ContextMenu.registerElement(
253
+ 'statistics', new shaka.ui.StatisticsButton.Factory());
@@ -7,6 +7,7 @@
7
7
 
8
8
  goog.provide('shaka.ui.TextSelection');
9
9
 
10
+ goog.require('shaka.ui.Controls');
10
11
  goog.require('shaka.ui.Enums');
11
12
  goog.require('shaka.ui.LanguageUtils');
12
13
  goog.require('shaka.ui.Locales');
@@ -34,6 +35,7 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
34
35
  controls, shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS);
35
36
 
36
37
  this.button.classList.add('shaka-caption-button');
38
+ this.button.classList.add('shaka-tooltip-status');
37
39
  this.menu.classList.add('shaka-text-languages');
38
40
 
39
41
  if (this.player && this.player.isTextTrackVisible()) {
@@ -64,6 +66,7 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
64
66
 
65
67
  this.eventManager.listen(this.player, 'texttrackvisibility', () => {
66
68
  this.onCaptionStateChange_();
69
+ this.updateTextLanguages_();
67
70
  });
68
71
 
69
72
  this.eventManager.listen(this.player, 'textchanged', () => {
@@ -107,12 +110,12 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
107
110
  /** @private */
108
111
  onCaptionStateChange_() {
109
112
  if (this.player.isTextTrackVisible()) {
110
- this.icon.classList.add('shaka-captions-on');
111
- this.icon.classList.remove('shaka-captions-off');
113
+ this.icon.textContent =
114
+ shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS_OFF;
112
115
  this.button.ariaPressed = 'true';
113
116
  } else {
114
- this.icon.classList.add('shaka-captions-off');
115
- this.icon.classList.remove('shaka-captions-on');
117
+ this.icon.textContent =
118
+ shaka.ui.Enums.MaterialDesignIcons.CLOSED_CAPTIONS;
116
119
  this.button.ariaPressed = 'false';
117
120
  }
118
121
 
@@ -154,6 +157,8 @@ shaka.ui.TextSelection = class extends shaka.ui.SettingsMenu {
154
157
  this.localization.resolve(shaka.ui.Locales.Ids.OFF);
155
158
  }
156
159
 
160
+ this.button.setAttribute('shaka-status', this.currentSelection.textContent);
161
+
157
162
  shaka.ui.Utils.focusOnTheChosenItem(this.menu);
158
163
 
159
164
  this.controls.dispatchEvent(
@@ -216,3 +221,6 @@ shaka.ui.TextSelection.Factory = class {
216
221
 
217
222
  shaka.ui.OverflowMenu.registerElement(
218
223
  'captions', new shaka.ui.TextSelection.Factory());
224
+
225
+ shaka.ui.Controls.registerElement(
226
+ 'captions', new shaka.ui.TextSelection.Factory());
package/ui/ui.js CHANGED
@@ -187,8 +187,36 @@ shaka.ui.Overlay = class {
187
187
  'cast',
188
188
  'playback_rate',
189
189
  ],
190
+ statisticsList: [
191
+ 'width',
192
+ 'height',
193
+ 'corruptedFrames',
194
+ 'decodedFrames',
195
+ 'droppedFrames',
196
+ 'drmTimeSeconds',
197
+ 'licenseTime',
198
+ 'liveLatency',
199
+ 'loadLatency',
200
+ 'bufferingTime',
201
+ 'manifestTimeSeconds',
202
+ 'estimatedBandwidth',
203
+ 'streamBandwidth',
204
+ 'maxSegmentDuration',
205
+ 'pauseTime',
206
+ 'playTime',
207
+ 'completionPercent',
208
+ ],
209
+ contextMenuElements: [
210
+ 'loop',
211
+ 'picture_in_picture',
212
+ 'statistics',
213
+ ],
214
+ playbackRates: [0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
215
+ fastForwardRates: [2, 4, 8, 1],
216
+ rewindRates: [-1, -2, -4, -8],
190
217
  addSeekBar: true,
191
218
  addBigPlayButton: false,
219
+ customContextMenu: false,
192
220
  castReceiverAppId: '',
193
221
  clearBufferOnQualityChange: true,
194
222
  showUnbufferedStart: false,
@@ -205,9 +233,11 @@ shaka.ui.Overlay = class {
205
233
  trackLabelFormat: shaka.ui.Overlay.TrackLabelFormat.LANGUAGE,
206
234
  fadeDelay: 0,
207
235
  doubleClickForFullscreen: true,
236
+ singleClickForPlayAndPause: true,
208
237
  enableKeyboardPlaybackControls: true,
209
238
  enableFullscreenOnRotation: true,
210
239
  forceLandscapeOnFullscreen: true,
240
+ enableTooltips: false,
211
241
  };
212
242
 
213
243
  // Check AirPlay support
package/ui/volume_bar.js CHANGED
@@ -73,7 +73,7 @@ shaka.ui.VolumeBar = class extends shaka.ui.RangeElement {
73
73
  * @override
74
74
  */
75
75
  onChange() {
76
- if (this.ad) {
76
+ if (this.ad && this.ad.isLinear()) {
77
77
  this.ad.setVolume(this.getValue());
78
78
  } else {
79
79
  this.video.volume = this.getValue();
@@ -1,16 +0,0 @@
1
- /*! @license
2
- * Shaka Player
3
- * Copyright 2016 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
-
7
- /**
8
- * @fileoverview Externs for Shaka MediaCapabilities which were missing in the
9
- * Closure compiler.
10
- *
11
- * @externs
12
- */
13
-
14
-
15
- /** @type {MediaCapabilities} */
16
- window.shakaMediaCapabilities;