shaka-player 3.3.17 → 3.3.19

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 (82) hide show
  1. package/.github/workflows/build-and-test.yaml +4 -4
  2. package/.github/workflows/demo-version-index.yaml +6 -0
  3. package/.github/workflows/selenium-lab-tests.yaml +78 -17
  4. package/.github/workflows/update-screenshots.yaml +142 -0
  5. package/AUTHORS +2 -1
  6. package/CHANGELOG.md +44 -0
  7. package/CONTRIBUTORS +4 -1
  8. package/demo/common/asset.js +15 -0
  9. package/demo/common/assets.js +4 -2
  10. package/demo/common/message_ids.js +1 -0
  11. package/demo/custom.js +19 -0
  12. package/demo/locales/en.json +1 -0
  13. package/demo/locales/source.json +4 -0
  14. package/demo/main.js +14 -0
  15. package/dist/controls.css +1 -1
  16. package/dist/demo.compiled.debug.js +146 -144
  17. package/dist/demo.compiled.debug.map +3 -3
  18. package/dist/demo.compiled.js +146 -144
  19. package/dist/demo.compiled.map +3 -3
  20. package/dist/deps.js +1 -1
  21. package/dist/locales.js +31 -31
  22. package/dist/receiver.compiled.debug.js +15 -15
  23. package/dist/receiver.compiled.debug.map +2 -2
  24. package/dist/receiver.compiled.js +15 -15
  25. package/dist/receiver.compiled.map +2 -2
  26. package/dist/shaka-player.compiled.d.ts +13 -2
  27. package/dist/shaka-player.compiled.debug.d.ts +13 -2
  28. package/dist/shaka-player.compiled.debug.js +160 -158
  29. package/dist/shaka-player.compiled.debug.map +3 -3
  30. package/dist/shaka-player.compiled.js +338 -335
  31. package/dist/shaka-player.compiled.map +3 -3
  32. package/dist/shaka-player.ui.d.ts +13 -2
  33. package/dist/shaka-player.ui.debug.d.ts +13 -2
  34. package/dist/shaka-player.ui.debug.js +224 -222
  35. package/dist/shaka-player.ui.debug.map +3 -3
  36. package/dist/shaka-player.ui.js +501 -498
  37. package/dist/shaka-player.ui.map +3 -3
  38. package/docs/tutorials/errors.md +94 -0
  39. package/docs/tutorials/fairplay.md +2 -2
  40. package/docs/tutorials/index.json +2 -0
  41. package/docs/tutorials/widevine-service-certs.md +45 -0
  42. package/externs/ima.js +9 -0
  43. package/externs/shaka/net.js +1 -0
  44. package/externs/shaka/player.js +13 -7
  45. package/lib/ads/client_side_ad_manager.js +11 -5
  46. package/lib/dash/dash_parser.js +49 -48
  47. package/lib/hls/hls_parser.js +2 -0
  48. package/lib/media/media_source_engine.js +9 -4
  49. package/lib/media/streaming_engine.js +8 -3
  50. package/lib/media/transmuxer.js +13 -7
  51. package/lib/media/video_wrapper.js +3 -3
  52. package/lib/net/http_fetch_plugin.js +79 -57
  53. package/lib/net/networking_engine.js +1 -0
  54. package/lib/offline/indexeddb/storage_mechanism.js +1 -1
  55. package/lib/player.js +19 -2
  56. package/lib/polyfill/media_capabilities.js +15 -8
  57. package/lib/polyfill/mediasource.js +7 -2
  58. package/lib/text/mp4_vtt_parser.js +4 -0
  59. package/lib/text/text_engine.js +1 -0
  60. package/lib/text/ui_text_displayer.js +1 -0
  61. package/lib/text/vtt_text_parser.js +4 -5
  62. package/lib/util/manifest_parser_utils.js +1 -2
  63. package/lib/util/mime_utils.js +12 -1
  64. package/lib/util/periods.js +5 -5
  65. package/lib/util/stream_utils.js +28 -16
  66. package/maintained-branches.md +3 -4
  67. package/package.json +1 -1
  68. package/test/media/content_workarounds_unit.js +43 -0
  69. package/test/media/drm_engine_integration.js +4 -17
  70. package/test/media/streaming_engine_unit.js +6 -1
  71. package/test/net/networking_engine_unit.js +6 -1
  72. package/test/player_integration.js +39 -0
  73. package/test/player_unit.js +54 -0
  74. package/test/polyfill/media_capabilities_unit.js +20 -23
  75. package/test/test/assets/text-clip-alt.vtt +63 -0
  76. package/test/test/util/fake_drm_engine.js +3 -0
  77. package/test/test/util/simple_fakes.js +3 -0
  78. package/test/test/util/test_scheme.js +9 -14
  79. package/test/text/mp4_vtt_parser_unit.js +8 -0
  80. package/test/text/vtt_text_parser_unit.js +26 -2
  81. package/test/text/web_vtt_layout_integration.js +0 -3
  82. package/test/util/mime_utils_unit.js +10 -0
@@ -16,7 +16,7 @@ on:
16
16
  # old one. If a PR is updated and a new test run is started, the old test run
17
17
  # will be cancelled automatically to conserve resources.
18
18
  concurrency:
19
- group: ${{ github.workflow }}-${{ github.event.inputs.ref || github.ref }}
19
+ group: ${{ github.workflow }}-${{ inputs.ref || github.ref }}
20
20
  cancel-in-progress: true
21
21
 
22
22
  jobs:
