shaka-player 4.0.0 → 4.0.1

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 (57) hide show
  1. package/.github/config.yml +1 -0
  2. package/.github/workflows/release-please.yaml +6 -11
  3. package/CHANGELOG.md +15 -0
  4. package/build/misspellings.txt +1 -0
  5. package/dist/controls.css +1 -1
  6. package/dist/locales.js +32 -32
  7. package/dist/shaka-player.compiled.d.ts +2 -1
  8. package/dist/shaka-player.compiled.debug.d.ts +2 -1
  9. package/dist/shaka-player.compiled.debug.externs.js +1 -0
  10. package/dist/shaka-player.compiled.debug.js +170 -165
  11. package/dist/shaka-player.compiled.debug.map +3 -3
  12. package/dist/shaka-player.compiled.externs.js +1 -0
  13. package/dist/shaka-player.compiled.js +783 -779
  14. package/dist/shaka-player.compiled.map +3 -3
  15. package/dist/shaka-player.ui.d.ts +2 -1
  16. package/dist/shaka-player.ui.debug.d.ts +2 -1
  17. package/dist/shaka-player.ui.debug.externs.js +1 -0
  18. package/dist/shaka-player.ui.debug.js +182 -177
  19. package/dist/shaka-player.ui.debug.map +3 -3
  20. package/dist/shaka-player.ui.externs.js +1 -0
  21. package/dist/shaka-player.ui.js +924 -920
  22. package/dist/shaka-player.ui.map +3 -3
  23. package/docs/tutorials/upgrade.md +4 -2
  24. package/externs/shaka/player.js +11 -0
  25. package/karma.conf.js +4 -0
  26. package/lib/dash/dash_parser.js +2 -2
  27. package/lib/hls/hls_parser.js +20 -11
  28. package/lib/media/drm_engine.js +16 -0
  29. package/lib/media/media_source_engine.js +91 -37
  30. package/lib/media/streaming_engine.js +1 -2
  31. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  32. package/lib/player.js +165 -107
  33. package/lib/text/vtt_text_parser.js +7 -7
  34. package/lib/util/config_utils.js +25 -0
  35. package/lib/util/error.js +7 -0
  36. package/lib/util/manifest_parser_utils.js +1 -1
  37. package/lib/util/mime_utils.js +48 -1
  38. package/lib/util/periods.js +5 -4
  39. package/lib/util/player_configuration.js +14 -14
  40. package/lib/util/stream_utils.js +4 -2
  41. package/package.json +4 -1
  42. package/test/hls/hls_live_unit.js +22 -0
  43. package/test/hls/manifest_text_parser_unit.js +19 -0
  44. package/test/offline/indexeddb_storage_unit.js +1 -1
  45. package/test/offline/storage_compatibility_unit.js +1 -1
  46. package/test/player_external.js +7 -1
  47. package/test/player_integration.js +6 -10
  48. package/test/player_src_equals_integration.js +81 -83
  49. package/test/player_unit.js +98 -1
  50. package/test/test/boot.js +9 -0
  51. package/test/test/externs/filters.js +4 -0
  52. package/test/test/util/simple_fakes.js +31 -2
  53. package/test/text/vtt_text_parser_unit.js +64 -5
  54. package/test/util/mime_utils_unit.js +54 -0
  55. package/test/util/periods_unit.js +79 -0
  56. package/ui/resolution_selection.js +1 -1
  57. package/docs/tutorials/gsoc-ideas-list.md +0 -3
@@ -0,0 +1 @@
1
+ blank_issues_enabled: false
@@ -17,14 +17,8 @@ jobs:
17
17
  - uses: google-github-actions/release-please-action@v3
18
18
  id: release
19
19
  with:
20
- # Without this command, the manifest file will be ignored. At least
21
- # for our initial main-branch releases using this workflow, we must
22
- # use the manifest and config file.
23
- command: manifest
24
- config-file: .release-please-config.json
25
- manifest-file: .release-please-manifest.json
26
- # Make sure the player version gets updated.
27
- extra-files: lib/player.js
20
+ # Required input to specify the release type (node package).
21
+ release-type: node
28
22
  # Make sure we create the PR against the correct branch.
