shaka-player 2.5.4 → 2.5.5
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/.csslintrc +13 -0
- package/CHANGELOG.md +56 -0
- package/build/build.py +4 -1
- package/build/check.py +17 -0
- package/build/compiler.py +40 -0
- package/build/types/core +1 -0
- package/build/types/ui +4 -1
- package/demo/asset_card.js +41 -11
- package/demo/cast_receiver/receiver_app.css +19 -13
- package/demo/close_button.js +0 -6
- package/demo/common/asset.js +6 -1
- package/demo/common/assets.js +72 -14
- package/demo/demo.less +105 -16
- package/demo/index.html +8 -5
- package/demo/load.js +5 -7
- package/demo/main.js +81 -16
- package/dist/.csslintstamp +0 -0
- package/dist/controls.css +1 -1
- package/dist/controls.css.map +1 -1
- package/dist/demo.compiled.debug.js +46 -39
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +46 -39
- package/dist/demo.compiled.map +3 -3
- package/dist/demo.css +1 -1
- package/dist/demo.css.map +1 -1
- package/dist/deps.js +11 -7
- package/dist/receiver.compiled.debug.js +10 -6
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +10 -6
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.debug.externs.js +123 -92
- package/dist/shaka-player.compiled.debug.js +113 -105
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +123 -92
- package/dist/shaka-player.compiled.js +551 -548
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.debug.externs.js +170 -101
- package/dist/shaka-player.ui.debug.js +187 -188
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +170 -101
- package/dist/shaka-player.ui.js +651 -651
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/drm-config.md +1 -0
- package/docs/tutorials/fairplay.md +77 -0
- package/docs/tutorials/index.json +1 -0
- package/docs/tutorials/ui-customization.md +3 -0
- package/docs/tutorials/ui.md +3 -1
- package/externs/mediasession.js +16 -1
- package/externs/shaka/net.js +5 -1
- package/externs/shaka/player.js +136 -90
- package/externs/webkitmediakeys.js +4 -0
- package/lib/dash/content_protection.js +33 -1
- package/lib/dash/dash_parser.js +12 -4
- package/lib/hls/hls_parser.js +20 -4
- package/lib/media/drm_engine.js +29 -2
- package/lib/media/media_source_engine.js +7 -3
- package/lib/media/playhead.js +8 -3
- package/lib/media/streaming_engine.js +24 -8
- package/lib/media/video_wrapper.js +8 -3
- package/lib/net/networking_engine.js +1 -0
- package/lib/player.js +3 -2
- package/lib/polyfill/patchedmediakeys_apple.js +2 -72
- package/lib/util/error.js +12 -0
- package/lib/util/fairplay_utils.js +122 -0
- package/lib/util/player_configuration.js +5 -0
- package/lib/util/pssh.js +41 -0
- package/package.json +4 -3
- package/shaka-player.uncompiled.js +5 -1
- package/test/dash/dash_parser_content_protection_unit.js +35 -1
- package/test/dash/dash_parser_manifest_unit.js +31 -0
- package/test/hls/hls_live_unit.js +7 -1
- package/test/hls/hls_parser_unit.js +50 -0
- package/test/media/media_source_engine_integration.js +12 -0
- package/test/media/playhead_unit.js +2 -0
- package/test/player_external.js +3 -2
- package/test/player_integration.js +75 -0
- package/test/test/externs/jasmine.js +6 -0
- package/test/test/util/test_scheme.js +32 -1
- package/test/test/util/ui_utils.js +41 -0
- package/test/ui/ui_unit.js +129 -3
- package/ui/audio_language_selection.js +17 -96
- package/ui/big_play_button.js +61 -0
- package/ui/controls.js +111 -86
- package/ui/controls.less +3 -5
- package/ui/externs/ui.js +14 -2
- package/ui/fullscreen_button.js +2 -52
- package/ui/less/buttons.less +8 -8
- package/ui/less/containers.less +21 -21
- package/ui/less/general.less +11 -0
- package/ui/less/other_elements.less +2 -1
- package/ui/less/overflow_menu.less +11 -10
- package/ui/less/range_elements.less +6 -0
- package/ui/less/spinner.less +2 -0
- package/ui/pip_button.js +1 -1
- package/ui/{play_pause_button.js → play_button.js} +17 -47
- package/ui/resolution_selection.js +41 -104
- package/ui/seek_bar.js +15 -17
- package/ui/settings_menu.js +113 -0
- package/ui/small_play_button.js +73 -0
- package/ui/text_displayer.js +2 -2
- package/ui/text_selection.js +39 -105
- package/ui/ui.js +12 -0
package/.csslintrc
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "stylelint-config-standard",
|
|
3
|
+
"rules": {
|
|
4
|
+
"font-family-no-missing-generic-family-keyword": null,
|
|
5
|
+
"declaration-block-single-line-max-declarations": null,
|
|
6
|
+
"max-line-length": [ 80, {
|
|
7
|
+
ignorePattern: "/^@import\\s+/",
|
|
8
|
+
}],
|
|
9
|
+
"selector-list-comma-newline-after": "never-multi-line",
|
|
10
|
+
"selector-pseudo-element-colon-notation": "single",
|
|
11
|
+
"unit-whitelist": ["em", "%", "px", "s", "deg", "vmin", "ms", "vh"]
|
|
12
|
+
}
|
|
13
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
## 2.5.5 (2019-08-23)
|
|
2
|
+
|
|
3
|
+
New Features:
|
|
4
|
+
- Conditionally remove FairPlay formatting
|
|
5
|
+
- https://github.com/google/shaka-player/issues/1951
|
|
6
|
+
- Add sessionId field to network request
|
|
7
|
+
- Make it easier to add custom overflow menu items
|
|
8
|
+
- https://github.com/google/shaka-player/issues/2091
|
|
9
|
+
- Add clearBufferOnQualityChange field to UI config
|
|
10
|
+
- https://github.com/google/shaka-player/issues/1733
|
|
11
|
+
- Allow filtering out failed HLS text tracks
|
|
12
|
+
- https://github.com/google/shaka-player/issues/2065
|
|
13
|
+
- Parse Accessibility tag into text "kind"
|
|
14
|
+
- https://github.com/google/shaka-player/issues/2060
|
|
15
|
+
- Re-add MediaSession API
|
|
16
|
+
- https://github.com/google/shaka-player/issues/1934
|
|
17
|
+
- Skip WebM streams in HLS instead of throwing
|
|
18
|
+
- https://github.com/google/shaka-player/issues/2108
|
|
19
|
+
- Convert `<mspr:pro>` elements to `pssh` init data
|
|
20
|
+
- https://github.com/google/shaka-player/pull/2106
|
|
21
|
+
- https://github.com/google/shaka-player/issues/2058
|
|
22
|
+
|
|
23
|
+
Bugfixes:
|
|
24
|
+
- Fix duplicate resolution entries in UI menu
|
|
25
|
+
- https://github.com/google/shaka-player/issues/2085
|
|
26
|
+
- Fix missing tracks, race on time during startup
|
|
27
|
+
- https://github.com/google/shaka-player/issues/2045
|
|
28
|
+
- Fix spinner position on IE11
|
|
29
|
+
- https://github.com/google/shaka-player/issues/2084
|
|
30
|
+
- Fix seek bar coloring when nothing buffered
|
|
31
|
+
- Fix scroll behavior on page load
|
|
32
|
+
- https://github.com/google/shaka-player/issues/2063
|
|
33
|
+
- Don't create a UI if the app already has one
|
|
34
|
+
- https://github.com/google/shaka-player/issues/2073
|
|
35
|
+
- Fix text display styling when fullscreen
|
|
36
|
+
- https://github.com/google/shaka-player/issues/2051
|
|
37
|
+
- Don't enter fullscreen on double click on bottom bar
|
|
38
|
+
- https://github.com/google/shaka-player/issues/2053
|
|
39
|
+
- Avoid errors when video ends
|
|
40
|
+
- https://github.com/google/shaka-player/issues/2050
|
|
41
|
+
- Fix fullscreen behavior on double click and rotate
|
|
42
|
+
- https://github.com/google/shaka-player/issues/2043
|
|
43
|
+
- Fix bug when clicking PIP button while casting
|
|
44
|
+
- https://github.com/google/shaka-player/issues/2044
|
|
45
|
+
- Fix CEA captions with multi-Period content
|
|
46
|
+
- https://github.com/google/shaka-player/issues/2075
|
|
47
|
+
- https://github.com/google/shaka-player/issues/2094
|
|
48
|
+
|
|
49
|
+
Demo App:
|
|
50
|
+
- Added more HLS demo assets
|
|
51
|
+
- https://github.com/google/shaka-player/issues/2035
|
|
52
|
+
- Exit PIP on unload in the demo
|
|
53
|
+
- https://github.com/google/shaka-player/issues/2055
|
|
54
|
+
- Re-added hidden 'noinput' param to demo
|
|
55
|
+
|
|
56
|
+
|
|
1
57
|
## 2.5.4 (2019-07-19)
|
|
2
58
|
|
|
3
59
|
Bugfixes:
|
package/build/build.py
CHANGED
|
@@ -169,7 +169,9 @@ class Build(object):
|
|
|
169
169
|
core_files = core_build.include
|
|
170
170
|
if self.exclude & core_files:
|
|
171
171
|
logging.error('Cannot exclude files from core')
|
|
172
|
+
return False
|
|
172
173
|
self.include |= core_files
|
|
174
|
+
return True
|
|
173
175
|
|
|
174
176
|
def has_ui(self):
|
|
175
177
|
"""Returns True if the UI library is in the build."""
|
|
@@ -264,7 +266,8 @@ class Build(object):
|
|
|
264
266
|
True on success; False on failure.
|
|
265
267
|
"""
|
|
266
268
|
self.add_closure()
|
|
267
|
-
self.add_core()
|
|
269
|
+
if not self.add_core():
|
|
270
|
+
return False
|
|
268
271
|
if self.has_ui():
|
|
269
272
|
self.generate_localizations(locales, force)
|
|
270
273
|
|
package/build/check.py
CHANGED
|
@@ -54,6 +54,22 @@ def check_js_lint(args):
|
|
|
54
54
|
return linter.lint(fix=args.fix, force=args.force)
|
|
55
55
|
|
|
56
56
|
|
|
57
|
+
def check_css_lint(args):
|
|
58
|
+
"""Runs the CSS linter."""
|
|
59
|
+
logging.info('Linting CSS...')
|
|
60
|
+
|
|
61
|
+
match = re.compile(r'.*\.(less|css)$')
|
|
62
|
+
base = shakaBuildHelpers.get_source_base()
|
|
63
|
+
def get(*path_components):
|
|
64
|
+
return shakaBuildHelpers.get_all_files(
|
|
65
|
+
os.path.join(base, *path_components), match)
|
|
66
|
+
files = (get('ui') + get('demo'));
|
|
67
|
+
config_path = os.path.join(base, '.csslintrc')
|
|
68
|
+
|
|
69
|
+
linter = compiler.CssLinter(files, config_path)
|
|
70
|
+
return linter.lint(fix=args.fix, force=args.force)
|
|
71
|
+
|
|
72
|
+
|
|
57
73
|
def check_html_lint(args):
|
|
58
74
|
"""Runs the HTML linter."""
|
|
59
75
|
logging.info('Linting HTML...')
|
|
@@ -169,6 +185,7 @@ def main(args):
|
|
|
169
185
|
steps = [
|
|
170
186
|
check_js_lint,
|
|
171
187
|
check_html_lint,
|
|
188
|
+
check_css_lint,
|
|
172
189
|
check_complete,
|
|
173
190
|
check_tests,
|
|
174
191
|
]
|
package/build/compiler.py
CHANGED
|
@@ -306,6 +306,46 @@ class Linter(object):
|
|
|
306
306
|
return True
|
|
307
307
|
|
|
308
308
|
|
|
309
|
+
class CssLinter(object):
|
|
310
|
+
def __init__(self, source_files, config_path):
|
|
311
|
+
self.source_files = _canonicalize_source_files(source_files)
|
|
312
|
+
self.config_path = config_path
|
|
313
|
+
self.output = _get_source_path('dist/.csslintstamp')
|
|
314
|
+
|
|
315
|
+
def lint(self, fix=False, force=False):
|
|
316
|
+
"""Run CSS linter checks on the files in |self.source_files|.
|
|
317
|
+
|
|
318
|
+
Args:
|
|
319
|
+
fix: If True, ask the linter to fix what errors it can automatically.
|
|
320
|
+
force: Run linter checks even if the inputs have not changed.
|
|
321
|
+
|
|
322
|
+
Returns:
|
|
323
|
+
True on success; False on failure.
|
|
324
|
+
"""
|
|
325
|
+
deps = self.source_files + [self.config_path]
|
|
326
|
+
if not force and not _must_build(self.output, deps):
|
|
327
|
+
return True
|
|
328
|
+
|
|
329
|
+
stylelint = shakaBuildHelpers.get_node_binary('stylelint')
|
|
330
|
+
cmd_line = stylelint + ['--config', self.config_path] + self.source_files
|
|
331
|
+
# Disables globbing, since that messes up our nightly tests, and we don't
|
|
332
|
+
# use it anyway.
|
|
333
|
+
# This is currently a flag added in a fork we maintain, but there is a pull
|
|
334
|
+
# request in progress for this.
|
|
335
|
+
# See: https://github.com/stylelint/stylelint/issues/4193
|
|
336
|
+
cmd_line += ['--disable-globbing'];
|
|
337
|
+
|
|
338
|
+
if fix:
|
|
339
|
+
cmd_line += ['--fix']
|
|
340
|
+
|
|
341
|
+
if shakaBuildHelpers.execute_get_code(cmd_line) != 0:
|
|
342
|
+
return False
|
|
343
|
+
|
|
344
|
+
# Update the timestamp of the file that tracks when we last updated.
|
|
345
|
+
_update_timestamp(self.output)
|
|
346
|
+
return True
|
|
347
|
+
|
|
348
|
+
|
|
309
349
|
class HtmlLinter(object):
|
|
310
350
|
def __init__(self, source_files, config_path):
|
|
311
351
|
self.source_files = _canonicalize_source_files(source_files)
|
package/build/types/core
CHANGED
package/build/types/ui
CHANGED
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
+../../third_party/language-mapping-list/language-mapping-list.js
|
|
4
4
|
+../../ui/audio_language_selection.js
|
|
5
5
|
+../../ui/externs/ui.js
|
|
6
|
+
+../../ui/play_button.js
|
|
7
|
+
+../../ui/big_play_button.js
|
|
6
8
|
+../../ui/cast_button.js
|
|
7
9
|
+../../ui/controls.js
|
|
8
10
|
+../../ui/constants.js
|
|
@@ -15,12 +17,13 @@
|
|
|
15
17
|
+../../ui/mute_button.js
|
|
16
18
|
+../../ui/overflow_menu.js
|
|
17
19
|
+../../ui/pip_button.js
|
|
18
|
-
+../../ui/
|
|
20
|
+
+../../ui/small_play_button.js
|
|
19
21
|
+../../ui/presentation_time.js
|
|
20
22
|
+../../ui/range_element.js
|
|
21
23
|
+../../ui/resolution_selection.js
|
|
22
24
|
+../../ui/rewind_button.js
|
|
23
25
|
+../../ui/seek_bar.js
|
|
26
|
+
+../../ui/settings_menu.js
|
|
24
27
|
+../../ui/spacer.js
|
|
25
28
|
+../../ui/text_displayer.js
|
|
26
29
|
+../../ui/text_selection.js
|
package/demo/asset_card.js
CHANGED
|
@@ -41,7 +41,14 @@ shakaDemo.AssetCard = class {
|
|
|
41
41
|
/** @private {!Element} */
|
|
42
42
|
this.featureIconsContainer_ = document.createElement('div');
|
|
43
43
|
/** @private {!Element} */
|
|
44
|
-
this.
|
|
44
|
+
this.progressCircle_ = document.createElement('div');
|
|
45
|
+
const svgns = 'http://www.w3.org/2000/svg';
|
|
46
|
+
/** @private {!Element} */
|
|
47
|
+
this.progressCircleSvg_ = document.createElementNS(svgns, 'svg');
|
|
48
|
+
/** @private {!Element} */
|
|
49
|
+
this.progressCircleBack_ = document.createElementNS(svgns, 'circle');
|
|
50
|
+
/** @private {!Element} */
|
|
51
|
+
this.progressCircleBar_ = document.createElementNS(svgns, 'circle');
|
|
45
52
|
/** @private {function(!shakaDemo.AssetCard)} */
|
|
46
53
|
this.remakeButtonsFn_ = remakeButtonsFn;
|
|
47
54
|
|
|
@@ -56,7 +63,8 @@ shakaDemo.AssetCard = class {
|
|
|
56
63
|
this.card_.appendChild(titleDiv);
|
|
57
64
|
const titleText = document.createElement('h2');
|
|
58
65
|
titleText.classList.add('mdl-card__title-text');
|
|
59
|
-
titleText.textContent =
|
|
66
|
+
titleText.textContent =
|
|
67
|
+
isFeatured ? (asset.shortName || asset.name) : asset.name;
|
|
60
68
|
titleDiv.appendChild(titleText);
|
|
61
69
|
|
|
62
70
|
if (asset.iconUri) {
|
|
@@ -95,12 +103,17 @@ shakaDemo.AssetCard = class {
|
|
|
95
103
|
this.actions_.classList.add('mdl-card--border');
|
|
96
104
|
this.card_.appendChild(this.actions_);
|
|
97
105
|
|
|
98
|
-
|
|
99
|
-
this.
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
|
|
103
|
-
this.
|
|
106
|
+
this.progressCircle_.classList.add('hidden');
|
|
107
|
+
this.progressCircle_.classList.add('progress-circle');
|
|
108
|
+
this.card_.appendChild(this.progressCircle_);
|
|
109
|
+
this.progressCircleSvg_.appendChild(this.progressCircleBack_);
|
|
110
|
+
this.progressCircleSvg_.appendChild(this.progressCircleBar_);
|
|
111
|
+
this.progressCircle_.appendChild(this.progressCircleSvg_);
|
|
112
|
+
// You can't use access the classList of an svg on IE, so set the class
|
|
113
|
+
// attribute instead.
|
|
114
|
+
this.progressCircleSvg_.setAttribute('class', 'progress-circle-svg');
|
|
115
|
+
this.progressCircleBack_.setAttribute('class', 'progress-circle-back');
|
|
116
|
+
this.progressCircleBar_.setAttribute('class', 'progress-circle-bar');
|
|
104
117
|
|
|
105
118
|
parentDiv.appendChild(this.card_);
|
|
106
119
|
// Remake buttons AFTER appending to parent div, so that any tooltips can
|
|
@@ -108,6 +121,23 @@ shakaDemo.AssetCard = class {
|
|
|
108
121
|
this.remakeButtons();
|
|
109
122
|
}
|
|
110
123
|
|
|
124
|
+
/**
|
|
125
|
+
* @param {number} progress
|
|
126
|
+
* @private
|
|
127
|
+
*/
|
|
128
|
+
styleProgressCircle_(progress) {
|
|
129
|
+
const svg = this.progressCircleSvg_;
|
|
130
|
+
const bar = this.progressCircleBar_;
|
|
131
|
+
const circleSize = 45;
|
|
132
|
+
const circleThickness = 5;
|
|
133
|
+
const circleRadius = (circleSize - circleThickness) / 2;
|
|
134
|
+
const circumference = 2 * Math.PI * circleRadius;
|
|
135
|
+
|
|
136
|
+
svg.setAttribute('viewBox', '0 0 ' + circleSize + ' ' + circleSize);
|
|
137
|
+
bar.setAttribute('stroke-dasharray', circumference);
|
|
138
|
+
bar.setAttribute('stroke-dashoffset', (circumference * (1 - progress)));
|
|
139
|
+
}
|
|
140
|
+
|
|
111
141
|
/**
|
|
112
142
|
* @param {string} icon
|
|
113
143
|
* @param {string} title
|
|
@@ -327,17 +357,17 @@ shakaDemo.AssetCard = class {
|
|
|
327
357
|
*/
|
|
328
358
|
updateProgress() {
|
|
329
359
|
if (this.asset_.storedProgress < 1) {
|
|
330
|
-
this.
|
|
360
|
+
this.progressCircle_.classList.remove('hidden');
|
|
331
361
|
for (const button of this.actions_.childNodes) {
|
|
332
362
|
button.disabled = true;
|
|
333
363
|
}
|
|
334
364
|
} else {
|
|
335
|
-
this.
|
|
365
|
+
this.progressCircle_.classList.add('hidden');
|
|
336
366
|
for (const button of this.actions_.childNodes) {
|
|
337
367
|
button.disabled = false;
|
|
338
368
|
}
|
|
339
369
|
}
|
|
340
|
-
this.
|
|
370
|
+
this.styleProgressCircle_(this.asset_.storedProgress);
|
|
341
371
|
}
|
|
342
372
|
|
|
343
373
|
/**
|
|
@@ -72,7 +72,6 @@ body {
|
|
|
72
72
|
* they will be visible on top until we decide to hide them and show the
|
|
73
73
|
* player. */
|
|
74
74
|
z-index: 99;
|
|
75
|
-
|
|
76
75
|
padding-top: 60px;
|
|
77
76
|
padding-left: 0;
|
|
78
77
|
background-color: black;
|
|
@@ -105,18 +104,25 @@ body:after {
|
|
|
105
104
|
}
|
|
106
105
|
|
|
107
106
|
@keyframes bg-change {
|
|
108
|
-
0%
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
107
|
+
0% { background-image: url('idle1.jpg'); padding-left: 0; }
|
|
108
|
+
|
|
109
|
+
32% { background-image: url('idle1.jpg'); padding-left: 0; }
|
|
110
|
+
|
|
111
|
+
34% { background-image: url('idle2.jpg'); padding-left: 0; }
|
|
112
|
+
|
|
113
|
+
49% { background-image: url('idle2.jpg'); padding-left: 0; }
|
|
114
|
+
|
|
115
|
+
50% { background-image: url('idle2.jpg'); padding-left: 400px; }
|
|
116
|
+
|
|
117
|
+
65% { background-image: url('idle2.jpg'); padding-left: 400px; }
|
|
118
|
+
|
|
119
|
+
67% { background-image: url('idle3.jpg'); padding-left: 400px; }
|
|
120
|
+
|
|
121
|
+
87% { background-image: url('idle3.jpg'); padding-left: 400px; }
|
|
122
|
+
|
|
123
|
+
88% { background-image: url('idle3.jpg'); padding-left: 0; }
|
|
124
|
+
|
|
125
|
+
98% { background-image: url('idle3.jpg'); padding-left: 0; }
|
|
120
126
|
|
|
121
127
|
100% { background-image: url('idle1.jpg'); padding-left: 0; }
|
|
122
128
|
}
|
package/demo/close_button.js
CHANGED
|
@@ -39,12 +39,6 @@ shakaDemo.CloseButton = class extends shaka.ui.Element {
|
|
|
39
39
|
this.parent.appendChild(this.button_);
|
|
40
40
|
|
|
41
41
|
this.button_.addEventListener('click', () => {
|
|
42
|
-
if (document.fullscreenElement) {
|
|
43
|
-
document.exitFullscreen();
|
|
44
|
-
}
|
|
45
|
-
if (document.pictureInPictureElement) {
|
|
46
|
-
document.exitPictureInPicture();
|
|
47
|
-
}
|
|
48
42
|
shakaDemoMain.unload();
|
|
49
43
|
});
|
|
50
44
|
|
package/demo/common/asset.js
CHANGED
|
@@ -136,7 +136,7 @@ const ShakaDemoAssetInfo = class {
|
|
|
136
136
|
* @return {!ShakaDemoAssetInfo}
|
|
137
137
|
*/
|
|
138
138
|
addKeySystem(keySystem) {
|
|
139
|
-
if (this.
|
|
139
|
+
if (this.isClear()) {
|
|
140
140
|
// Once an asset has an actual key system, it's no longer a CLEAR asset.
|
|
141
141
|
this.drm = [];
|
|
142
142
|
}
|
|
@@ -146,6 +146,11 @@ const ShakaDemoAssetInfo = class {
|
|
|
146
146
|
return this;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/** @return {boolean} */
|
|
150
|
+
isClear() {
|
|
151
|
+
return this.drm.length == 1 && this.drm[0] == shakaAssets.KeySystem.CLEAR;
|
|
152
|
+
}
|
|
153
|
+
|
|
149
154
|
/**
|
|
150
155
|
* @param {!Object} extraConfig
|
|
151
156
|
* @return {!ShakaDemoAssetInfo}
|
package/demo/common/assets.js
CHANGED
|
@@ -42,6 +42,8 @@ shakaAssets.Source = {
|
|
|
42
42
|
AZURE_MEDIA_SERVICES: 'Azure Media Services',
|
|
43
43
|
GPAC: 'GPAC',
|
|
44
44
|
UPLYNK: 'Verizon Digital Media Services',
|
|
45
|
+
APPLE: 'Apple',
|
|
46
|
+
IRT: 'IRT',
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
|
|
@@ -584,6 +586,17 @@ shakaAssets.testAssets = [
|
|
|
584
586
|
.addFeature(shakaAssets.Feature.HIGH_DEFINITION)
|
|
585
587
|
.addFeature(shakaAssets.Feature.MP4)
|
|
586
588
|
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
589
|
+
new ShakaDemoAssetInfo(
|
|
590
|
+
/* name= */ 'Tears of Steel (HLS, Subtitles)',
|
|
591
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/tears_of_steel.png',
|
|
592
|
+
/* manifestUri= */ 'https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-multiple-subtitles.ism/.m3u8',
|
|
593
|
+
/* source= */ shakaAssets.Source.UNIFIED_STREAMING)
|
|
594
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
595
|
+
.addFeature(shakaAssets.Feature.HIGH_DEFINITION)
|
|
596
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
597
|
+
.addFeature(shakaAssets.Feature.SUBTITLES)
|
|
598
|
+
.addFeature(shakaAssets.Feature.WEBVTT)
|
|
599
|
+
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
587
600
|
new ShakaDemoAssetInfo(
|
|
588
601
|
/* name= */ 'Tears of Steel (Widevine)',
|
|
589
602
|
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/tears_of_steel.png',
|
|
@@ -948,19 +961,64 @@ shakaAssets.testAssets = [
|
|
|
948
961
|
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/sintel.png',
|
|
949
962
|
/* manifestUri= */ 'https://content.uplynk.com/1eb40d8e64234f5c9879db7045c3d48c.mpd?ad=cleardash&rays=cdefg',
|
|
950
963
|
/* source= */ shakaAssets.Source.UPLYNK)
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
964
|
+
// Disabled until we figure out the CORS errors and PlayReady status.
|
|
965
|
+
.markAsDisabled()
|
|
966
|
+
.addKeySystem(shakaAssets.KeySystem.WIDEVINE)
|
|
967
|
+
.addFeature(shakaAssets.Feature.DASH)
|
|
968
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
969
|
+
.addFeature(shakaAssets.Feature.MULTIPLE_LANGUAGES)
|
|
970
|
+
.addFeature(shakaAssets.Feature.MULTIPERIOD)
|
|
971
|
+
.addFeature(shakaAssets.Feature.MULTIKEY)
|
|
972
|
+
.addFeature(shakaAssets.Feature.HIGH_DEFINITION)
|
|
973
|
+
.addFeature(shakaAssets.Feature.AESCTR_16_BYTE_IV)
|
|
974
|
+
.addFeature(shakaAssets.Feature.ENCRYPTED_WITH_CLEAR)
|
|
975
|
+
.addLicenseServer('com.widevine.alpha', 'https://content.uplynk.com/wv')
|
|
976
|
+
.setRequestFilter(shakaAssets.UplynkRequestFilter)
|
|
977
|
+
.setResponseFilter(shakaAssets.UplynkResponseFilter),
|
|
978
|
+
// End Verizon Digital Media Services (VDMS) assets }}}
|
|
979
|
+
|
|
980
|
+
// Apple assets {{{
|
|
981
|
+
// Src: https://developer.apple.com/streaming/examples/
|
|
982
|
+
new ShakaDemoAssetInfo(
|
|
983
|
+
/* name= */ 'Apple Advanced HLS Stream (fMP4)',
|
|
984
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/apple_test_pattern.png',
|
|
985
|
+
/* manifestUri= */ 'https://storage.googleapis.com/shaka-demo-assets/apple-advanced-stream-fmp4/master.m3u8',
|
|
986
|
+
/* source= */ shakaAssets.Source.APPLE)
|
|
987
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
988
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
989
|
+
.addFeature(shakaAssets.Feature.CAPTIONS)
|
|
990
|
+
.addFeature(shakaAssets.Feature.WEBVTT)
|
|
991
|
+
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
992
|
+
new ShakaDemoAssetInfo(
|
|
993
|
+
/* name= */ 'Apple Advanced HLS Stream (TS)',
|
|
994
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/apple_test_pattern.png',
|
|
995
|
+
/* manifestUri= */ 'https://storage.googleapis.com/shaka-demo-assets/apple-advanced-stream-ts/master.m3u8',
|
|
996
|
+
/* source= */ shakaAssets.Source.APPLE)
|
|
997
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
998
|
+
.addFeature(shakaAssets.Feature.MP2TS)
|
|
999
|
+
.addFeature(shakaAssets.Feature.CAPTIONS)
|
|
1000
|
+
.addFeature(shakaAssets.Feature.WEBVTT)
|
|
1001
|
+
.addFeature(shakaAssets.Feature.OFFLINE),
|
|
1002
|
+
// }}}
|
|
1003
|
+
|
|
1004
|
+
// IRT assets {{{
|
|
1005
|
+
// Src: http://subtitling.irt.de/cmaf/#urls
|
|
1006
|
+
// Note: According to the website, these assets may not be available 24/7.
|
|
1007
|
+
new ShakaDemoAssetInfo(
|
|
1008
|
+
/* name= */ 'Bayerischer Rundfunk Recorded Loop (DASH)',
|
|
1009
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/bayerischer_rundfunk.png',
|
|
1010
|
+
/* manifestUri= */ 'https://irtdashreference-i.akamaihd.net/dash/live/901161/keepixo1/manifestBR2.mpd',
|
|
1011
|
+
/* source= */ shakaAssets.Source.IRT)
|
|
1012
|
+
.addFeature(shakaAssets.Feature.DASH)
|
|
1013
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
1014
|
+
.addFeature(shakaAssets.Feature.LIVE),
|
|
1015
|
+
new ShakaDemoAssetInfo(
|
|
1016
|
+
/* name= */ 'Bayerischer Rundfunk Recorded Loop (HLS)',
|
|
1017
|
+
/* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/bayerischer_rundfunk.png',
|
|
1018
|
+
/* manifestUri= */ 'https://irtdashreference-i.akamaihd.net/dash/live/901161/keepixo1/playlistBR2.m3u8',
|
|
1019
|
+
/* source= */ shakaAssets.Source.IRT)
|
|
1020
|
+
.addFeature(shakaAssets.Feature.HLS)
|
|
1021
|
+
.addFeature(shakaAssets.Feature.MP4)
|
|
1022
|
+
.addFeature(shakaAssets.Feature.LIVE),
|
|
965
1023
|
// }}}
|
|
966
1024
|
];
|