@@ -27,7 +27,7 @@ jobs:
27
27
  - name: Checkout code
28
28
  uses: actions/checkout@v3
29
29
  with:
30
- ref: ${{ github.event.inputs.ref || github.ref }}
30
+ ref: ${{ inputs.ref || github.ref }}
31
31
 
32
32
  - name: Lint
33
33
  run: python build/check.py
@@ -103,7 +103,7 @@ jobs:
103
103
  - name: Checkout code
104
104
  uses: actions/checkout@v3
105
105
  with:
106
- ref: ${{ github.event.inputs.ref || github.ref }}
106
+ ref: ${{ inputs.ref || github.ref }}
107
107
 
108
108
  # Older versions of Safari can be installed, but not to the root, and it
109
109
  # can't replace the standard version, at least not on GitHub's VMs. If
@@ -206,7 +206,7 @@ jobs:
206
206
  - name: Checkout code
207
207
  uses: actions/checkout@v3
208
208
  with:
209
- ref: ${{ github.event.inputs.ref || github.ref }}
209
+ ref: ${{ inputs.ref || github.ref }}
210
210
 
211
211
  - name: Docker
212
212
  run: |
@@ -11,6 +11,12 @@ on:
11
11
  - app-engine/demo-version-index/**
12
12
  release:
13
13
  types: [published]
14
+ # NOTE: So long as releases are made without a personal access token (PAT),
15
+ # they will not activate this workflow's release trigger. For now, the
16
+ # schedule trigger will compensate for that by updating the index nightly.
17
+ schedule:
18
+ # Run every night at 10pm PST / 6am UTC.
19
+ - cron: '0 6 * * *'
14
20
 
15
21
  jobs:
16
22
  appspot:
@@ -9,8 +9,31 @@ on:
9
9
  description: "A PR number to build and test in the lab. If empty, will build and test from main."
10
10
  required: false
11
11
  test_filter:
12
- description: "A filter to run a subset of the tests. If empty, all tests will run."
12
+ description: "A regex filter to run a subset of the tests. If empty, all tests will run."
13
13
  required: false
14
+ browser_filter:
15
+ description: "A list of browsers to run the tests. If empty, all browsers will run."
16
+ required: false
17
+ workflow_call:
18
+ # Allows for reuse from other workflows, such as "Update All Screenshots"
19
+ # workflow.
20
+ inputs:
21
+ pr:
22
+ description: "A PR number to build and test in the lab. If empty, will build and test from main."
23
+ required: false
24
+ type: string
25
+ test_filter:
26
+ description: "A regex filter to run a subset of the tests. If empty, all tests will run."
27
+ required: false
28
+ type: string
29
+ browser_filter:
30
+ description: "A list of browsers to run the tests. If empty, all browsers will run."
31
+ required: false
32
+ type: string
33
+ ignore_test_status:
34
+ description: "If true, ignore test success or failure, never set the commit status, and always upload screenshots."
35
+ required: false
36
+ type: boolean
14
37
  schedule:
15
38
  # Runs every night at 2am PST / 10am UTC, testing against the main branch.
16
39
  - cron: '0 10 * * *'
@@ -30,12 +53,12 @@ jobs:
30
53
  - name: Compute ref
31
54
  id: compute
32
55
  run: |
33
- if [[ "${{ github.event.inputs.pr }}" != "" ]]; then
34
- LAB_TEST_REF="refs/pull/${{ github.event.inputs.pr }}/head"
56
+ if [[ "${{ inputs.pr }}" != "" ]]; then
57
+ LAB_TEST_REF="refs/pull/${{ inputs.pr }}/head"
35
58
  else
36
59
  LAB_TEST_REF="main"
37
60
  fi
38
- echo "REF=$LAB_TEST_REF" >> $GITHUB_OUTPUT
61
+ echo "REF=$LAB_TEST_REF" | tee -a $GITHUB_OUTPUT
39
62
 
40
63
  # Configure the build matrix based on our grid's YAML config.
41
64
  # The matrix contents will be computed by this first job and deserialized
@@ -63,6 +86,14 @@ jobs:
63
86
  const yaml = require(
64
87
  '${{ github.workspace }}/node_modules/js-yaml/index.js');
65
88
 
89
+ // Convert the input "browser_filter" into a set of strings. Take
90
+ // care to filter so that the empty string turns into an empty set.
91
+ const browserFilter = new Set( "${{ inputs.browser_filter }}"
92
+ .split(/\s+/)
93
+ .map(x => x.toLowerCase())
94
+ .filter(x => !!x)
95
+ );
96
+
66
97
  const gridBrowserYaml =
67
98
  fs.readFileSync('build/shaka-lab.yaml', 'utf8');
68
99
  const gridBrowserMetadata = yaml.load(gridBrowserYaml);
@@ -74,7 +105,14 @@ jobs:
74
105
  // Skip variable defs in the YAML file
75
106
  continue;
76
107
  }
77
- if (!gridBrowserMetadata[name].disabled) {
108
+
109
+ // A browser is enabled if it's not disabled and (either the browser
110
+ // filter is empty or it contains the browser name).
111
+ const enabled = !gridBrowserMetadata[name].disabled &&
112
+ (browserFilter.size == 0 ||
113
+ browserFilter.has(name.toLowerCase()));
114
+
115
+ if (enabled) {
78
116
  include.push({browser: name});
79
117
  }
80
118
  }
@@ -100,6 +138,7 @@ jobs:
100
138
  ref: ${{ needs.compute-ref.outputs.REF }}
101
139
 
102
140
  - name: Set commit status to pending
141
+ if: ${{ inputs.ignore_test_status == false }}
103
142
  uses: ./.github/workflows/custom-actions/set-commit-status
104
143
  with:
105
144
  context: Selenium / Build
@@ -117,8 +156,9 @@ jobs:
117
156
  retention-days: 1
118
157
 
119
158
  - name: Report final commit status
120
- # Will run on success or failure, but not if the workflow is cancelled.
121
- if: ${{ success() || failure() }}
159
+ # Will run on success or failure, but not if the workflow is cancelled
160
+ # or if we were asked to ignore the test status.
161
+ if: ${{ (success() || failure()) && inputs.ignore_test_status == false }}
122
162
  uses: ./.github/workflows/custom-actions/set-commit-status
123
163
  with:
124
164
  context: Selenium / Build
@@ -142,6 +182,7 @@ jobs:
142
182
  ref: ${{ needs.compute-ref.outputs.REF }}
143
183
 
144
184
  - name: Set commit status to pending
185
+ if: ${{ inputs.ignore_test_status == false }}
145
186
  uses: ./.github/workflows/custom-actions/set-commit-status
146
187
  with:
147
188
  context: Selenium / ${{ matrix.browser }}
@@ -185,20 +226,28 @@ jobs:
185
226
  # the container.
186
227
  - name: Test Player
187
228
  run: |
229
+ # Use of an array keeps elements intact, and allows an element to
230
+ # contain spaces without being expanded into multiple arguments in a
231
+ # shell command.
232
+ extra_flags=()
233
+
188
234
  # Generate a coverage report from uncompiled code on ChromeLinux.
189
235
  # It should be the uncompiled build, or else we won't execute any
190
236
  # coverage instrumentation on full-stack player integration tests.
191
237
  if [[ "${{ matrix.browser }}" == "ChromeLinux" ]]; then
192
- extra_flags="--html-coverage-report --uncompiled"
193
- else
194
- extra_flags=""
238
+ extra_flags+=(--html-coverage-report --uncompiled)
195
239
  fi
196
240
 
197
- filter="${{ github.event.inputs.test_filter }}"
198
- if [[ "$filter" != "" ]]; then
199
- extra_flags="$extra_flags --filter $filter"
241
+ if [[ "${{ inputs.test_filter }}" != "" ]]; then
242
+ echo "Adding filter: ${{ inputs.test_filter }}"
243
+ extra_flags+=(--filter "${{ inputs.test_filter }}")
200
244
  fi
201
245
 
246
+ # Do not automatically fail when a command fails. This allows us to
247
+ # implement the ignore_test_status input by capturing the exit code
248
+ # and examining it.
249
+ set +e
250
+ # Run the tests with any extra flags.
202
251
  python3 build/test.py \
203
252
  --no-build \
204
253
  --reporters spec --spec-hide-passed \
@@ -208,7 +257,18 @@ jobs:
208
257
  --grid-config build/shaka-lab.yaml \
209
258
  --grid-address selenium-grid.lab:4444 \
210
259
  --browsers ${{ matrix.browser }} \
211
- $extra_flags
260
+ "${extra_flags[@]}"
261
+ # Capture the test exit code immediately after running the tests.
262
+ # There cannot be any other command between test.py and here.
263
+ exit_code=$?
264
+
265
+ # If ignoring test status, treat this as an exit code of 0 (success).
266
+ if [[ "${{ inputs.ignore_test_status }}" == "true" ]]; then
267
+ exit_code=0
268
+ fi
269
+
270
+ # Report the captured (and possibly overridden) exit status.
271
+ exit $exit_code
212
272
 
213
273
  - name: Find coverage report (ChromeLinux only)
214
274
  id: coverage
@@ -252,7 +312,7 @@ jobs:
252
312
  # Upload new screenshots and diffs on failure; ignore if missing
253
313
  - name: Upload screenshots
254
314
  uses: actions/upload-artifact@v3
255
- if: ${{ failure() }}
315
+ if: ${{ failure() || inputs.ignore_test_status }}
256
316
  with:
257
317
  # In this workflow, "browser" is the selenium node name, which can
258
318
  # contain both browser and OS, such as "ChromeLinux".
@@ -264,8 +324,9 @@ jobs:
264
324
  retention-days: 5
265
325
 
266
326
  - name: Report final commit status
267
- # Will run on success or failure, but not if the workflow is cancelled.
268
- if: ${{ success() || failure() }}
327
+ # Will run on success or failure, but not if the workflow is cancelled
328
+ # or if we were asked to ignore the test status.
329
+ if: ${{ (success() || failure()) && inputs.ignore_test_status == false }}
269
330
  uses: ./.github/workflows/custom-actions/set-commit-status
270
331
  with:
271
332
  context: Selenium / ${{ matrix.browser }}
@@ -0,0 +1,142 @@
1
+ name: Update All Screenshots
2
+ # Updates all screenshots on an existing PR, assuming permission has been given
3
+ # to maintainers to make edits.
4
+
5
+ on:
6
+ workflow_dispatch:
7
+ # Allows for manual triggering on PRs. They should be reviewed first, to
8
+ # avoid malicious code executing in the lab.
9
+ inputs:
10
+ pr:
11
+ description: "A PR number to build and test in the lab, then update all the screenshots."
12
+ required: true
13
+
14
+ jobs:
15
+ set-pending-status:
16
+ name: Set Pending Status
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v3
20
+ with:
21
+ ref: refs/pull/${{ inputs.pr }}/head
22
+
23
+ - name: Set commit status to pending
24
+ uses: ./.github/workflows/custom-actions/set-commit-status
25
+ with:
26
+ context: Update All Screenshots
27
+ state: pending
28
+ token: ${{ secrets.GITHUB_TOKEN }}
29
+
30
+ run-lab-tests:
31
+ name: Get Selenium Lab Screenshots
32
+ needs: [set-pending-status]
33
+ uses: ./.github/workflows/selenium-lab-tests.yaml
34
+ with:
35
+ pr: ${{ inputs.pr }}
36
+ test_filter: layout
37
+ ignore_test_status: true
38
+
39
+ update-pr:
40
+ name: Update PR
41
+ runs-on: ubuntu-latest
42
+ needs: [run-lab-tests]
43
+ steps:
44
+ - uses: actions/checkout@v3
45
+ with:
46
+ ref: refs/pull/${{ inputs.pr }}/head
47
+
48
+ - name: Set commit status to pending
49
+ uses: ./.github/workflows/custom-actions/set-commit-status
50
+ with:
51
+ context: Update All Screenshots
52
+ state: pending
53
+ token: ${{ secrets.GITHUB_TOKEN }}
54
+
55
+ - name: Get artifacts
56
+ uses: actions/download-artifact@v3
57
+ with:
58
+ path: new-screenshots
59
+
60
+ - name: Move screenshots
61
+ run: |
62
+ # The download-artifact action puts zip file contents into folders by
63
+ # the name of the artifact, so we can't have them downloaded directly
64
+ # to the screenshots folder. Here we move them into the correct
65
+ # locations.
66
+ cd new-screenshots
67
+
68
+ # "$i" is a folder for an artifact (eg "screenshots-ChromeAndroid"),
69
+ # and it contains a single folder with the name we use in our
70
+ # screenshots (eg "chrome-Android"). We want the contents of that
71
+ # inner folder to be copied to test/test/assets/screenshots/, where a
72
+ # folder with the same name (eg "chrome-Android") already exists.
73
+ for i in screenshots*; do
74
+ cp -a $i/* ../test/test/assets/screenshots/
75
+ done
76
+
77
+ - name: Update screenshots
78
+ run: |
79
+ # Install prerequisites.
80
+ npm ci
81
+
82
+ # Update the official screenshots for any that have visibly changed.
83
+ # This is not a byte-for-byte comparison, but based on pixel diffs.
84
+ ./build/updateScreenshots.py
85
+
86
+ # Emulate the actions bot.
87
+ git config user.name "github-actions[bot]"
88
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
89
+
90
+ # Commit the changes. Ignore failure, in case there are no changes.
91
+ git add test/test/assets/screenshots/*/*.png || true
92
+ git commit -m ':robot: Update all screenshots' || true
93
+
94
+ - name: Update PR
95
+ env:
96
+ GH_TOKEN: ${{ github.token }}
97
+ run: |
98
+ # Update the PR.
99
+ PR_API_URL="/repos/${{ github.repository }}/pulls/${{ inputs.pr }}"
100
+ REMOTE=$(gh api $PR_API_URL | jq -r .head.repo.html_url)
101
+ BRANCH=$(gh api $PR_API_URL | jq -r .head.ref)
102
+
103
+ # If there were no changes, this will do nothing, but succeed.
104
+ git push "$REMOTE" HEAD:"$BRANCH"
105
+
106
+ - name: Debug
107
+ uses: mxschmitt/action-tmate@v3.6
108
+ with:
109
+ limit-access-to-actor: true
110
+ if: failure()
111
+
112
+ set-final-status:
113
+ name: Set Final Status
114
+ runs-on: ubuntu-latest
115
+ needs: [run-lab-tests, update-pr]
116
+ # Will run on success or failure, but not if the workflow is cancelled.
117
+ if: ${{ success() || failure() }}
118
+ steps:
119
+ - uses: actions/checkout@v3
120
+ with:
121
+ ref: refs/pull/${{ inputs.pr }}/head
122
+
123
+ - name: Compute final status
124
+ id: compute
125
+ run: |
126
+ LAB_TEST_STATUS="${{ needs.run-lab-tests.status }}"
127
+ UPDATE_PR_STATUS="${{ needs.update-pr.status }}"
128
+
129
+ # If run-lab-tests succeeded, use the status of update-pr, otherwise
130
+ # use run-lab-tests (which is "failed" or "error").
131
+ if [ "$LAB_TEST_STATUS" == "success" ]; then
132
+ echo "status=$UPDATE_PR_STATUS" >> $GITHUB_OUTPUT
133
+ else
134
+ echo "status=$LAST_TEST_STATUS" >> $GITHUB_OUTPUT
135
+ fi
136
+
137
+ - name: Report final status
138
+ uses: ./.github/workflows/custom-actions/set-commit-status
139
+ with:
140
+ context: Update All Screenshots
141
+ state: ${{ steps.compute.outputs.status }}
142
+ token: ${{ secrets.GITHUB_TOKEN }}
package/AUTHORS CHANGED
@@ -17,7 +17,7 @@ Adrián Gómez Llorente <adgllorente@gmail.com>
17
17
  AdsWizz <*@adswizz.com>