29
23
  default-branch: ${{ github.ref_name }}
30
24
 
@@ -34,9 +28,10 @@ jobs:
34
28
  - name: Custom update Player version
35
29
  if: steps.release.outputs.release_created == false
36
30
  run: |
37
- # Check out the branch that release-please created, if it exists.
31
+ # Check out the branch that release-please created.
32
+ # If it does not exist, FAIL!
38
33
  git fetch
39
- git checkout release-please--branches--${{ github.ref_name }} || exit 0
34
+ git checkout release-please--branches--${{ github.ref_name }}--components--shaka-player || exit 1
40
35
  # If it does exist, update lib/player.js in the PR branch, so that the
41
36
  # -uncompiled tag remains in the player version in that context.
42
37
  VERSION="v$(jq -r .version package.json)-uncompiled"
@@ -56,7 +51,7 @@ jobs:
56
51
  tag-main:
57
52
  runs-on: ubuntu-latest
58
53
  needs: release
59
- if: needs.release.outputs.release_created
54
+ if: needs.release.outputs.release_created && endsWith(needs.release.outputs.tag_name, '.0') == false
60
55
  steps:
61
56
  - uses: actions/checkout@v2
62
57
  with:
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ### [4.0.1](https://github.com/shaka-project/shaka-player/compare/v4.0.0...v4.0.1) (2022-05-18)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Do not report MANIFEST RESTRICTIONS_CANNOT_BE_MET error twice ([#4194](https://github.com/shaka-project/shaka-player/issues/4194)) ([0b03e79](https://github.com/shaka-project/shaka-player/commit/0b03e7900bd28420e6b066f909a69ff511144471)), closes [#4190](https://github.com/shaka-project/shaka-player/issues/4190)
9
+ * **fairplay:** Re-add initDataTransform config ([#4231](https://github.com/shaka-project/shaka-player/issues/4231)) ([9a6f150](https://github.com/shaka-project/shaka-player/commit/9a6f150c082e477f9dae95c4436d6ff764481d02))
10
+ * Fix event listener leaks in Player ([#4229](https://github.com/shaka-project/shaka-player/issues/4229)) ([e6c3b22](https://github.com/shaka-project/shaka-player/commit/e6c3b226ba25cd62b288c75da895531ed27087c0))
11
+ * Fix exception with streaming.startAtSegmentBoundary ([#4216](https://github.com/shaka-project/shaka-player/issues/4216)) ([24eac2c](https://github.com/shaka-project/shaka-player/commit/24eac2c4bcea726f36d11845d8a174672c28e74f)), closes [#4188](https://github.com/shaka-project/shaka-player/issues/4188)
12
+ * Fix PERIOD_FLATTENING_FAILED error when periods have different base sample types ([#4206](https://github.com/shaka-project/shaka-player/issues/4206)) ([0482aec](https://github.com/shaka-project/shaka-player/commit/0482aec127e5429434ba015bd98ae8c5e15fef68)), closes [#4202](https://github.com/shaka-project/shaka-player/issues/4202)
13
+ * Fix VTT cue timing in HLS ([#4217](https://github.com/shaka-project/shaka-player/issues/4217)) ([69d1c14](https://github.com/shaka-project/shaka-player/commit/69d1c143aaade9167cba03a05daea5b94b3ccf95)), closes [#4191](https://github.com/shaka-project/shaka-player/issues/4191)
14
+ * **hls:** Fix av1 codec selection in HLS. ([#4203](https://github.com/shaka-project/shaka-player/issues/4203)) ([4d418be](https://github.com/shaka-project/shaka-player/commit/4d418be18334b181ab7f32f9e9fe66522fc9057a))
15
+ * **hls:** Fix X-PRELOAD-HINT failure with LL mode off ([#4212](https://github.com/shaka-project/shaka-player/issues/4212)) ([ae84aac](https://github.com/shaka-project/shaka-player/commit/ae84aac87cc4331139a98441c90993319a3b19ef)), closes [#4185](https://github.com/shaka-project/shaka-player/issues/4185)
16
+ * Wait for chapters track to be loaded ([#4228](https://github.com/shaka-project/shaka-player/issues/4228)) ([dec3d9c](https://github.com/shaka-project/shaka-player/commit/dec3d9c50505a6a7707232f595acbe1cfea8c3a0)), closes [#4186](https://github.com/shaka-project/shaka-player/issues/4186)
17
+
3
18
  ## [4.0.0](https://github.com/shaka-project/shaka-player/compare/v3.3.0...v4.0.0) (2022-04-30)
4
19
 
5
20
 
@@ -3,6 +3,7 @@
3
3
  # same as the match.
4
4
  {
5
5
  r'(?i)arti?fi?ci?ai?l': 'artificial',
6
+ r'(?i)bandwith': 'bandwidth',
6
7
  r'(?i)cur+ent': 'current',
7
8
  r"(?i)doens?'t": "doesn't",
8
9
  r'(?i)ful+screen': 'fullscreen',
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/v29/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/v102/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/v102/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 */
package/dist/locales.js CHANGED
@@ -721,45 +721,45 @@ shaka.ui.Locales.addTo = function(localization) {
721
721
  * @const
722
722
  */
723
723
  shaka.ui.Locales.Ids = {
724
- AD_PROGRESS: 'AD_PROGRESS',
725
- OFF: 'OFF',
726
- ON: 'ON',
727
- LIVE: 'LIVE',
728
- VOLUME: 'VOLUME',
729
- AUTO_QUALITY: 'AUTO_QUALITY',
730
724
  AD_DURATION: 'AD_DURATION',
725
+ QUALITY: 'QUALITY',
726
+ NOT_APPLICABLE: 'NOT_APPLICABLE',
731
727
  ENTER_LOOP_MODE: 'ENTER_LOOP_MODE',
732
- EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
728
+ MORE_SETTINGS: 'MORE_SETTINGS',
729
+ SKIP_TO_LIVE: 'SKIP_TO_LIVE',
730
+ PLAY: 'PLAY',
731
+ LANGUAGE: 'LANGUAGE',
732
+ VOLUME: 'VOLUME',
733
+ OFF: 'OFF',
734
+ PAUSE: 'PAUSE',
735
+ AUTO_QUALITY: 'AUTO_QUALITY',
733
736
  REWIND: 'REWIND',
734
- MUTE: 'MUTE',
735
- UNMUTE: 'UNMUTE',
737
+ EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
738
+ ON: 'ON',
739
+ FULL_SCREEN: 'FULL_SCREEN',
740
+ SUBTITLE_FORCED: 'SUBTITLE_FORCED',
741
+ SEEK: 'SEEK',
742
+ SKIP_AD: 'SKIP_AD',
743
+ CAPTIONS: 'CAPTIONS',
736
744
  CAST: 'CAST',
737
- QUALITY: 'QUALITY',
745
+ BACK: 'BACK',
746
+ PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
747
+ ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
748
+ UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
749
+ STATISTICS: 'STATISTICS',
750
+ PLAYBACK_RATE: 'PLAYBACK_RATE',
751
+ FAST_FORWARD: 'FAST_FORWARD',
752
+ EXIT_FULL_SCREEN: 'EXIT_FULL_SCREEN',
753
+ UNMUTE: 'UNMUTE',
754
+ AIRPLAY: 'AIRPLAY',
738
755
  UNDETERMINED_LANGUAGE: 'UNDETERMINED_LANGUAGE',
739
756
  MULTIPLE_LANGUAGES: 'MULTIPLE_LANGUAGES',
757
+ RESOLUTION: 'RESOLUTION',
740
758
  EXIT_PICTURE_IN_PICTURE: 'EXIT_PICTURE_IN_PICTURE',
759
+ MUTE: 'MUTE',
760
+ REPLAY: 'REPLAY',
741
761
  AD_TIME: 'AD_TIME',
742
- PLAYBACK_RATE: 'PLAYBACK_RATE',
743
- CAPTIONS: 'CAPTIONS',
744
- FULL_SCREEN: 'FULL_SCREEN',
762
+ LIVE: 'LIVE',
745
763
  LOOP: 'LOOP',
746
- PLAY: 'PLAY',
747
- AIRPLAY: 'AIRPLAY',
748
- EXIT_LOOP_MODE: 'EXIT_LOOP_MODE',
749
- FAST_FORWARD: 'FAST_FORWARD',
750
- UNRECOGNIZED_LANGUAGE: 'UNRECOGNIZED_LANGUAGE',
751
- STATISTICS: 'STATISTICS',
752
- ENTER_PICTURE_IN_PICTURE: 'ENTER_PICTURE_IN_PICTURE',
753
- SKIP_AD: 'SKIP_AD',
754
- NOT_APPLICABLE: 'NOT_APPLICABLE',
755
- RESOLUTION: 'RESOLUTION',
756
- PICTURE_IN_PICTURE: 'PICTURE_IN_PICTURE',
757
- BACK: 'BACK',
758
- PAUSE: 'PAUSE',
759
- REPLAY: 'REPLAY',
760
- LANGUAGE: 'LANGUAGE',
761
- MORE_SETTINGS: 'MORE_SETTINGS',
762
- SEEK: 'SEEK',
763
- SUBTITLE_FORCED: 'SUBTITLE_FORCED',
764
- SKIP_TO_LIVE: 'SKIP_TO_LIVE',
764
+ AD_PROGRESS: 'AD_PROGRESS',
765
765
  };
@@ -2180,6 +2180,7 @@ declare namespace shaka.util.Error {
2180
2180
  CAST_CANCELED_BY_USER = 8004.0 ,
2181
2181
  CAST_CONNECTION_TIMED_OUT = 8005.0 ,
2182
2182
  CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 ,
2183
+ CHAPTERS_TRACK_FAILED = 2015.0 ,
2183
2184
  CONTENT_NOT_LOADED = 7004.0 ,
2184
2185
  CONTENT_TRANSFORMATION_FAILED = 3019.0 ,
2185
2186
  CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 ,
@@ -3804,7 +3805,7 @@ declare namespace shaka.extern {
3804
3805
  }
3805
3806
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
3806
3807
  declare namespace shaka.extern {
3807
- type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
3808
+ type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , initDataTransform ? : (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
3808
3809
  }
3809
3810
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
3810
3811
  declare namespace shaka.extern {
@@ -2180,6 +2180,7 @@ declare namespace shaka.util.Error {
2180
2180
  CAST_CANCELED_BY_USER = 8004.0 ,
2181
2181
  CAST_CONNECTION_TIMED_OUT = 8005.0 ,
2182
2182
  CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 ,
2183
+ CHAPTERS_TRACK_FAILED = 2015.0 ,
2183
2184
  CONTENT_NOT_LOADED = 7004.0 ,
2184
2185
  CONTENT_TRANSFORMATION_FAILED = 3019.0 ,
2185
2186
  CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 ,
@@ -3804,7 +3805,7 @@ declare namespace shaka.extern {
3804
3805
  }
3805
3806
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
3806
3807
  declare namespace shaka.extern {
3807
- type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
3808
+ type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , initDataTransform ? : (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array , logLicenseExchange : boolean , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
3808
3809
  }
3809
3810
  // Generated from /home/runner/work/shaka-player/shaka-player/externs/shaka/player.js
3810
3811
  declare namespace shaka.extern {
@@ -546,6 +546,7 @@ shaka.util.Error.Code = {
546
546
  'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
547
547
  'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
548
548
  'MISSING_TEXT_PLUGIN': 2014,
549
+ 'CHAPTERS_TRACK_FAILED': 2015,
549
550
  'BUFFER_READ_OUT_OF_BOUNDS': 3000,
550
551
  'JS_INTEGER_OVERFLOW': 3001,
551
552
  'EBML_OVERFLOW': 3002,