shaka-player 4.2.1 → 4.2.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.
- package/.github/workflows/build-and-test.yaml +31 -16
- package/.github/workflows/custom-actions/set-commit-status/action.yaml +1 -5
- package/.github/workflows/deflake.yaml +28 -0
- package/.github/workflows/selenium-lab-tests.yaml +13 -4
- package/AUTHORS +3 -0
- package/CHANGELOG.md +19 -0
- package/CONTRIBUTORS +3 -0
- package/demo/common/message_ids.js +1 -0
- package/demo/config.js +3 -1
- package/demo/locales/en.json +1 -0
- package/demo/locales/source.json +4 -0
- package/dist/demo.compiled.debug.js +7 -6
- package/dist/demo.compiled.debug.map +3 -3
- package/dist/demo.compiled.js +7 -6
- package/dist/demo.compiled.map +3 -3
- package/dist/deps.js +2 -2
- package/dist/locales.js +32 -32
- package/dist/receiver.compiled.debug.js +4 -3
- package/dist/receiver.compiled.debug.map +3 -3
- package/dist/receiver.compiled.js +4 -3
- package/dist/receiver.compiled.map +3 -3
- package/dist/shaka-player.compiled.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.d.ts +2 -2
- package/dist/shaka-player.compiled.debug.externs.js +24 -24
- package/dist/shaka-player.compiled.debug.js +237 -229
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +24 -24
- package/dist/shaka-player.compiled.js +744 -741
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +2 -2
- package/dist/shaka-player.ui.debug.d.ts +2 -2
- package/dist/shaka-player.ui.debug.externs.js +24 -24
- package/dist/shaka-player.ui.debug.js +212 -203
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +24 -24
- package/dist/shaka-player.ui.js +905 -901
- package/dist/shaka-player.ui.map +4 -4
- package/docs/jsdoc-template/publish.js +33 -0
- package/docs/jsdoc-template/tmpl/container.tmpl +4 -1
- package/docs/jsdoc.conf.json +1 -0
- package/externs/shaka/manifest_parser.js +4 -1
- package/externs/shaka/player.js +7 -1
- package/lib/ads/client_side_ad_manager.js +7 -0
- package/lib/cast/cast_sender.js +39 -14
- package/lib/cea/cea608_memory.js +4 -0
- package/lib/hls/hls_parser.js +30 -8
- package/lib/media/drm_engine.js +52 -1
- package/lib/media/media_source_engine.js +43 -15
- package/lib/media/segment_index.js +4 -1
- package/lib/media/streaming_engine.js +79 -14
- package/lib/offline/storage.js +1 -0
- package/lib/player.js +17 -5
- package/lib/text/ttml_text_parser.js +6 -0
- package/lib/util/platform.js +24 -0
- package/lib/util/player_configuration.js +4 -0
- package/lib/util/pssh.js +2 -1
- package/lib/util/stream_utils.js +2 -1
- package/package.json +1 -1
- package/test/cea/cea608_memory_unit.js +88 -0
- package/test/dash/dash_parser_content_protection_unit.js +1 -0
- package/test/dash/dash_parser_live_unit.js +1 -0
- package/test/dash/dash_parser_manifest_unit.js +1 -0
- package/test/dash/dash_parser_segment_base_unit.js +1 -0
- package/test/dash/dash_parser_segment_list_unit.js +1 -0
- package/test/dash/dash_parser_segment_template_unit.js +1 -0
- package/test/hls/hls_live_unit.js +169 -247
- package/test/hls/hls_parser_unit.js +60 -2
- package/test/media/drm_engine_unit.js +61 -0
- package/test/media/media_source_engine_integration.js +36 -0
- package/test/media/media_source_engine_unit.js +118 -1
- package/test/media/segment_index_unit.js +28 -2
- package/test/media/streaming_engine_integration.js +9 -7
- package/test/media/streaming_engine_unit.js +29 -0
- package/test/offline/offline_integration.js +3 -3
- package/test/player_integration.js +2 -2
- package/test/test/util/dash_parser_util.js +2 -0
- package/test/test/util/ttml_utils.js +0 -2
- package/test/text/ttml_text_parser_unit.js +46 -0
- package/test/ui/text_displayer_layout_unit.js +17 -2
- package/ui/controls.js +0 -7
|
@@ -41,9 +41,11 @@ jobs:
|
|
|
41
41
|
include:
|
|
42
42
|
# Run Linux browsers with xvfb, so they're in a headless X session.
|
|
43
43
|
# Additionally, generate a code coverage report from Linux Chrome.
|
|
44
|
+
# It should be the uncompiled build, or else we won't execute any
|
|
45
|
+
# coverage instrumentation on full-stack player integration tests.
|
|
44
46
|
- os: ubuntu-latest
|
|
45
47
|
browser: Chrome
|
|
46
|
-
extra_flags: "--use-xvfb --html-coverage-report"
|
|
48
|
+
extra_flags: "--use-xvfb --html-coverage-report --uncompiled"
|
|
47
49
|
- os: ubuntu-latest
|
|
48
50
|
browser: Firefox
|
|
49
51
|
extra_flags: "--use-xvfb"
|
|
@@ -57,7 +59,7 @@ jobs:
|
|
|
57
59
|
- os: macos-latest
|
|
58
60
|
browser: Safari
|
|
59
61
|
- os: macos-latest
|
|
60
|
-
browser: Safari-
|
|
62
|
+
browser: Safari-old
|
|
61
63
|
|
|
62
64
|
- os: windows-latest
|
|
63
65
|
browser: Chrome
|
|
@@ -87,21 +89,22 @@ jobs:
|
|
|
87
89
|
with:
|
|
88
90
|
ref: ${{ github.event.inputs.ref || github.ref }}
|
|
89
91
|
|
|
90
|
-
# Safari
|
|
91
|
-
# the standard version, at least not on GitHub's VMs. If
|
|
92
|
-
# install directly to the root with sudo, it will appear to
|
|
93
|
-
# will have no effect. If you try to script it explicitly
|
|
94
|
-
# and cp, this will fail. Safari may be on a read-only
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
# Older versions of Safari can be installed, but not to the root, and it
|
|
93
|
+
# can't replace the standard version, at least not on GitHub's VMs. If
|
|
94
|
+
# you try to install directly to the root with sudo, it will appear to
|
|
95
|
+
# succeed, but will have no effect. If you try to script it explicitly
|
|
96
|
+
# with rm -rf and cp, this will fail. Safari may be on a read-only
|
|
97
|
+
# filesystem.
|
|
98
|
+
- name: Install old Safari to home directory
|
|
99
|
+
if: matrix.os == 'macos-latest' && matrix.browser == 'Safari-old'
|
|
97
100
|
run: |
|
|
98
|
-
# Download Safari
|
|
99
|
-
#
|
|
100
|
-
|
|
101
|
+
# Download Safari 15
|
|
102
|
+
# This URL discovered through the seed files listed at
|
|
103
|
+
# https://github.com/zhangyoufu/swscan.apple.com/blob/master/url.txt
|
|
104
|
+
curl -Lv http://swcdn.apple.com/content/downloads/42/33/012-57329-A_41P2VU6UHN/5fw5vna27fdw4mqfak5adj3pjpxvo9hgh7/Safari15.6.1CatalinaAuto.pkg > Safari.pkg
|
|
101
105
|
|
|
102
|
-
# Install Safari
|
|
103
|
-
|
|
104
|
-
installer -pkg Safari14.0CatalinaAuto.pkg -target CurrentUserHomeDirectory
|
|
106
|
+
# Install older Safari to homedir specifically.
|
|
107
|
+
installer -pkg Safari.pkg -target CurrentUserHomeDirectory
|
|
105
108
|
|
|
106
109
|
# Install a launcher that can execute a shell script to launch this
|
|
107
110
|
npm install karma-script-launcher --save-dev
|
|
@@ -114,7 +117,7 @@ jobs:
|
|
|
114
117
|
run: |
|
|
115
118
|
browser=${{ matrix.browser }}
|
|
116
119
|
|
|
117
|
-
if [[ "$browser" == "Safari-
|
|
120
|
+
if [[ "$browser" == "Safari-old" ]]; then
|
|
118
121
|
# Replace the browser name with a script that can launch this
|
|
119
122
|
# browser from the command line.
|
|
120
123
|
browser="$PWD/.github/workflows/safari-homedir-launcher.sh"
|
|
@@ -165,6 +168,18 @@ jobs:
|
|
|
165
168
|
# an environment variable set, the file should definitely be there.
|
|
166
169
|
if-no-files-found: error
|
|
167
170
|
|
|
171
|
+
# Upload new screenshots and diffs on failure; ignore if missing
|
|
172
|
+
- name: Upload screenshots
|
|
173
|
+
uses: actions/upload-artifact@v3
|
|
174
|
+
if: ${{ failure() }}
|
|
175
|
+
with:
|
|
176
|
+
name: screenshots-${{ matrix.browser }}
|
|
177
|
+
path: |
|
|
178
|
+
test/test/assets/screenshots/*/*.png-new
|
|
179
|
+
test/test/assets/screenshots/*/*.png-diff
|
|
180
|
+
if-no-files-found: ignore
|
|
181
|
+
retention-days: 5
|
|
182
|
+
|
|
168
183
|
build_in_docker:
|
|
169
184
|
# Don't waste time doing a full matrix of test runs when there was an
|
|
170
185
|
# obvious linter error.
|
|
@@ -11,10 +11,6 @@ inputs:
|
|
|
11
11
|
state:
|
|
12
12
|
description: Either "pending", "error", "success", or "failure".
|
|
13
13
|
required: true
|
|
14
|
-
ref:
|
|
15
|
-
description: A git ref for which to set the commit status. For PRs, use the head commit, not the merge commit. Defaults to HEAD.
|
|
16
|
-
required: false
|
|
17
|
-
default: HEAD
|
|
18
14
|
token:
|
|
19
15
|
description: A GitHub access token.
|
|
20
16
|
required: true
|
|
@@ -30,7 +26,7 @@ runs:
|
|
|
30
26
|
# next to the status on the PR, it will link to this run where they can
|
|
31
27
|
# see the logs.
|
|
32
28
|
RUN_URL="https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}"
|
|
33
|
-
SHA1=$(git rev-parse
|
|
29
|
+
SHA1=$(git rev-parse HEAD)
|
|
34
30
|
|
|
35
31
|
GITHUB_TOKEN=${{ inputs.token }} \
|
|
36
32
|
gh api \
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Deflake Tests
|
|
2
|
+
|
|
3
|
+
# Runs when the Selenum nightly test workflow completes. This will run with
|
|
4
|
+
# full privileges, even if the other workflow doesn't. That allows us to
|
|
5
|
+
# trigger re-runs if we think the results might be flaky.
|
|
6
|
+
on:
|
|
7
|
+
workflow_run:
|
|
8
|
+
workflows: [Selenium Lab Tests]
|
|
9
|
+
types: [completed]
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
deflake:
|
|
13
|
+
if: ${{ github.event.workflow_run.event == 'schedule' && github.event.workflow_run.conclusion == 'failure' }}
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- name: Check run count and re-run workflow
|
|
18
|
+
env:
|
|
19
|
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
20
|
+
run: |
|
|
21
|
+
gh api /repos/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }} > run.json
|
|
22
|
+
RUNS=$(jq -r .run_attempt < run.json)
|
|
23
|
+
if [[ "$RUNS" -lt 3 ]]; then
|
|
24
|
+
echo "$RUNS failed runs so far; re-running workflow."
|
|
25
|
+
gh run rerun ${{ github.event.workflow_run.id }} --failed -R ${{ github.repository }}
|
|
26
|
+
else
|
|
27
|
+
echo "$RUNS failed runs so far; not re-running workflow."
|
|
28
|
+
fi
|
|
@@ -47,7 +47,7 @@ jobs:
|
|
|
47
47
|
steps:
|
|
48
48
|
- uses: actions/checkout@v2
|
|
49
49
|
with:
|
|
50
|
-
ref: ${{ needs.compute-ref.REF }}
|
|
50
|
+
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
51
51
|
|
|
52
52
|
- name: Install dependencies
|
|
53
53
|
run: npm ci
|
|
@@ -92,7 +92,7 @@ jobs:
|
|
|
92
92
|
steps:
|
|
93
93
|
- uses: actions/checkout@v2
|
|
94
94
|
with:
|
|
95
|
-
ref: ${{ needs.compute-ref.REF }}
|
|
95
|
+
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
96
96
|
|
|
97
97
|
- name: Set commit status to pending
|
|
98
98
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
@@ -134,7 +134,7 @@ jobs:
|
|
|
134
134
|
steps:
|
|
135
135
|
- uses: actions/checkout@v2
|
|
136
136
|
with:
|
|
137
|
-
ref: ${{ needs.compute-ref.REF }}
|
|
137
|
+
ref: ${{ needs.compute-ref.outputs.REF }}
|
|
138
138
|
|
|
139
139
|
- name: Set commit status to pending
|
|
140
140
|
uses: ./.github/workflows/custom-actions/set-commit-status
|
|
@@ -180,6 +180,15 @@ jobs:
|
|
|
180
180
|
# the container.
|
|
181
181
|
- name: Test Player
|
|
182
182
|
run: |
|
|
183
|
+
# Generate a coverage report from uncompiled code on ChromeLinux.
|
|
184
|
+
# It should be the uncompiled build, or else we won't execute any
|
|
185
|
+
# coverage instrumentation on full-stack player integration tests.
|
|
186
|
+
if [[ "${{ matrix.browser }}" == "ChromeLinux" ]]; then
|
|
187
|
+
extra_flags="--html-coverage-report --uncompiled"
|
|
188
|
+
else
|
|
189
|
+
extra_flags=""
|
|
190
|
+
fi
|
|
191
|
+
|
|
183
192
|
python3 build/test.py \
|
|
184
193
|
--no-build \
|
|
185
194
|
--reporters spec --spec-hide-passed \
|
|
@@ -189,7 +198,7 @@ jobs:
|
|
|
189
198
|
--grid-config build/shaka-lab.yaml \
|
|
190
199
|
--grid-address selenium-grid.lab:4444 \
|
|
191
200
|
--browsers ${{ matrix.browser }} \
|
|
192
|
-
|
|
201
|
+
$extra_flags
|
|
193
202
|
|
|
194
203
|
- name: Find coverage report (ChromeLinux only)
|
|
195
204
|
id: coverage
|
package/AUTHORS
CHANGED
|
@@ -37,6 +37,7 @@ Giorgio Gamberoni <giorgio.gamberoni@gmail.com>
|
|
|
37
37
|
Giuseppe Samela <giuseppe.samela@gmail.com>
|
|
38
38
|
Google Inc. <*@google.com>
|
|
39
39
|
Itay Kinnrot <Itay.Kinnrot@Kaltura.com>
|
|
40
|
+
Jaeseok Lee <devsunb@gmail.com>
|
|
40
41
|
Jason Palmer <jason@jason-palmer.com>
|
|
41
42
|
Jesper Haug Karsrud <jesper.karsrud@gmail.com>
|
|
42
43
|
Johan Sundström <oyasumi@gmail.com>
|
|
@@ -69,6 +70,7 @@ SameGoal Inc. <*@samegoal.com>
|
|
|
69
70
|
Sanborn Hilland <sanbornh@rogers.com>
|
|
70
71
|
Sander Saares <sander@saares.eu>
|
|
71
72
|
Sanil Raut <sr1990003@gmail.com>
|
|
73
|
+
Seongryun Jo <ocipap0531@gmail.com>
|
|
72
74
|
Swank Motion Pictures Inc. <*@swankmp.com>
|
|
73
75
|
TalkTalk Plc <*@talktalkplc.com>
|
|
74
76
|
Tatsiana Gelahova <tatsiana.gelahova@gmail.com>
|
|
@@ -81,3 +83,4 @@ ViacomCBS <*@viacomcbs.com>
|
|
|
81
83
|
Vincent Valot <valot.vince@gmail.com>
|
|
82
84
|
Wayne Morgan <wayne.morgan.dev@gmail.com>
|
|
83
85
|
Raymond Cheng <raycheng100@gmail.com>
|
|
86
|
+
Blue Billywig <*@bluebillywig.com>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.2.2](https://github.com/shaka-project/shaka-player/compare/v4.2.1...v4.2.2) (2022-10-07)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* allow build without text ([#4506](https://github.com/shaka-project/shaka-player/issues/4506)) ([7e93720](https://github.com/shaka-project/shaka-player/commit/7e9372097567d8d0f93c04e241fb917945da05bf))
|
|
9
|
+
* allow the playback on platforms when low latency APIs are not supported ([#4485](https://github.com/shaka-project/shaka-player/issues/4485)) ([cf8c857](https://github.com/shaka-project/shaka-player/commit/cf8c857e58f041e24373e8b4f7d560287197cf13))
|
|
10
|
+
* check for negative rows before moving ([#4510](https://github.com/shaka-project/shaka-player/issues/4510)) ([23f39d7](https://github.com/shaka-project/shaka-player/commit/23f39d7393c771440fc76ac9016b166d658710b2)), closes [#4508](https://github.com/shaka-project/shaka-player/issues/4508)
|
|
11
|
+
* Filter unsupported H.264 streams in Xbox ([#4493](https://github.com/shaka-project/shaka-player/issues/4493)) ([914a08a](https://github.com/shaka-project/shaka-player/commit/914a08a4d08bed284a072aed52b0bf8fcbdc6986))
|
|
12
|
+
* Fix choppy HLS startup ([#4553](https://github.com/shaka-project/shaka-player/issues/4553)) ([950ce69](https://github.com/shaka-project/shaka-player/commit/950ce699a06bb9e7668b431f4f08052c005f2e8a)), closes [#4516](https://github.com/shaka-project/shaka-player/issues/4516)
|
|
13
|
+
* Fix errors with TS segments on Chromecast ([#4543](https://github.com/shaka-project/shaka-player/issues/4543)) ([8204db6](https://github.com/shaka-project/shaka-player/commit/8204db6ebc152cb01c36db941ca60bc82ccbe443))
|
|
14
|
+
* Fix hang when seeking to the last segment ([#4537](https://github.com/shaka-project/shaka-player/issues/4537)) ([3d6c768](https://github.com/shaka-project/shaka-player/commit/3d6c768cb302de42138aec8fdf51dff8317c5607))
|
|
15
|
+
* Fix HLS dynamic to static transition ([d9ecbf3](https://github.com/shaka-project/shaka-player/commit/d9ecbf3fccb886e10a491c43e05e681fe2103a2d))
|
|
16
|
+
* Fix HLS dynamic to static transition ([#4483](https://github.com/shaka-project/shaka-player/issues/4483)) ([d9ecbf3](https://github.com/shaka-project/shaka-player/commit/d9ecbf3fccb886e10a491c43e05e681fe2103a2d)), closes [#4431](https://github.com/shaka-project/shaka-player/issues/4431)
|
|
17
|
+
* Fix in-band key rotation on Xbox One ([#4478](https://github.com/shaka-project/shaka-player/issues/4478)) ([bc0a588](https://github.com/shaka-project/shaka-player/commit/bc0a588676828eb68bdca62efe52cb503feb947d)), closes [#4401](https://github.com/shaka-project/shaka-player/issues/4401)
|
|
18
|
+
* Missing AES-128 key of last HLS segment ([#4519](https://github.com/shaka-project/shaka-player/issues/4519)) ([2c2677f](https://github.com/shaka-project/shaka-player/commit/2c2677fe7af10e1280ea8253b90ef6527bdcbbc0)), closes [#4517](https://github.com/shaka-project/shaka-player/issues/4517)
|
|
19
|
+
* Respect existing app usage of Cast SDK ([#4523](https://github.com/shaka-project/shaka-player/issues/4523)) ([3db2568](https://github.com/shaka-project/shaka-player/commit/3db2568508cfc827fd9efc644096a45220eb617b)), closes [#4521](https://github.com/shaka-project/shaka-player/issues/4521)
|
|
20
|
+
* **ttml:** Default TTML background color to transparent if unspecified ([#4496](https://github.com/shaka-project/shaka-player/issues/4496)) ([0b5c985](https://github.com/shaka-project/shaka-player/commit/0b5c9853a6a39cb24ab1270598bf34d2ac1eacf0)), closes [#4468](https://github.com/shaka-project/shaka-player/issues/4468)
|
|
21
|
+
|
|
3
22
|
## [4.2.1](https://github.com/shaka-project/shaka-player/compare/v4.2.0...v4.2.1) (2022-08-31)
|
|
4
23
|
|
|
5
24
|
|
package/CONTRIBUTORS
CHANGED
|
@@ -57,6 +57,7 @@ Hichem Taoufik <hichem@code-it.fr>
|
|
|
57
57
|
Itay Kinnrot <itay.kinnrot@kaltura.com>
|
|
58
58
|
Isaac Ramirez <isaac.ramirez.herrera@gmail.com>
|
|
59
59
|
Jacob Trimble <modmaker@google.com>
|
|
60
|
+
Jaeseok Lee <devsunb@gmail.com>
|
|
60
61
|
Jason Palmer <jason@jason-palmer.com>
|
|
61
62
|
Jeffrey Swan <jeffdswan@gmail.com>
|
|
62
63
|
Jesper Haug Karsrud <jesper.karsrud@gmail.com>
|
|
@@ -104,6 +105,7 @@ Sandra Lokshina <ismena@google.com>
|
|
|
104
105
|
Sanil Raut <sr1990003@gmail.com>
|
|
105
106
|
Satheesh Velmurugan <satheesh@philo.com>
|
|
106
107
|
Semih Gokceoglu <semih.gkcoglu@gmail.com>
|
|
108
|
+
Seongryun Jo <ocipap0531@gmail.com>
|
|
107
109
|
Seth Madison <seth@philo.com>
|
|
108
110
|
Tatsiana Gelahova <tatsiana.gelahova@gmail.com>
|
|
109
111
|
Theodore Abshire <theodab@google.com>
|
|
@@ -121,3 +123,4 @@ Vincent Valot <valot.vince@gmail.com>
|
|
|
121
123
|
Wayne Morgan <wayne.morgan.dev@gmail.com>
|
|
122
124
|
Yohann Connell <robinconnell@google.com>
|
|
123
125
|
Raymond Cheng <raycheng100@gmail.com>
|
|
126
|
+
Janroel Koppen <j.koppen@bluebillywig.com>
|
|
@@ -227,6 +227,7 @@ shakaDemo.MessageIds = {
|
|
|
227
227
|
NUMBER_NONZERO_INTEGER_WARNING: 'DEMO_NUMBER_NONZERO_INTEGER_WARNING',
|
|
228
228
|
NUMBER_OF_PARALLEL_DOWNLOADS: 'DEMO_NUMBER_OF_PARALLEL_DOWNLOADS',
|
|
229
229
|
OFFLINE_SECTION_HEADER: 'DEMO_OFFLINE_SECTION_HEADER',
|
|
230
|
+
PARSE_INBAND_PSSH_ENABLED: 'DEMO_PARSE_INBAND_PSSH_ENABLED',
|
|
230
231
|
PREFER_FORCED_SUBS: 'DEMO_PREFER_FORCED_SUBS',
|
|
231
232
|
PREFER_NATIVE_HLS: 'DEMO_PREFER_NATIVE_HLS',
|
|
232
233
|
REBUFFERING_GOAL: 'DEMO_REBUFFERING_GOAL',
|
package/demo/config.js
CHANGED
|
@@ -131,7 +131,9 @@ shakaDemo.Config = class {
|
|
|
131
131
|
'drm.updateExpirationTime',
|
|
132
132
|
/* canBeDecimal= */ true,
|
|
133
133
|
/* canBeZero= */ false,
|
|
134
|
-
/* canBeUnset= */ true)
|
|
134
|
+
/* canBeUnset= */ true)
|
|
135
|
+
.addBoolInput_(MessageIds.PARSE_INBAND_PSSH_ENABLED,
|
|
136
|
+
'drm.parseInbandPsshEnabled');
|
|
135
137
|
const advanced = shakaDemoMain.getConfiguration().drm.advanced || {};
|
|
136
138
|
const addDRMAdvancedField = (name, valueName, suggestions) => {
|
|
137
139
|
// All advanced fields of a given type are set at once.
|
package/demo/locales/en.json
CHANGED
|
@@ -163,6 +163,7 @@
|
|
|
163
163
|
"DEMO_NUMBER_NONZERO_INTEGER_WARNING": "Must be a positive, nonzero integer.",
|
|
164
164
|
"DEMO_NUMBER_OF_PARALLEL_DOWNLOADS": "Number of parallel downloads",
|
|
165
165
|
"DEMO_OBSERVE_QUALITY_CHANGES": "Observe media quality changes",
|
|
166
|
+
"DEMO_PARSE_INBAND_PSSH_ENABLED": "Parse inband 'pssh' from media segments",
|
|
166
167
|
"DEMO_OFFLINE": "Downloadable",
|
|
167
168
|
"DEMO_OFFLINE_SEARCH": "Filters for assets that can be stored offline.",
|
|
168
169
|
"DEMO_OFFLINE_SECTION_HEADER": "Offline",
|
package/demo/locales/source.json
CHANGED
|
@@ -679,6 +679,10 @@
|
|
|
679
679
|
"description": "The label on a field that allows users to provide a full mime type for a custom asset.",
|
|
680
680
|
"message": "Full Mime Type for Playing Media Playlists Directly"
|
|
681
681
|
},
|
|
682
|
+
"DEMO_PARSE_INBAND_PSSH_ENABLED": {
|
|
683
|
+
"description": "The name of a configuration value.",
|
|
684
|
+
"message": "Parse inband 'pssh' from media segments"
|
|
685
|
+
},
|
|
682
686
|
"DEMO_PLAY": {
|
|
683
687
|
"description": "A button to play the attached asset.",
|
|
684
688
|
"message": "Play"
|
|
@@ -143,9 +143,10 @@ ENABLED:"DEMO_ENABLED",FAST_HALF_LIFE:"DEMO_FAST_HALF_LIFE",FORCE_HTTPS:"DEMO_FO
|
|
|
143
143
|
IGNORE_HLS_IMAGE_FAILURES:"DEMO_IGNORE_HLS_IMAGE_FAILURES",IGNORE_HLS_TEXT_FAILURES:"DEMO_IGNORE_HLS_TEXT_FAILURES",IGNORE_MANIFEST_PROGRAM_DATE_TIME:"DEMO_IGNORE_MANIFEST_PROGRAM_DATE_TIME",IGNORE_MIN_BUFFER_TIME:"DEMO_IGNORE_MIN_BUFFER_TIME",IGNORE_TEXT_FAILURES:"DEMO_IGNORE_TEXT_FAILURES",INACCURATE_MANIFEST_TOLERANCE:"DEMO_INACCURATE_MANIFEST_TOLERANCE",INITIAL_SEGMENT_LIMIT:"DEMO_INITIAL_SEGMENT_LIMIT",LANGUAGE_SECTION_HEADER:"DEMO_LANGUAGE_SECTION_HEADER",LOG_LEVEL:"DEMO_LOG_LEVEL",LOG_LEVEL_DEBUG:"DEMO_LOG_LEVEL_DEBUG",
|
|
144
144
|
LOG_LEVEL_INFO:"DEMO_LOG_LEVEL_INFO",LOG_LEVEL_V:"DEMO_LOG_LEVEL_V",LOG_LEVEL_VV:"DEMO_LOG_LEVEL_VV",LOG_LICENSE_EXCHANGE:"DEMO_LOG_LICENSE_EXCHANGE",LOW_LATENCY:"DEMO_LOW_LATENCY",MANIFEST_RETRY_SECTION_HEADER:"DEMO_MANIFEST_RETRY_SECTION_HEADER",MANIFEST_SECTION_HEADER:"DEMO_MANIFEST_SECTION_HEADER",MAX_ATTEMPTS:"DEMO_MAX_ATTEMPTS",MAX_BANDWIDTH:"DEMO_MAX_BANDWIDTH",MAX_DISABLED_TIME:"DEMO_MAX_DISABLED_TIME",MAX_FRAMERATE:"DEMO_MAX_FRAMERATE",MAX_HEIGHT:"DEMO_MAX_HEIGHT",MAX_PIXELS:"DEMO_MAX_PIXELS",
|
|
145
145
|
MAX_WIDTH:"DEMO_MAX_WIDTH",MIN_BANDWIDTH:"DEMO_MIN_BANDWIDTH",MIN_BYTES:"DEMO_MIN_BYTES",MIN_FRAMERATE:"DEMO_MIN_FRAMERATE",MIN_HEIGHT:"DEMO_MIN_HEIGHT",MIN_PIXELS:"DEMO_MIN_PIXELS",MIN_TOTAL_BYTES:"DEMO_MIN_TOTAL_BYTES",MIN_WIDTH:"DEMO_MIN_WIDTH",NETWORK_INFORMATION:"DEMO_NETWORK_INFORMATION",NUMBER_DECIMAL_WARNING:"DEMO_NUMBER_DECIMAL_WARNING",NUMBER_INTEGER_WARNING:"DEMO_NUMBER_INTEGER_WARNING",NUMBER_NONZERO_DECIMAL_WARNING:"DEMO_NUMBER_NONZERO_DECIMAL_WARNING",NUMBER_NONZERO_INTEGER_WARNING:"DEMO_NUMBER_NONZERO_INTEGER_WARNING",
|
|
146
|
-
NUMBER_OF_PARALLEL_DOWNLOADS:"DEMO_NUMBER_OF_PARALLEL_DOWNLOADS",OFFLINE_SECTION_HEADER:"DEMO_OFFLINE_SECTION_HEADER",PREFER_FORCED_SUBS:"DEMO_PREFER_FORCED_SUBS",PREFER_NATIVE_HLS:"DEMO_PREFER_NATIVE_HLS",REBUFFERING_GOAL:"DEMO_REBUFFERING_GOAL",RESTRICT_TO_ELEMENT_SIZE:"DEMO_RESTRICT_TO_ELEMENT_SIZE",RESTRICTIONS_SECTION_HEADER:"DEMO_RESTRICTIONS_SECTION_HEADER",SAFE_SEEK_OFFSET:"DEMO_SAFE_SEEK_OFFSET",SAFE_SKIP_DISTANCE:"DEMO_SAFE_SKIP_DISTANCE",
|
|
147
|
-
SESSION_ID:"DEMO_SESSION_ID",SHAKA_CONTROLS:"DEMO_SHAKA_CONTROLS",SLOW_HALF_LIFE:"DEMO_SLOW_HALF_LIFE",STALL_DETECTOR_ENABLED:"DEMO_STALL_DETECTOR_ENABLED",STALL_THRESHOLD:"DEMO_STALL_THRESHOLD",STALL_TIMEOUT:"DEMO_STALL_TIMEOUT",START_AT_SEGMENT_BOUNDARY:"DEMO_START_AT_SEGMENT_BOUNDARY",STREAMING_RETRY_SECTION_HEADER:"DEMO_STREAMING_RETRY_SECTION_HEADER",STREAMING_SECTION_HEADER:"DEMO_STREAMING_SECTION_HEADER",SWITCH_INTERVAL:"DEMO_SWITCH_INTERVAL",
|
|
148
|
-
TIMEOUT:"DEMO_TIMEOUT",TRICK_PLAY_CONTROLS:"DEMO_TRICK_PLAY_CONTROLS",TRICK_PLAY_CONTROLS_WARNING:"DEMO_TRICK_PLAY_CONTROLS_WARNING",UI_LOCALE:"DEMO_UI_LOCALE",UPDATE_EXPIRATION_TIME:"DEMO_UPDATE_EXPIRATION_TIME",UPDATE_INTERVAL_SECONDS:"DEMO_UPDATE_INTERVAL_SECONDS",USE_HEADERS:"DEMO_USE_HEADERS",USE_NATIVE_HLS_SAFARI:"DEMO_USE_NATIVE_HLS_SAFARI",USE_PERSISTENT_LICENSES:"DEMO_USE_PERSISTENT_LICENSES",VIDEO_ROBUSTNESS:"DEMO_VIDEO_ROBUSTNESS",
|
|
146
|
+
NUMBER_OF_PARALLEL_DOWNLOADS:"DEMO_NUMBER_OF_PARALLEL_DOWNLOADS",OFFLINE_SECTION_HEADER:"DEMO_OFFLINE_SECTION_HEADER",PARSE_INBAND_PSSH_ENABLED:"DEMO_PARSE_INBAND_PSSH_ENABLED",PREFER_FORCED_SUBS:"DEMO_PREFER_FORCED_SUBS",PREFER_NATIVE_HLS:"DEMO_PREFER_NATIVE_HLS",REBUFFERING_GOAL:"DEMO_REBUFFERING_GOAL",RESTRICT_TO_ELEMENT_SIZE:"DEMO_RESTRICT_TO_ELEMENT_SIZE",RESTRICTIONS_SECTION_HEADER:"DEMO_RESTRICTIONS_SECTION_HEADER",SAFE_SEEK_OFFSET:"DEMO_SAFE_SEEK_OFFSET",SAFE_SKIP_DISTANCE:"DEMO_SAFE_SKIP_DISTANCE",
|
|
147
|
+
SEGMENT_RELATIVE_VTT_TIMING:"DEMO_SEGMENT_RELATIVE_VTT_TIMING",SESSION_ID:"DEMO_SESSION_ID",SHAKA_CONTROLS:"DEMO_SHAKA_CONTROLS",SLOW_HALF_LIFE:"DEMO_SLOW_HALF_LIFE",STALL_DETECTOR_ENABLED:"DEMO_STALL_DETECTOR_ENABLED",STALL_THRESHOLD:"DEMO_STALL_THRESHOLD",STALL_TIMEOUT:"DEMO_STALL_TIMEOUT",START_AT_SEGMENT_BOUNDARY:"DEMO_START_AT_SEGMENT_BOUNDARY",STREAMING_RETRY_SECTION_HEADER:"DEMO_STREAMING_RETRY_SECTION_HEADER",STREAMING_SECTION_HEADER:"DEMO_STREAMING_SECTION_HEADER",SWITCH_INTERVAL:"DEMO_SWITCH_INTERVAL",
|
|
148
|
+
TEXT_LANGUAGE:"DEMO_TEXT_LANGUAGE",TEXT_ROLE:"DEMO_TEXT_ROLE",TIMEOUT:"DEMO_TIMEOUT",TRICK_PLAY_CONTROLS:"DEMO_TRICK_PLAY_CONTROLS",TRICK_PLAY_CONTROLS_WARNING:"DEMO_TRICK_PLAY_CONTROLS_WARNING",UI_LOCALE:"DEMO_UI_LOCALE",UPDATE_EXPIRATION_TIME:"DEMO_UPDATE_EXPIRATION_TIME",UPDATE_INTERVAL_SECONDS:"DEMO_UPDATE_INTERVAL_SECONDS",USE_HEADERS:"DEMO_USE_HEADERS",USE_NATIVE_HLS_SAFARI:"DEMO_USE_NATIVE_HLS_SAFARI",USE_PERSISTENT_LICENSES:"DEMO_USE_PERSISTENT_LICENSES",VIDEO_ROBUSTNESS:"DEMO_VIDEO_ROBUSTNESS",
|
|
149
|
+
XLINK_FAIL_GRACEFULLY:"DEMO_XLINK_FAIL_GRACEFULLY"}};var ShakaDemoAssetInfo=function(a,b,c,d){this.name=a;this.shortName="";this.iconUri=b;this.manifestUri=c;this.source=d;this.disabled=this.focus=!1;this.extraText=[];this.description=this.certificateUri=null;this.isFeatured=!1;this.drm=[shakaAssets.KeySystem.CLEAR];this.features=[shakaAssets.Feature.VOD];this.licenseServers=new Map;this.licenseRequestHeaders=new Map;this.responseFilter=this.requestFilter=null;this.clearKeys=new Map;this.mediaPlaylistFullMimeType=this.mimeType=this.imaContentSrcId=
|
|
149
150
|
this.imaAssetKey=this.imaVideoId=this.adTagUri=this.extraConfig=null;this.storedProgress=1};ShakaDemoAssetInfo.prototype.addDescription=function(a){this.description=a;return this};ShakaDemoAssetInfo.prototype.addCertificateUri=function(a){this.certificateUri=a;return this};ShakaDemoAssetInfo.caseLessAlphaComparator_=function(a,b){return a.toLowerCase()<b.toLowerCase()?-1:a.toLowerCase()>b.toLowerCase()?1:0};
|
|
150
151
|
ShakaDemoAssetInfo.prototype.addFeature=function(a){var b=shakaAssets.Feature;a==b.LIVE&&(this.features=this.features.filter(function(c){return c!=b.VOD}));this.features.push(a);this.features.sort(ShakaDemoAssetInfo.caseLessAlphaComparator_);return this};ShakaDemoAssetInfo.prototype.addKeySystem=function(a){this.isClear()&&(this.drm=[]);this.drm.push(a);this.drm.sort(ShakaDemoAssetInfo.caseLessAlphaComparator_);return this};
|
|
151
152
|
ShakaDemoAssetInfo.prototype.isClear=function(){return 1==this.drm.length&&this.drm[0]==shakaAssets.KeySystem.CLEAR};ShakaDemoAssetInfo.prototype.setMediaPlaylistFullMimeType=function(a){this.mediaPlaylistFullMimeType=a;return this};ShakaDemoAssetInfo.prototype.setExtraConfig=function(a){this.extraConfig=a;return this};ShakaDemoAssetInfo.prototype.setMimeType=function(a){this.mimeType=a;return this};ShakaDemoAssetInfo.prototype.setRequestFilter=function(a){this.requestFilter=a;return this};
|
|
@@ -282,9 +283,9 @@ document.createElement("div");this.latestRow_.appendChild(this.latestElementCont
|
|
|
282
283
|
shakaDemo.Config.init=function(){var a=shakaDemoMain.getHamburgerMenu();shakaDemoConfig=new shakaDemo.Config(a)};shakaDemo.Config.prototype.setContentAvailability_=function(a){a?this.container_.classList.remove("hidden"):this.container_.classList.add("hidden")};
|
|
283
284
|
shakaDemo.Config.prototype.reload_=function(){shaka.util.Dom.removeAllChildren(this.container_);this.sections_=[];this.addMetaSection_();this.addLanguageSection_();this.addAbrSection_();this.addOfflineSection_();this.addDrmSection_();this.addStreamingSection_();this.addManifestSection_();this.addRetrictionsSection_("",shakaDemo.MessageIds.RESTRICTIONS_SECTION_HEADER);this.addCmcdSection_()};
|
|
284
285
|
shakaDemo.Config.prototype.reloadAndSaveState_=function(){var a=this.sections_.map(function(d){return d.getIsOpen()});this.reload_();for(var b=0;b<a.length;b++){var c=this.sections_[b];a[b]&&c.open()}componentHandler.upgradeDom()};
|
|
285
|
-
shakaDemo.Config.prototype.addDrmSection_=function(){var a=this,b=shakaDemo.MessageIds,c=this.resolveExternLink_(".DrmConfiguration");this.addSection_(b.DRM_SECTION_HEADER,c).addBoolInput_(b.DELAY_LICENSE,"drm.delayLicenseRequestUntilPlayed").addBoolInput_(b.LOG_LICENSE_EXCHANGE,"drm.logLicenseExchange").addNumberInput_(b.UPDATE_EXPIRATION_TIME,"drm.updateExpirationTime",!0,!1,!0);var d=shakaDemoMain.getConfiguration().drm.advanced||
|
|
286
|
-
|
|
287
|
-
e);c(b.DRM_SESSION_TYPE,"sessionType",["temporary","persistent-license"]);this.addRetrySection_("drm",b.DRM_RETRY_SECTION_HEADER)};
|
|
286
|
+
shakaDemo.Config.prototype.addDrmSection_=function(){var a=this,b=shakaDemo.MessageIds,c=this.resolveExternLink_(".DrmConfiguration");this.addSection_(b.DRM_SECTION_HEADER,c).addBoolInput_(b.DELAY_LICENSE,"drm.delayLicenseRequestUntilPlayed").addBoolInput_(b.LOG_LICENSE_EXCHANGE,"drm.logLicenseExchange").addNumberInput_(b.UPDATE_EXPIRATION_TIME,"drm.updateExpirationTime",!0,!1,!0).addBoolInput_(b.PARSE_INBAND_PSSH_ENABLED,"drm.parseInbandPsshEnabled");var d=shakaDemoMain.getConfiguration().drm.advanced||
|
|
287
|
+
{};c=function(f,g,h){a.addDatalistInput_(f,h,function(k){for(var l=$jscomp.makeIterator(shakaDemo.Main.commonDrmSystems),m=l.next();!m.done;m=l.next())m=m.value,m in d||(d[m]=shakaDemo.Main.defaultAdvancedDrmConfig());for(var n in d)d[n][g]=k.value;shakaDemoMain.configure("drm.advanced",d);shakaDemoMain.remakeHash()});if(f=Object.keys(d)[0])f=d[f][g],a.latestInput_.input().value=f};var e="SW_SECURE_CRYPTO SW_SECURE_DECODE HW_SECURE_CRYPTO HW_SECURE_DECODE HW_SECURE_ALL 150 2000 3000".split(" ");c(b.VIDEO_ROBUSTNESS,
|
|
288
|
+
"videoRobustness",e);c(b.AUDIO_ROBUSTNESS,"audioRobustness",e);c(b.DRM_SESSION_TYPE,"sessionType",["temporary","persistent-license"]);this.addRetrySection_("drm",b.DRM_RETRY_SECTION_HEADER)};
|
|
288
289
|
shakaDemo.Config.prototype.addManifestSection_=function(){var a=shakaDemo.MessageIds,b=this.resolveExternLink_(".ManifestConfiguration");this.addSection_(a.MANIFEST_SECTION_HEADER,b).addBoolInput_(a.IGNORE_DASH_DRM,"manifest.dash.ignoreDrmInfo").addBoolInput_(a.AUTO_CORRECT_DASH_DRIFT,"manifest.dash.autoCorrectDrift").addBoolInput_(a.DISABLE_XLINK_PROCESSING,"manifest.dash.disableXlinkProcessing").addBoolInput_(a.XLINK_FAIL_GRACEFULLY,"manifest.dash.xlinkFailGracefully").addBoolInput_(a.IGNORE_DASH_SUGGESTED_PRESENTATION_DELAY,
|
|
289
290
|
"manifest.dash.ignoreSuggestedPresentationDelay").addBoolInput_(a.IGNORE_DASH_EMPTY_ADAPTATION_SET,"manifest.dash.ignoreEmptyAdaptationSet").addBoolInput_(a.IGNORE_DASH_MAX_SEGMENT_DURATION,"manifest.dash.ignoreMaxSegmentDuration").addBoolInput_(a.IGNORE_HLS_TEXT_FAILURES,"manifest.hls.ignoreTextStreamFailures").addBoolInput_(a.IGNORE_HLS_IMAGE_FAILURES,"manifest.hls.ignoreImageStreamFailures").addTextInput_(a.DEFAULT_AUDIO_CODEC,"manifest.hls.defaultAudioCodec").addTextInput_(a.DEFAULT_VIDEO_CODEC,
|
|
290
291
|
"manifest.hls.defaultVideoCodec").addBoolInput_(a.IGNORE_MANIFEST_PROGRAM_DATE_TIME,"manifest.hls.ignoreManifestProgramDateTime").addNumberInput_(a.AVAILABILITY_WINDOW_OVERRIDE,"manifest.availabilityWindowOverride",!0,!1,!0).addTextInput_(a.CLOCK_SYNC_URI,"manifest.dash.clockSyncUri").addNumberInput_(a.DEFAULT_PRESENTATION_DELAY,"manifest.defaultPresentationDelay").addBoolInput_(a.IGNORE_MIN_BUFFER_TIME,"manifest.dash.ignoreMinBufferTime").addNumberInput_(a.INITIAL_SEGMENT_LIMIT,"manifest.dash.initialSegmentLimit",
|