18
18
  Alex Jones <alexedwardjones@gmail.com>
19
19
  Alugha GmbH <*@alugha.com>
20
- Alvaro Velad Galvan <alvaro.velad@mirada.tv>
20
+ Alvaro Velad Galvan <ladvan91@hotmail.com>
21
21
  Amila Sampath <lucksy@gmail.com>
22
22
  Anthony Stansbridge <github@anthonystansbridge.co.uk>
23
23
  Benjamin Wallberg <me@bwallberg.com>
@@ -85,3 +85,4 @@ Vincent Valot <valot.vince@gmail.com>
85
85
  Wayne Morgan <wayne.morgan.dev@gmail.com>
86
86
  Raymond Cheng <raycheng100@gmail.com>
87
87
  Blue Billywig <*@bluebillywig.com>
88
+ Xperi <*@xperi.com>
package/CHANGELOG.md CHANGED
@@ -1,5 +1,49 @@
1
1
  # Changelog
2
2
 
3
+ ## [3.3.19](https://github.com/shaka-project/shaka-player/compare/v3.3.18...v3.3.19) (2023-04-27)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * `config.streaming.preferNativeHls` only applies to HLS streams ([#5167](https://github.com/shaka-project/shaka-player/issues/5167)) ([1dacefc](https://github.com/shaka-project/shaka-player/commit/1dacefc93c4bab4e1200c85f085dba09b0ff09c7)), closes [#5166](https://github.com/shaka-project/shaka-player/issues/5166)
9
+ * **ads:** Fix ads starting muted behavior ([#5153](https://github.com/shaka-project/shaka-player/issues/5153)) ([cbfaa70](https://github.com/shaka-project/shaka-player/commit/cbfaa7074316e00ddd072b107dccd27ef926072d)), closes [#5125](https://github.com/shaka-project/shaka-player/issues/5125)
10
+ * **Ads:** Fix usage of EventManager on CS ([#5084](https://github.com/shaka-project/shaka-player/issues/5084)) ([d412b08](https://github.com/shaka-project/shaka-player/commit/d412b08a83b865a358f46d851ea48825d4125950))
11
+ * **DASH:** Fix seeking on multiperiod content after variant change ([#5110](https://github.com/shaka-project/shaka-player/issues/5110)) ([2ee97e2](https://github.com/shaka-project/shaka-player/commit/2ee97e2873f87968c9403718f55e1b4f85e48668))
12
+ * Fix fetch plugin with old implementations ([#5091](https://github.com/shaka-project/shaka-player/issues/5091)) ([8ddc98e](https://github.com/shaka-project/shaka-player/commit/8ddc98e3d0db4d6582c8814423ef0a38ce829d86))
13
+ * Fix handling of CC when switching between codecs ([#5160](https://github.com/shaka-project/shaka-player/issues/5160)) ([3ea3fb4](https://github.com/shaka-project/shaka-player/commit/3ea3fb4abc8cfc9d52447dab67aa5a8dd3152dc0))
14
+ * Fix HEAD request exception ([#5194](https://github.com/shaka-project/shaka-player/issues/5194)) ([29d6b4c](https://github.com/shaka-project/shaka-player/commit/29d6b4ce7fd9383ab213039e59bfee86e495c00b)), closes [#5164](https://github.com/shaka-project/shaka-player/issues/5164)
15
+ * Fix missing originalUri in response filters ([#5114](https://github.com/shaka-project/shaka-player/issues/5114)) ([626ef1f](https://github.com/shaka-project/shaka-player/commit/626ef1f9c117cc98795c5974b3522f6f35fe3867))
16
+ * Fix race that allows multiple text streams to be loaded ([#5129](https://github.com/shaka-project/shaka-player/issues/5129)) ([1942d1d](https://github.com/shaka-project/shaka-player/commit/1942d1d1ca491c47d6f39cbd60e647a19c84c044))
17
+ * Fix selectVariantsByLabel using src= ([#5154](https://github.com/shaka-project/shaka-player/issues/5154)) ([68c6e7a](https://github.com/shaka-project/shaka-player/commit/68c6e7a299d8feadd6f981d172f81b0b35fa12a9))
18
+ * Handle empty media segments for Mp4VttParser ([#5131](https://github.com/shaka-project/shaka-player/issues/5131)) ([29b7a30](https://github.com/shaka-project/shaka-player/commit/29b7a30b13cc5fea1d9aa79b15eb0ac42cc4e85c)), closes [#4429](https://github.com/shaka-project/shaka-player/issues/4429)
19
+ * **HLS:** Adding support for DTS Express in HLS fMP4 ([#5112](https://github.com/shaka-project/shaka-player/issues/5112)) ([#5117](https://github.com/shaka-project/shaka-player/issues/5117)) ([07e1737](https://github.com/shaka-project/shaka-player/commit/07e173720d1aa098ae3f3d2ea3731205feb39e6f))
20
+ * **net:** Fix HEAD requests in new Chromium ([#5180](https://github.com/shaka-project/shaka-player/issues/5180)) ([ec301e6](https://github.com/shaka-project/shaka-player/commit/ec301e637d1314643f0b2fdfe4c8bcd68ec27f3b)), closes [#5164](https://github.com/shaka-project/shaka-player/issues/5164)
21
+ * PERIOD_FLATTENING_FAILED error with shaka 3.3.x that did not occur with shaka 3.1.2 ([#5188](https://github.com/shaka-project/shaka-player/issues/5188)) ([2cefcf4](https://github.com/shaka-project/shaka-player/commit/2cefcf434dcd729469df94a20673ab9fe7d8d72b)), closes [#5183](https://github.com/shaka-project/shaka-player/issues/5183)
22
+ * Prevent bad calls to MediaSource.endOfStream ([#5071](https://github.com/shaka-project/shaka-player/issues/5071)) ([9824474](https://github.com/shaka-project/shaka-player/commit/98244742ec6add0a7514966b214e0411648e53a9)), closes [#5070](https://github.com/shaka-project/shaka-player/issues/5070)
23
+ * Tizen video error fixed by checking the extended MIME type ([#4973](https://github.com/shaka-project/shaka-player/issues/4973)) ([b663e99](https://github.com/shaka-project/shaka-player/commit/b663e99b9447c5f65746876b4e58ec7e04ee7b7f)), closes [#4634](https://github.com/shaka-project/shaka-player/issues/4634)
24
+
25
+ ## [3.3.18](https://github.com/shaka-project/shaka-player/compare/v3.3.17...v3.3.18) (2023-03-01)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **Ads:** Fix CS volume ad ([#5016](https://github.com/shaka-project/shaka-player/issues/5016)) ([b0bb23c](https://github.com/shaka-project/shaka-player/commit/b0bb23c493d69d88de87b7789e867223fd2919ff))
31
+ * **Ads:** Fix usage of EventManager on CS ([#5017](https://github.com/shaka-project/shaka-player/issues/5017)) ([83f9153](https://github.com/shaka-project/shaka-player/commit/83f915353ff5a180b86a80472a59fa89e0485d15))
32
+ * **ads:** Fix VMAP ads stay muted on muted autoplay ([#4995](https://github.com/shaka-project/shaka-player/issues/4995)) ([1d74f6e](https://github.com/shaka-project/shaka-player/commit/1d74f6e75cf74c90fca720e7769784904a7c2841))
33
+ * Allow the playback of TS without mux.js ([#5041](https://github.com/shaka-project/shaka-player/issues/5041)) ([5784250](https://github.com/shaka-project/shaka-player/commit/578425003e471828ae012025a9a5225f14a1a11a))
34
+ * Caption can not turn off at iOS Safari ([#4978](https://github.com/shaka-project/shaka-player/issues/4978)) ([35f420e](https://github.com/shaka-project/shaka-player/commit/35f420e8283dfc9d8dacbe1a317c4e69e5974cbb))
35
+ * **Demo:** Allow manifest type for DAI custom assets ([#4977](https://github.com/shaka-project/shaka-player/issues/4977)) ([d341f93](https://github.com/shaka-project/shaka-player/commit/d341f93c9091d371eba7d37faad2c76914d31a58))
36
+ * Failed to set 'currentTime' property on 'HTMLMediaElement' on a Hisense TV ([#4962](https://github.com/shaka-project/shaka-player/issues/4962)) ([bda4e50](https://github.com/shaka-project/shaka-player/commit/bda4e50f72d44865e76716894b48f34db225feab))
37
+ * Fallback to isTypeSupported when cast namespace is undefined ([#5012](https://github.com/shaka-project/shaka-player/issues/5012)) ([141f0e3](https://github.com/shaka-project/shaka-player/commit/141f0e384ebe9d31b5df899ef2c4c5d4217a31c9))
38
+ * Fix video/mp2t mimetype conversion. ([#5039](https://github.com/shaka-project/shaka-player/issues/5039)) ([4fd078e](https://github.com/shaka-project/shaka-player/commit/4fd078e23c4148a46a2ddf34165e14c0f8056e97))
39
+ * **HLS:** Add `.tsa` and .`tsv` file extensions as valid MPEG2-TS. ([#5034](https://github.com/shaka-project/shaka-player/issues/5034)) ([a080996](https://github.com/shaka-project/shaka-player/commit/a080996cbc4185a1bec8c08e5fc6a23a75f3e31e))
40
+ * Increase IndexedDB timeout ([#4984](https://github.com/shaka-project/shaka-player/issues/4984)) ([a7bc000](https://github.com/shaka-project/shaka-player/commit/a7bc00056cff3d400f62018948e48acf6d0a9804))
41
+ * **MCap:** Remove robustness when robustness value is default ([#4953](https://github.com/shaka-project/shaka-player/issues/4953)) ([762b1e7](https://github.com/shaka-project/shaka-player/commit/762b1e7b8b0a9f1443cd82ef388e5a3ce04a3f5e))
42
+ * Prevent content from being restarted after Postroll ads ([#4979](https://github.com/shaka-project/shaka-player/issues/4979)) ([acebfa1](https://github.com/shaka-project/shaka-player/commit/acebfa13f04bc15f0d65e2c47a1a7bdbbeea9e1e)), closes [#4445](https://github.com/shaka-project/shaka-player/issues/4445)
43
+ * Reject TS content on Edge ([#5043](https://github.com/shaka-project/shaka-player/issues/5043)) ([982d7bc](https://github.com/shaka-project/shaka-player/commit/982d7bc389d7e9f3a380b64101b7aaa0cccce39e))
44
+ * **VTT:** Fix spacing between text lines ([#4961](https://github.com/shaka-project/shaka-player/issues/4961)) ([a44fe84](https://github.com/shaka-project/shaka-player/commit/a44fe84eddc851faea5276fd25dbbce78ddf3d7a))
45
+ * **WebVTT:** Tags in the WebVTT subtitle are not parsed ([#4960](https://github.com/shaka-project/shaka-player/issues/4960)) ([15afb4b](https://github.com/shaka-project/shaka-player/commit/15afb4b36350da68074a2a1e67e6bb86f9eeddd1))
46
+
3
47
  ## [3.3.17](https://github.com/shaka-project/shaka-player/compare/v3.3.16...v3.3.17) (2023-01-31)
4
48
 
5
49
 
package/CONTRIBUTORS CHANGED
@@ -27,7 +27,7 @@ Adrián Gómez Llorente <adgllorente@gmail.com>
27
27
  Agajan Jumakuliyev <agajan.tm@gmail.com>
28
28
  Aidan Ridley <aidan.ridley@charter.com>
29
29
  Alex Jones <alexedwardjones@gmail.com>
30
- Alvaro Velad Galvan <alvaro.velad@mirada.tv>
30
+ Alvaro Velad Galvan <ladvan91@hotmail.com>
31
31
  Amila Sampath <lucksy@gmail.com>
32
32
  Andy Hochhaus <ahochhaus@samegoal.com>
33
33
  Anthony Stansbridge <github@anthonystansbridge.co.uk>
@@ -120,6 +120,9 @@ Vasanth Polipelli <vasanthap@google.com>
120
120
  Vignesh Venkatasubramanian <vigneshv@google.com>
121
121
  Vincent Valot <valot.vince@gmail.com>
122
122
  Wayne Morgan <wayne.morgan.dev@gmail.com>
123
+ Wen Ren <renwen0615@gmail.com>
124
+ Will Harris <will.harris@paramount.com>
123
125
  Yohann Connell <robinconnell@google.com>
124
126
  Raymond Cheng <raycheng100@gmail.com>
125
127
  Janroel Koppen <j.koppen@bluebillywig.com>
128
+ Ashley Manners <ashley.manners@xperi.com>
@@ -76,6 +76,8 @@ const ShakaDemoAssetInfo = class {
76
76
  /** @type {?string} */
77
77
  this.imaContentSrcId = null;
78
78
  /** @type {?string} */
79
+ this.imaManifestType = null;
80
+ /** @type {?string} */
79
81
  this.mimeType = null;
80
82
 
81
83
 
@@ -256,6 +258,19 @@ const ShakaDemoAssetInfo = class {
256
258
  return this;
257
259
  }
258
260
 
261
+ /**
262
+ * @param {string} type
263
+ * @return {!ShakaDemoAssetInfo}
264
+ */
265
+ setIMAManifestType(type) {
266
+ this.imaManifestType = type;
267
+ if (!this.features.includes(shakaAssets.Feature.ADS)) {
268
+ this.addFeature(shakaAssets.Feature.ADS);
269
+ }
270
+
271
+ return this;
272
+ }
273
+
259
274
  /**
260
275
  * @param {string} headerName
261
276
  * @param {string} headerValue
@@ -509,7 +509,8 @@ shakaAssets.testAssets = [
509
509
  .addFeature(shakaAssets.Feature.MP4)
510
510
  .addFeature(shakaAssets.Feature.OFFLINE)
511
511
  .setIMAContentSourceId('2528370')
512
- .setIMAVideoId('tears-of-steel'),
512
+ .setIMAVideoId('tears-of-steel')
513
+ .setIMAManifestType('HLS'),
513
514
  new ShakaDemoAssetInfo(
514
515
  /* name= */ 'Tears of Steel (live, DASH, Server Side ads)',
515
516
  /* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/tears_of_steel.png',
@@ -519,7 +520,8 @@ shakaAssets.testAssets = [
519
520
  .addFeature(shakaAssets.Feature.MP4)
520
521
  .addFeature(shakaAssets.Feature.SUBTITLES)
521
522
  .addFeature(shakaAssets.Feature.LIVE)
522
- .setIMAAssetKey('PSzZMzAkSXCmlJOWDmRj8Q'),
523
+ .setIMAAssetKey('PSzZMzAkSXCmlJOWDmRj8Q')
524
+ .setIMAManifestType('DASH'),
523
525
  new ShakaDemoAssetInfo(
524
526
  /* name= */ 'Tears of Steel (multicodec, surround + stereo)',
525
527
  /* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/tears_of_steel.png',
@@ -96,6 +96,7 @@ shakaDemo.MessageIds = {
96
96
  ADS_TAB: 'DEMO_ADS_TAB',
97
97
  IMA_ASSET_KEY: 'DEMO_IMA_ASSET_KEY',
98
98
  IMA_CONTENT_SRC_ID: 'DEMO_IMA_CONTENT_SRC_ID',
99
+ IMA_MANIFEST_TYPE: 'DEMO_IMA_MANIFEST_TYPE',
99
100
  IMA_VIDEO_ID: 'DEMO_IMA_VIDEO_ID',
100
101
  CANCEL_BUTTON: 'DEMO_CANCEL_BUTTON',
101
102
  CUSTOM_INTRO_ONE: 'DEMO_CUSTOM_INTRO_ONE',
package/demo/custom.js CHANGED
@@ -328,6 +328,25 @@ shakaDemo.Custom = class {
328
328
  this.makeField_(
329
329
  container, assetKeyName, assetKeySetup, assetKeyChange);
330
330
 
331
+ // Make the manifest type field.
332
+ const manifestTypeSetup = (input, container) => {
333
+ if (assetInProgress.imaManifestType) {
334
+ input.value = assetInProgress.imaManifestType;
335
+ }
336
+
337
+ this.manifestField_.required =
338
+ this.checkManifestRequired_(assetInProgress);
339
+ };
340
+ const manifestTypeChange = (input) => {
341
+ assetInProgress.imaManifestType = input.value;
342
+ this.manifestField_.required =
343
+ this.checkManifestRequired_(assetInProgress);
344
+ };
345
+ const manifestTypeName = shakaDemoMain.getLocalizedString(
346
+ shakaDemo.MessageIds.IMA_MANIFEST_TYPE);
347
+ this.makeField_(
348
+ container, manifestTypeName, manifestTypeSetup, manifestTypeChange);
349
+
331
350
  return adsDiv;
332
351
  }
333
352
 
@@ -97,6 +97,7 @@
97
97
  "DEMO_IGNORE_HLS_TEXT_FAILURES": "Ignore HLS Text Stream Failures",
98
98
  "DEMO_IMA_ASSET_KEY": "Asset key (for LIVE DAI Content)",
99
99
  "DEMO_IMA_CONTENT_SRC_ID": "Content source ID (for VOD DAI Content)",
100
+ "DEMO_IMA_MANIFEST_TYPE": "Manifest type (for DAI Content)",
100
101
  "DEMO_IMA_VIDEO_ID": "Video ID (for VOD DAI Content)",
101
102
  "DEMO_IGNORE_MIN_BUFFER_TIME": "Ignore Min Buffer Time",
102
103
  "DEMO_IGNORE_TEXT_FAILURES": "Ignore Text Stream Failures",
@@ -391,6 +391,10 @@
391
391
  "description": "The label on a field that allows users to provide a content source id for a custom asset.",
392
392
  "message": "Asset key (for VOD DAI Content)"
393
393
  },
394
+ "DEMO_IMA_MANIFEST_TYPE": {
395
+ "description": "The label on a field that allows users to provide a manifest type for a custom asset.",
396
+ "message": "Manifest type (for DAI Content)"
397
+ },
394
398
  "DEMO_IMA_VIDEO_ID": {
395
399
  "description": "The label on a field that allows users to provide a video id for a custom asset.",
396
400
  "message": "Video ID (for VOD DAI Content)"
package/demo/main.js CHANGED
@@ -1502,6 +1502,20 @@ shakaDemo.Main = class {
1502
1502
  request.contentSourceId = asset.imaContentSrcId;
1503
1503
  request.videoId = asset.imaVideoId;
1504
1504
  }
1505
+ switch (asset.imaManifestType) {
1506
+ case 'DASH':
1507
+ case 'dash':
1508
+ case 'MPD':
1509
+ case 'mpd':
1510
+ request.format = google.ima.dai.api.StreamRequest.StreamFormat.DASH;
1511
+ break;
1512
+ case 'HLS':
1513
+ case 'hls':
1514
+ case 'M3U8':
1515
+ case 'm3u8':
1516
+ request.format = google.ima.dai.api.StreamRequest.StreamFormat.HLS;
1517
+ break;
1518
+ }
1505
1519
 
1506
1520
  const uri = await adManager.requestServerSideStream(
1507
1521
  request, /* backupUri= */ asset.manifestUri);
package/dist/controls.css CHANGED
@@ -51,4 +51,4 @@
51
51
  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
52
52
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
53
53
  * SOFTWARE.
54
- */.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:calc(32px / 2);white-space:nowrap;font-size:13px;background:rgba(35 35 35 / 90%);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:calc(32px + 5px);left:calc(32px / 2);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/v107/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmM.otf) format('opentype')}.material-icons-round{font-family:'Material Icons Round';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}/*# sourceMappingURL=controls.css.map */
54
+ */.shaka-tooltips-on{overflow:visible}.shaka-tooltips-on>[class*=shaka-tooltip]{position:relative}.shaka-tooltips-on>[class*=shaka-tooltip]:active:after,.shaka-tooltips-on>[class*=shaka-tooltip]:focus-visible:after,.shaka-tooltips-on>[class*=shaka-tooltip]:hover:after{content:attr(aria-label);font-family:Roboto-Regular,Roboto,sans-serif;line-height:calc(32px / 2);white-space:nowrap;font-size:13px;background:rgba(35 35 35 / 90%);color:#fff;border-radius:3px;padding:5px 10px;position:absolute;bottom:calc(32px + 5px);left:calc(32px / 2);-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);-ms-transform:translateX(-50%);-o-transform:translateX(-50%);transform:translateX(-50%)}.shaka-tooltips-on>.shaka-tooltip-status:active:after,.shaka-tooltips-on>.shaka-tooltip-status:focus-visible:after,.shaka-tooltips-on>.shaka-tooltip-status:hover:after{content:attr(aria-label) " (" attr(shaka-status) ")"}.shaka-tooltips-on button:first-child:active:after,.shaka-tooltips-on button:first-child:focus-visible:after,.shaka-tooltips-on button:first-child:hover:after{left:0;-webkit-transform:translateX(0);-moz-transform:translateX(0);-ms-transform:translateX(0);-o-transform:translateX(0);transform:translateX(0)}.shaka-tooltips-on button:last-child:active:after,.shaka-tooltips-on button:last-child:focus-visible:after,.shaka-tooltips-on button:last-child:hover:after{left:32px;-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);-ms-transform:translateX(-100%);-o-transform:translateX(-100%);transform:translateX(-100%)}@font-face{font-family:Roboto;font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/roboto/v30/KFOmCnqEu92Fr1Mu4mxP.ttf) format('truetype')}@font-face{font-family:'Material Icons Round';font-style:normal;font-weight:400;src:url(https://fonts.gstatic.com/s/materialiconsround/v108/LDItaoyNOAY6Uewc665JcIzCKsKc_M9flwmM.otf) format('opentype')}.material-icons-round{font-family:'Material Icons Round';font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr}/*# sourceMappingURL=controls.css.map */