shaka-player 4.2.10 → 4.2.12

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 (64) hide show
  1. package/.github/workflows/appspot.yaml +39 -0
  2. package/.github/workflows/demo-version-index.yaml +3 -3
  3. package/CHANGELOG.md +42 -0
  4. package/CONTRIBUTORS +1 -0
  5. package/README.md +3 -0
  6. package/demo/custom.js +1 -1
  7. package/demo/demo.less +1 -0
  8. package/dist/demo.compiled.debug.js +2 -2
  9. package/dist/demo.compiled.debug.map +2 -2
  10. package/dist/demo.compiled.js +2 -2
  11. package/dist/demo.compiled.map +2 -2
  12. package/dist/demo.css +1 -1
  13. package/dist/demo.css.map +1 -1
  14. package/dist/deps.js +2 -2
  15. package/dist/locales.js +31 -31
  16. package/dist/shaka-player.compiled.d.ts +30 -0
  17. package/dist/shaka-player.compiled.debug.d.ts +30 -0
  18. package/dist/shaka-player.compiled.debug.externs.js +9 -0
  19. package/dist/shaka-player.compiled.debug.js +250 -246
  20. package/dist/shaka-player.compiled.debug.map +3 -3
  21. package/dist/shaka-player.compiled.externs.js +9 -0
  22. package/dist/shaka-player.compiled.js +789 -787
  23. package/dist/shaka-player.compiled.map +4 -4
  24. package/dist/shaka-player.ui.d.ts +30 -0
  25. package/dist/shaka-player.ui.debug.d.ts +30 -0
  26. package/dist/shaka-player.ui.debug.externs.js +9 -0
  27. package/dist/shaka-player.ui.debug.js +290 -285
  28. package/dist/shaka-player.ui.debug.map +3 -3
  29. package/dist/shaka-player.ui.externs.js +9 -0
  30. package/dist/shaka-player.ui.js +943 -941
  31. package/dist/shaka-player.ui.map +4 -4
  32. package/docs/tutorials/drm-config.md +9 -6
  33. package/docs/tutorials/welcome.md +1 -1
  34. package/externs/ima.js +34 -0
  35. package/lib/abr/simple_abr_manager.js +1 -1
  36. package/lib/cea/mp4_cea_parser.js +30 -14
  37. package/lib/dash/dash_parser.js +18 -3
  38. package/lib/hls/hls_parser.js +19 -2
  39. package/lib/hls/manifest_text_parser.js +10 -1
  40. package/lib/media/drm_engine.js +23 -14
  41. package/lib/media/gap_jumping_controller.js +24 -2
  42. package/lib/media/media_source_engine.js +10 -6
  43. package/lib/media/playhead.js +11 -0
  44. package/lib/media/region_observer.js +19 -1
  45. package/lib/media/segment_reference.js +22 -0
  46. package/lib/media/streaming_engine.js +16 -7
  47. package/lib/media/video_wrapper.js +6 -1
  48. package/lib/player.js +13 -4
  49. package/lib/polyfill/abort_controller.js +7 -0
  50. package/lib/text/vtt_text_parser.js +2 -1
  51. package/lib/util/manifest_parser_utils.js +1 -1
  52. package/lib/util/mp4_box_parsers.js +8 -3
  53. package/lib/util/stream_utils.js +1 -0
  54. package/package.json +9 -4
  55. package/test/cea/mp4_cea_parser_unit.js +26 -3
  56. package/test/dash/dash_parser_manifest_unit.js +120 -0
  57. package/test/hls/hls_live_unit.js +3 -1
  58. package/test/hls/hls_parser_unit.js +150 -0
  59. package/test/media/media_source_engine_unit.js +31 -0
  60. package/test/media/region_observer_unit.js +2 -1
  61. package/test/test/assets/multiple-trun-init.mp4 +0 -0
  62. package/test/test/assets/multiple-trun-segment.mp4 +0 -0
  63. package/test/test/util/layout_tests.js +4 -3
  64. package/ui/resolution_selection.js +7 -1
@@ -0,0 +1,39 @@
1
+ name: Deploy to Appspot (one-off)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ # Allows for manual triggering, to correct deployment issues.
6
+ inputs:
7
+ ref:
8
+ description: "A tag name or SHA1 to deploy."
9
+ required: true
10
+ subdomain:
11
+ description: "An appspot subdomain to deploy to. Be careful! Do not overwrite an existing subdomain!"
12
+ required: true
13
+
14
+ jobs:
15
+ appspot:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v3
19
+ with:
20
+ ref: ${{ inputs.ref }}
21
+ fetch-depth: 0
22
+ persist-credentials: false
23
+
24
+ - uses: actions/setup-node@v1
25
+ with:
26
+ node-version: 16
27
+ registry-url: 'https://registry.npmjs.org'
28
+
29
+ - uses: ./.github/workflows/custom-actions/prep-for-appspot
30
+
31
+ - uses: google-github-actions/auth@v0
32
+ with:
33
+ credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
34
+
35
+ - uses: google-github-actions/deploy-appengine@v0
36
+ with:
37
+ project_id: shaka-player-demo
38
+ version: ${{ inputs.subdomain }}
39
+ promote: false
@@ -27,13 +27,13 @@ jobs:
27
27
  # We need a list of all tags for this, so fetch the entire history.
28
28
  fetch-depth: 0
29
29
 
30
- - name: Generate static content
31
- run: python3 app-engine/demo-version-index/generate.py
32
-
33
30
  - uses: google-github-actions/auth@v0
34
31
  with:
35
32
  credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
36
33
 
34
+ - name: Generate static content
35
+ run: python3 app-engine/demo-version-index/generate.py
36
+
37
37
  - uses: google-github-actions/deploy-appengine@v0
38
38
  with:
39
39
  project_id: shaka-player-demo
package/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.2.12](https://github.com/shaka-project/shaka-player/compare/v4.2.11...v4.2.12) (2023-07-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **DASH:** Avoid "Possible encoding problem detected!" when appending chunked data ([#5376](https://github.com/shaka-project/shaka-player/issues/5376)) ([ad9de15](https://github.com/shaka-project/shaka-player/commit/ad9de15043491d5969f44d7d864041c19af3b108))
9
+ * **demo:** Fix deployment of v4.2.x on appspot ([d8b2378](https://github.com/shaka-project/shaka-player/commit/d8b2378ff565a6aec2de2689219001a1c2a16308))
10
+ * **Demo:** Trim custom manifestUri to avoid copy-paste errors ([#5378](https://github.com/shaka-project/shaka-player/issues/5378)) ([d7d2bcb](https://github.com/shaka-project/shaka-player/commit/d7d2bcb6aab0cb4b670889e380f4705444b2848e))
11
+ * **docs:** fix player configuration code in drm config tutorial ([#5359](https://github.com/shaka-project/shaka-player/issues/5359)) ([c5e0f8b](https://github.com/shaka-project/shaka-player/commit/c5e0f8b967d0327eb1d9ab50b4db77990d84a1ed))
12
+ * **DRM:** broken keySystemsMapping due to multiple references of drmInfo ([#5388](https://github.com/shaka-project/shaka-player/issues/5388)) ([8906548](https://github.com/shaka-project/shaka-player/commit/8906548b6c40b0ac3023c80f1bad02496aff0014))
13
+ * Fix captions from MP4s with multiple trun boxes ([#5422](https://github.com/shaka-project/shaka-player/issues/5422)) ([b41186e](https://github.com/shaka-project/shaka-player/commit/b41186e3cfe7e3e2f633a24d5c9c88e8eb025fef)), closes [#5328](https://github.com/shaka-project/shaka-player/issues/5328)
14
+ * Fix DASH rejection of streams with ColourPrimaries and MatrixCoefficients ([#5345](https://github.com/shaka-project/shaka-player/issues/5345)) ([e2968ca](https://github.com/shaka-project/shaka-player/commit/e2968ca7ad5ae5a3b3dea56029d2815214564a52))
15
+ * Fix exception on Tizen due to unsupported Array method ([#5429](https://github.com/shaka-project/shaka-player/issues/5429)) ([0fe4d5c](https://github.com/shaka-project/shaka-player/commit/0fe4d5c6f7dbe5e6254b8173cec5ce796c14f5bf))
16
+ * Fix failure when drivers lag behind browser ([#5423](https://github.com/shaka-project/shaka-player/issues/5423)) ([30f464f](https://github.com/shaka-project/shaka-player/commit/30f464f5f06b0f5e7779e7c4a6dedca6ae90277c))
17
+ * Gap jump at start when first jump lands in a new gap ([#5408](https://github.com/shaka-project/shaka-player/issues/5408)) ([1ead685](https://github.com/shaka-project/shaka-player/commit/1ead685075de79591a5909e4e06ac5dd380e3e92))
18
+ * gap jumping when gap exists at start position ([#5384](https://github.com/shaka-project/shaka-player/issues/5384)) ([bd5bade](https://github.com/shaka-project/shaka-player/commit/bd5badef95428ae515262d104770e88b71493469))
19
+ * **HLS:** Add subtitle role when there are no roles ([#5357](https://github.com/shaka-project/shaka-player/issues/5357)) ([c5a5ddb](https://github.com/shaka-project/shaka-player/commit/c5a5ddbfd0bfca21b686f2ec99c5dedb0da71fba))
20
+ * **HLS:** Fix dvh1 and dvhe detection as video codec ([#5364](https://github.com/shaka-project/shaka-player/issues/5364)) ([3373a41](https://github.com/shaka-project/shaka-player/commit/3373a41f483a8807d4de7effe7310fdf488999a5))
21
+ * **HLS:** Ignore segments with zero duration ([#5371](https://github.com/shaka-project/shaka-player/issues/5371)) ([29b81ea](https://github.com/shaka-project/shaka-player/commit/29b81ea3c12638feb210e79a5ee28a9ece34656f))
22
+ * **media:** Fix region checking in livestreams ([#5361](https://github.com/shaka-project/shaka-player/issues/5361)) ([007a259](https://github.com/shaka-project/shaka-player/commit/007a2593096fae079c068a89dcfea338ec6d677e)), closes [#5213](https://github.com/shaka-project/shaka-player/issues/5213)
23
+ * Populate HDR correctly ([#5369](https://github.com/shaka-project/shaka-player/issues/5369)) ([db67d8d](https://github.com/shaka-project/shaka-player/commit/db67d8d4c257a53b43456f63a68b19bd0ae9f08f))
24
+ * prevent access to null config_ in SimpleAbrManager ([#5362](https://github.com/shaka-project/shaka-player/issues/5362)) ([80973d7](https://github.com/shaka-project/shaka-player/commit/80973d7d033d4a876af1a3376877e3c36a55ecc9))
25
+ * **UI:** Fix resolution selection on src= ([#5367](https://github.com/shaka-project/shaka-player/issues/5367)) ([b570e92](https://github.com/shaka-project/shaka-player/commit/b570e92a3d0d49fe47d9051f48fb55196cc8b38e))
26
+ * **WebVTT:** Add support to middle position ([#5366](https://github.com/shaka-project/shaka-player/issues/5366)) ([6481e29](https://github.com/shaka-project/shaka-player/commit/6481e2902de33aa0b5cd7c2373c764bd3143a866))
27
+
28
+ ## [4.2.11](https://github.com/shaka-project/shaka-player/compare/v4.2.10...v4.2.11) (2023-06-20)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * **Demo:** Fix deployment of codem-isoboxer in the Demo ([#5257](https://github.com/shaka-project/shaka-player/issues/5257)) ([23d48d4](https://github.com/shaka-project/shaka-player/commit/23d48d4da40362ace5bf2b653ffc35d8a33df21a))
34
+ * **Demo:** Fix error link width to avoid overlap with close button ([#5309](https://github.com/shaka-project/shaka-player/issues/5309)) ([a6f980d](https://github.com/shaka-project/shaka-player/commit/a6f980d382669bf14fb91b63ab4f727f23f9064f))
35
+ * Fix error when network status changes on src= playbacks ([#5305](https://github.com/shaka-project/shaka-player/issues/5305)) ([ce354ba](https://github.com/shaka-project/shaka-player/commit/ce354bab773c9fcac906d666c43a14c0e6f86d2d))
36
+ * **HLS:** Avoid "Possible encoding problem detected!" when is a preload reference ([#5332](https://github.com/shaka-project/shaka-player/issues/5332)) ([763ae6a](https://github.com/shaka-project/shaka-player/commit/763ae6ad53934e12ac76a43138d15df7a20cd9d2))
37
+ * **HLS:** Avoid HLS resync when there is a gap in the stream ([#5284](https://github.com/shaka-project/shaka-player/issues/5284)) ([256cf20](https://github.com/shaka-project/shaka-player/commit/256cf2071e23b315254b083a52aaa24649bd3b3e))
38
+ * **HLS:** Avoid variable substitution if no variables ([#5269](https://github.com/shaka-project/shaka-player/issues/5269)) ([b549b60](https://github.com/shaka-project/shaka-player/commit/b549b6036c4baa2b987f4c0276cc2b0edf623dc0))
39
+ * **HLS:** Parse EXT-X-PART-INF as media playlist tag ([#5311](https://github.com/shaka-project/shaka-player/issues/5311)) ([d78c080](https://github.com/shaka-project/shaka-player/commit/d78c08065c8728dbd9f849b44668e4ca8147785c))
40
+ * **HLS:** Skip EXT-X-PRELOAD-HINT without full byterange info ([#5294](https://github.com/shaka-project/shaka-player/issues/5294)) ([e462711](https://github.com/shaka-project/shaka-player/commit/e462711d2366b89e2b60d42bab2b1da15ca80556))
41
+ * media source object URL revocation ([#5214](https://github.com/shaka-project/shaka-player/issues/5214)) ([80ce378](https://github.com/shaka-project/shaka-player/commit/80ce378a115eaa5c8ddee84de57ed7a503942b50))
42
+ * Ship to NPM without node version restrictions ([#5253](https://github.com/shaka-project/shaka-player/issues/5253)) ([41c1ace](https://github.com/shaka-project/shaka-player/commit/41c1ace953c898232040143b469fcf7971572450)), closes [#5243](https://github.com/shaka-project/shaka-player/issues/5243)
43
+ * unnecessary parsing of in-band pssh when pssh is in the manifest ([#5198](https://github.com/shaka-project/shaka-player/issues/5198)) ([889cc68](https://github.com/shaka-project/shaka-player/commit/889cc68093099e1976dea0b72ee3943fa6f992d5))
44
+
3
45
  ## [4.2.10](https://github.com/shaka-project/shaka-player/compare/v4.2.9...v4.2.10) (2023-04-27)
4
46
 
5
47
 
package/CONTRIBUTORS CHANGED
@@ -131,3 +131,4 @@ Raymond Cheng <raycheng100@gmail.com>
131
131
  Janroel Koppen <j.koppen@bluebillywig.com>
132
132
  Koen Romers <koenromers@gmail.com>
133
133
  Ashley Manners <ashley.manners@xperi.com>
134
+ Bidisha Das <officialbidisha1@gmail.com>
package/README.md CHANGED
@@ -268,6 +268,9 @@ The Shaka team doesn't have the bandwidth and experience to provide guidance and
268
268
  support for integrating Shaka Player with specific frameworks, but some of our
269
269
  users have successfully done so and created tutorials to help other beginners.
270
270
 
271
+ Shaka + ReactJS Library
272
+ - https://github.com/winoffrg/limeplay
273
+
271
274
  Shaka + ReactJS integrations:
272
275
  - https://github.com/matvp91/shaka-player-react
273
276
  - https://github.com/amit08255/shaka-player-react-with-ui-config
package/demo/custom.js CHANGED
@@ -567,7 +567,7 @@ shakaDemo.Custom = class {
567
567
  this.manifestField_ = input;
568
568
  };
569
569
  const manifestOnChange = (input) => {
570
- assetInProgress.manifestUri = input.value;
570
+ assetInProgress.manifestUri = input.value.trim();
571
571
  };
572
572
  const manifestURLName = shakaDemoMain.getLocalizedString(
573
573
  shakaDemo.MessageIds.MANIFEST_URL);
package/demo/demo.less CHANGED
@@ -167,6 +167,7 @@ html, body {
167
167
  display: inline-block;
168
168
  margin-left: auto;
169
169
  margin-right: auto;
170
+ max-width: 90%;
170
171
 
171
172
  /* Some very long URLs can appear in the error text, and word wrapping is very
172
173
  * helpful. */
@@ -249,8 +249,8 @@ this.makeField_(c,d,(e,f)=>{a.imaManifestType&&(e.value=a.imaManifestType);this.
249
249
  h);k&&a.licenseServers.set(k,h)}else a.licenseServers.clear()};var g=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.LICENSE_SERVER_URL);this.makeField_(c,g,(h,k)=>{d=h;(k=a.licenseServers.keys().next())&&k.value&&(h.value=a.licenseServers.get(k.value))},h=>{f()});g=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.LICENSE_CERTIFICATE_URL);this.makeField_(c,g,(h,k)=>{a.certificateUri&&(h.value=a.certificateUri)},h=>{a.certificateUri=h.value});g=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.DRM_SYSTEM);
250
250
  this.makeField_(c,g,(h,k)=>{e=h;k=a.licenseServers.keys();for(const l of k)if(!shakaDemo.Main.commonDrmSystems.includes(l)){h.value=l;break}},h=>{f()});return b}makeAssetDialogContentsExtra_(a,b){const c=document.createElement("div"),d=new shakaDemo.InputContainer(c,null,shakaDemo.InputContainer.Style.FLEX,null);d.getClassList().add("wide-input");d.setDefaultRowClass("wide-input");const e=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.EXTRA_SHAKA_PLAYER_CONFIG);this.makeField_(d,e,(f,g)=>{f.setAttribute("rows",
251
251
  10);a.extraConfig&&(f.value=JSON.stringify(a.extraConfig,null,2));b.push(f);f=document.createElement("span");f.classList.add("mdl-textfield__error");f.textContent=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.INVALID_JSON_CONFIG_ERROR);g.appendChild(f)},(f,g)=>{try{if(f.value){const h=JSON.parse(f.value);a.extraConfig=h}else a.extraConfig=null;g.setValid(!0)}catch(h){g.setValid(!1)}},!0);return c}makeAssetDialogContentsMain_(a,b,c){const d=document.createElement("div"),e=new shakaDemo.InputContainer(d,
252
- null,shakaDemo.InputContainer.Style.VERTICAL,null);var f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.MANIFEST_URL);this.makeField_(e,f,(g,h)=>{g.value=a.manifestUri;b.push(g);const k=document.createElement("span");k.classList.add("mdl-textfield__error");k.textContent=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.MANIFEST_URL_ERROR);h.appendChild(k);g.required=this.checkManifestRequired_(a);g.pattern="^(?!([\r\n\t\f\v ]+)$).*$";this.manifestField_=g},g=>{a.manifestUri=g.value});f=
253
- shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.NAME);this.makeField_(e,f,(g,h)=>{g.value=a.name;b.push(g);const k=document.createElement("span");k.classList.add("mdl-textfield__error");k.textContent=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.NAME_ERROR);h.appendChild(k);g.required=!0;g.pattern="^(?!( *";for(const l of this.assets_)l!=a&&(g.pattern+="|"+l.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));g.pattern+=")$).*$"},g=>{a.name=g.value});f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.ICON_URL);
252
+ null,shakaDemo.InputContainer.Style.VERTICAL,null);var f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.MANIFEST_URL);this.makeField_(e,f,(g,h)=>{g.value=a.manifestUri;b.push(g);const k=document.createElement("span");k.classList.add("mdl-textfield__error");k.textContent=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.MANIFEST_URL_ERROR);h.appendChild(k);g.required=this.checkManifestRequired_(a);g.pattern="^(?!([\r\n\t\f\v ]+)$).*$";this.manifestField_=g},g=>{a.manifestUri=g.value.trim()});
253
+ f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.NAME);this.makeField_(e,f,(g,h)=>{g.value=a.name;b.push(g);const k=document.createElement("span");k.classList.add("mdl-textfield__error");k.textContent=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.NAME_ERROR);h.appendChild(k);g.required=!0;g.pattern="^(?!( *";for(const l of this.assets_)l!=a&&(g.pattern+="|"+l.name.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"));g.pattern+=")$).*$"},g=>{a.name=g.value});f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.ICON_URL);
254
254
  this.makeField_(e,f,(g,h)=>{a.iconUri&&(g.value=a.iconUri,h=document.createElement("img"),h.src=g.value,h.alt="",c.appendChild(h))},g=>{shaka.util.Dom.removeAllChildren(c);if(a.iconUri=g.value){const h=document.createElement("img");h.src=g.value;h.alt="";c.appendChild(h)}});f=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.MIME_TYPE);this.makeField_(e,f,(g,h)=>{a.mimeType&&(g.value=a.mimeType)},g=>{a.mimeType=g.value||null});return d}checkManifestRequired_(a){return!(a.imaContentSrcId&&a.imaVideoId||
255
255
  null!=a.imaAssetKey)}makeAssetDialogContentsFinish_(a,b){const c=document.createElement("tr"),d=shakaDemo.Custom.ButtonStyle_.RAISED;var e=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.SAVE_BUTTON);c.appendChild(this.makeButton_(e,d,()=>{for(const f of b)if(!f.validity.valid)return;shakaDemoMain.setupOfflineSupport(a);this.assets_.add(a);this.saveAssetInfos_(this.assets_);this.remakeSavedList_();this.dialog_.close()}));e=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.CANCEL_BUTTON);
256
256
  c.appendChild(this.makeButton_(e,d,()=>{this.dialog_.close()}));return c}showAssetDialog_(a){shaka.util.Dom.removeAllChildren(this.dialog_);var b=[];const c=document.createElement("div"),d=this.makeAssetDialogContentsMain_(a,b,c),e=this.makeAssetDialogContentsDrm_(a,b),f=this.makeAssetDialogContentsHeaders_(a,b),g=this.makeAssetDialogContentsAds_(a,b),h=this.makeAssetDialogContentsHLS_(a,b),k=this.makeAssetDialogContentsExtra_(a,b);a=this.makeAssetDialogContentsFinish_(a,b);const l=document.createElement("tr"),