shaka-player 4.4.0 → 4.4.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.
Files changed (75) hide show
  1. package/.github/workflows/deflake.yaml +8 -5
  2. package/.github/workflows/release-please.yaml +64 -16
  3. package/.github/workflows/report-incremental-coverage.yaml +2 -2
  4. package/.github/workflows/shaka-bot-commands/command-help.sh +27 -0
  5. package/.github/workflows/shaka-bot-commands/command-test.sh +56 -0
  6. package/.github/workflows/shaka-bot-commands/lib.sh +83 -0
  7. package/.github/workflows/shaka-bot-commands/main.sh +51 -0
  8. package/.github/workflows/talk-to-shaka-bot.yaml +29 -0
  9. package/.github/workflows/update-issues.yaml +2 -1
  10. package/.github/workflows/validate-pr-title.yaml +3 -11
  11. package/CHANGELOG.md +33 -0
  12. package/CONTRIBUTORS +1 -0
  13. package/demo/custom.js +5 -5
  14. package/dist/demo.compiled.debug.js +3 -3
  15. package/dist/demo.compiled.debug.map +1 -1
  16. package/dist/demo.compiled.js +3 -3
  17. package/dist/demo.compiled.map +1 -1
  18. package/dist/deps.js +2 -2
  19. package/dist/locales.js +32 -32
  20. package/dist/shaka-player.compiled.d.ts +18 -2
  21. package/dist/shaka-player.compiled.debug.d.ts +18 -2
  22. package/dist/shaka-player.compiled.debug.externs.js +38 -1
  23. package/dist/shaka-player.compiled.debug.js +289 -280
  24. package/dist/shaka-player.compiled.debug.map +3 -3
  25. package/dist/shaka-player.compiled.externs.js +38 -1
  26. package/dist/shaka-player.compiled.js +944 -940
  27. package/dist/shaka-player.compiled.map +4 -4
  28. package/dist/shaka-player.ui.d.ts +18 -2
  29. package/dist/shaka-player.ui.debug.d.ts +18 -2
  30. package/dist/shaka-player.ui.debug.externs.js +38 -1
  31. package/dist/shaka-player.ui.debug.js +352 -343
  32. package/dist/shaka-player.ui.debug.map +3 -3
  33. package/dist/shaka-player.ui.externs.js +38 -1
  34. package/dist/shaka-player.ui.js +1037 -1034
  35. package/dist/shaka-player.ui.map +4 -4
  36. package/docs/tutorials/fairplay.md +8 -0
  37. package/docs/tutorials/faq.md +1 -1
  38. package/externs/shaka/namespace.js +2 -2
  39. package/externs/shaka/text.js +7 -0
  40. package/externs/shaka/transmuxer.js +2 -1
  41. package/lib/dash/segment_template.js +3 -0
  42. package/lib/hls/hls_parser.js +9 -4
  43. package/lib/media/media_source_engine.js +23 -3
  44. package/lib/mss/mss_parser.js +1 -0
  45. package/lib/player.js +8 -57
  46. package/lib/text/lrc_text_parser.js +8 -0
  47. package/lib/text/mp4_ttml_parser.js +8 -0
  48. package/lib/text/mp4_vtt_parser.js +8 -0
  49. package/lib/text/sbv_text_parser.js +8 -0
  50. package/lib/text/simple_text_displayer.js +0 -1
  51. package/lib/text/srt_text_parser.js +8 -0
  52. package/lib/text/ssa_text_parser.js +8 -0
  53. package/lib/text/text_engine.js +8 -1
  54. package/lib/text/ttml_text_parser.js +10 -1
  55. package/lib/text/ui_text_displayer.js +49 -3
  56. package/lib/text/vtt_text_parser.js +21 -5
  57. package/lib/transmuxer/aac_transmuxer.js +1 -1
  58. package/lib/transmuxer/ac3_transmuxer.js +1 -0
  59. package/lib/transmuxer/ec3_transmuxer.js +1 -0
  60. package/lib/transmuxer/mp3_transmuxer.js +1 -0
  61. package/lib/transmuxer/ts_transmuxer.js +84 -100
  62. package/lib/util/error.js +16 -10
  63. package/lib/util/mp4_generator.js +27 -20
  64. package/lib/util/player_configuration.js +2 -2
  65. package/lib/util/stream_utils.js +13 -11
  66. package/lib/util/ts_parser.js +137 -117
  67. package/package.json +2 -2
  68. package/test/hls/hls_parser_unit.js +12 -13
  69. package/test/media/media_source_engine_integration.js +2 -2
  70. package/test/mss/mss_player_integration.js +1 -1
  71. package/test/text/text_engine_unit.js +4 -2
  72. package/test/text/ttml_text_parser_unit.js +3 -4
  73. package/test/text/vtt_text_parser_unit.js +17 -2
  74. package/test/text/web_vtt_layout_integration.js +0 -1
  75. package/ui/language_utils.js +0 -15
@@ -1,16 +1,19 @@
1
1
  name: Deflake Tests
2
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.
3
+ # Runs when the Selenum lab test or PR test workflows complete. This will run
4
+ # with 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. A test run will be
6
+ # given up to 3 runs to succeed.
6
7
  on:
7
8
  workflow_run:
8
- workflows: [Selenium Lab Tests]
9
+ workflows:
10
+ - Selenium Lab Tests
11
+ - Build and Test PR
9
12
  types: [completed]
10
13
 
11
14
  jobs:
12
15
  deflake:
13
- if: ${{ github.event.workflow_run.event == 'schedule' && github.event.workflow_run.conclusion == 'failure' }}
16
+ if: ${{ github.event.workflow_run.conclusion == 'failure' }}
14
17
  runs-on: ubuntu-latest
15
18
 
16
19
  steps:
@@ -17,21 +17,20 @@ jobs:
17
17
  - uses: google-github-actions/release-please-action@v3
18
18
  id: release
19
19
  with:
20
- # This command instructs the tool to use the config and manifest
21
- # files below to decide the next version and the SHA of the previous
22
- # release (used to compute the changelog). This is necessary if
23
- # there are more than 250 commits between main branch releases.
24
- command: manifest
25
- config-file: .release-please-config.json
26
- manifest-file: .release-please-manifest.json
27
20
  # Required input to specify the release type (node package).
28
21
  release-type: node
29
22
  # Make sure we create the PR against the correct branch.
30
23
  default-branch: ${{ github.ref_name }}
24
+ # Use a special shaka-bot access token for releases.
25
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
31
26
 
32
27
  # If we didn't create a release, we may have created or updated a PR.
28
+ # Check out the code, then update the Player version in the PR.
33
29
  - uses: actions/checkout@v3
34
30
  if: steps.release.outputs.release_created == false
31
+ with:
32
+ # Use a special shaka-bot access token for releases.
33
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
35
34
  - name: Custom update Player version
36
35
  if: steps.release.outputs.release_created == false
37
36
  run: |
@@ -45,9 +44,9 @@ jobs:
45
44
  sed -e "s/^\\(shaka.Player.version =\\).*/\\1 '$VERSION';/" \
46
45
  -i lib/player.js
47
46
  git add lib/player.js
48
- # Emulate the actions bot.
49
- git config user.name "github-actions[bot]"
50
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
47
+ # Set missing git config for the commit.
48
+ git config user.name "shaka-bot"
49
+ git config user.email "shaka-bot@users.noreply.github.com"
51
50
  # Update the PR.
52
51
  git commit --amend --no-edit
53
52
  git push -f
@@ -62,12 +61,16 @@ jobs:
62
61
  steps:
63
62
  - uses: actions/checkout@v3
64
63
  with:
64
+ # Check out the origin repo, and do it at main, not the PR branch.
65
65
  ref: main
66
+ # Use a special shaka-bot access token for releases.
67
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
66
68
  - name: Tag the main branch
67
69
  run: |
68
- # Emulate the actions bot.
69
- git config user.name "github-actions[bot]"
70
- git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
70
+ # Set missing git config for the tag.
71
+ git config user.name "shaka-bot"
72
+ git config user.email "shaka-bot@users.noreply.github.com"
73
+ # Tag the main branch.
71
74
  VERSION=${{ needs.release.outputs.tag_name }}
72
75
  git tag -m "$VERSION-main" "$VERSION-main"
73
76
  git push origin "$VERSION-main"
@@ -87,10 +90,52 @@ jobs:
87
90
  node-version: 16
88
91
  registry-url: 'https://registry.npmjs.org'
89
92
 
93
+ - name: Compute NPM tags
94
+ run: |
95
+ # NPM publish always sets a tag. If you don't provide an explicit
96
+ # tag, you get the "latest" tag by default, but we want "latest" to
97
+ # always point to the highest version number. So we set an explicit
98
+ # tag on every "publish" command, then follow up with a command to
99
+ # set "latest" only if this release was the highest version yet.
100
+
101
+ # The explicit tag is based on the branch. If the git tag is v4.4.1,
102
+ # the branch was v4.4.x, and the explicit NPM tag should be
103
+ # v4.4-latest.
104
+ GIT_TAG_NAME=${{ needs.release.outputs.tag_name }}
105
+ NPM_TAG=$(echo "$GIT_TAG_NAME" | cut -f 1-2 -d .)-latest
106
+ echo "NPM_TAG=$NPM_TAG" >> $GITHUB_ENV
107
+
108
+ # We only tag the NPM package as "latest" if this release is the
109
+ # highest version to date.
110
+ RELEASE_TAGS=$(git tag | grep ^v[0-9] | grep -Ev -- '-(master|main)')
111
+ LATEST_RELEASE=$(echo "$RELEASE_TAGS" | sort --version-sort | tail -1)
112
+
113
+ if [[ "$GIT_TAG_NAME" == "$LATEST_RELEASE" ]]; then
114
+ NPM_LATEST=true
115
+ else
116
+ NPM_LATEST=false
117
+ fi
118
+ echo NPM_LATEST=$NPM_LATEST >> $GITHUB_ENV
119
+
120
+ # Debug the decisions made here.
121
+ echo "Latest release: $LATEST_RELEASE"
122
+ echo "This release: $GIT_TAG_NAME"
123
+ echo "NPM tag: $NPM_TAG"
124
+ echo "NPM latest: $NPM_LATEST"
125
+
90
126
  - run: npm ci
91
- - run: npm publish
127
+ - name: Publish
92
128
  env:
93
129
  NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
130
+ run: |
131
+ # Publish with an explicit tag.
132
+ npm publish --tag "$NPM_TAG"
133
+
134
+ # Add the "latest" tag if needed.
135
+ if [[ "$NPM_LATEST" == "true" ]]; then
136
+ NPM_VERSION=$(npm version --json | jq -r '."shaka-player"')
137
+ npm dist-tag add "shaka-player@$NPM_VERSION" latest
138
+ fi
94
139
 
95
140
  - run: npm pack
96
141
  - uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2
@@ -131,10 +176,11 @@ jobs:
131
176
  TAG_NAME=${{ needs.release.outputs.tag_name }}
132
177
 
133
178
  if [[ "$TAG_NAME" == "$LATEST_RELEASE" ]]; then
134
- echo APPSPOT_PROMOTE=true >> $GITHUB_ENV
179
+ APPSPOT_PROMOTE=true
135
180
  else
136
- echo APPSPOT_PROMOTE=false >> $GITHUB_ENV
181
+ APPSPOT_PROMOTE=false
137
182
  fi
183
+ APPSPOT_PROMOTE=$APPSPOT_PROMOTE >> $GITHUB_ENV
138
184
 
139
185
  # Debug the decisions made here.
140
186
  echo "Subdomain: $APPSPOT_SUBDOMAIN"
@@ -162,6 +208,8 @@ jobs:
162
208
  - uses: actions/checkout@v3
163
209
  with:
164
210
  fetch-depth: 0
211
+ # Use a special shaka-bot access token for releases.
212
+ token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
165
213
 
166
214
  - name: Create release branch
167
215
  run: |
@@ -21,7 +21,7 @@ jobs:
21
21
  id: compute
22
22
  shell: bash
23
23
  env:
24
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24
+ GITHUB_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN }}
25
25
  # Fetches the coverage data from the run that triggered the report,
26
26
  # parses it, compares it to the changed lines in the PR, and computes
27
27
  # the incremental code coverage.
@@ -36,4 +36,4 @@ jobs:
36
36
  message: "Incremental code coverage: ${{ steps.compute.outputs.coverage }}"
37
37
  comment_includes: "Incremental code coverage: "
38
38
  pr_number: ${{ steps.compute.outputs.pr_number }}
39
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39
+ GITHUB_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN }}
@@ -0,0 +1,27 @@
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # The help command implementation.
16
+ # Assumes that lib.sh has been loaded and all required variables are set.
17
+
18
+ # Using single quotes to avoid executing the things in backticks, which are
19
+ # really markdown.
20
+ (
21
+ echo 'I honor the following commands from anyone:'
22
+ echo ' - `@shaka-bot help`: Show this help message'
23
+ echo ''
24
+ echo 'I honor the following commands from maintainers only:'
25
+ echo ' - `@shaka-bot test`: Start lab tests on all devices'
26
+ echo ' - `@shaka-bot test ce`: Start lab tests on CE devices only (no desktop browsers)'
27
+ ) | reply_from_pipe
@@ -0,0 +1,56 @@
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # The test command implementation.
16
+ # Assumes that lib.sh has been loaded and all required variables are set.
17
+
18
+ if ! check_permissions; then
19
+ reply "Only maintainers may start lab tests."
20
+ exit 0
21
+ fi
22
+
23
+ # These are passed to the lab testing workflow.
24
+ WORKFLOW_ARGS=( "pr=$PR_NUMBER" )
25
+
26
+ case "${SHAKA_BOT_ARGUMENTS[0]}" in
27
+ # CE devices only.
28
+ ce) WORKFLOW_ARGS+=( "browser_filter=Tizen ChromecastUltra ChromecastGTV ChromeAndroid" ) ;;
29
+
30
+ # No command argument, no extra workflow arguments.
31
+ "") ;;
32
+
33
+ *)
34
+ reply "Unrecognized test argument: ${SHAKA_BOT_ARGUMENTS[0]}"
35
+ exit 1
36
+ ;;
37
+ esac
38
+
39
+ if start_workflow selenium-lab-tests.yaml "${WORKFLOW_ARGS[@]}"; then
40
+ (
41
+ echo "Lab tests started with arguments:"
42
+ for arg in "${WORKFLOW_ARGS[@]}"; do
43
+ echo " - \`$arg\`"
44
+ done
45
+ ) | reply_from_pipe
46
+ else
47
+ (
48
+ echo "I failed to start the lab test workflow."
49
+ echo ""
50
+ echo "Please check GitHub Actions logs for details."
51
+ ) | reply_from_pipe
52
+
53
+ # Fail this workflow to make it easier to find the right run
54
+ # and its logs.
55
+ exit 1
56
+ fi
@@ -0,0 +1,83 @@
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Utilities for handling @shaka-bot commands.
16
+
17
+ # Ignore case in all string comparisons.
18
+ shopt -s nocasematch
19
+
20
+ function check_required_variable() {
21
+ local VAR_NAME="$1"
22
+
23
+ # The ! syntax here is Bash variable indirection.
24
+ if [[ -z "${!VAR_NAME}" ]]; then
25
+ echo "Missing environment variable: $VAR_NAME"
26
+ exit 1
27
+ fi
28
+ }
29
+
30
+ # Leaving a comment requires a token with "repo" scope.
31
+ function reply() {
32
+ echo "@$COMMENTER: $@" | \
33
+ gh issue comment "$PR_NUMBER" -R "$THIS_REPO" -F -
34
+ }
35
+
36
+ # Leaving a comment requires a token with "repo" scope.
37
+ function reply_from_pipe() {
38
+ (echo -n "@$COMMENTER: "; cat /dev/stdin) | \
39
+ gh issue comment "$PR_NUMBER" -R "$THIS_REPO" -F -
40
+ }
41
+
42
+ # Checking permissions requires a token with "repo" and "org:read" scopes, and
43
+ # write access.
44
+ function check_permissions() {
45
+ # Check permissions: this API call fails if the commenter has no special
46
+ # permissions on the repo.
47
+ gh api "/repos/$THIS_REPO/collaborators/$COMMENTER"
48
+ }
49
+
50
+ # Starting a workflow requires a token with "repo" scope and write access.
51
+ # $1 is the workflow filename. Subsequent arguments are key=value pairs to be
52
+ # passed as input to the workflow_dispatch event.
53
+ function start_workflow() {
54
+ local WORKFLOW="$1"
55
+ shift
56
+
57
+ # The gh command wants -f before each key-value pair. The caller shouldn't
58
+ # have to know that, so we rebuild the argument array with -f here.
59
+ local GH_ARGS=()
60
+ for arg in "$@"; do
61
+ GH_ARGS+=( "-f" "$arg" )
62
+ done
63
+
64
+ gh workflow run "$WORKFLOW" -R "$THIS_REPO" "${GH_ARGS[@]}"
65
+ }
66
+
67
+ # Outputs to global variables SHAKA_BOT_COMMAND and SHAKA_BOT_ARGUMENTS (array).
68
+ function parse_command() {
69
+ # Tokenize the comment by whitespace.
70
+ local TOKENS=( $COMMENT_BODY )
71
+
72
+ local INDEX
73
+ for (( INDEX=0; INDEX < ${#TOKENS[@]}; INDEX++ )); do
74
+ if [[ "${TOKENS[i]}" == "@shaka-bot" ]]; then
75
+ SHAKA_BOT_COMMAND="${TOKENS[i+1]}"
76
+ # A slice of all tokens starting with index i+2.
77
+ SHAKA_BOT_ARGUMENTS=( "${TOKENS[@]:i+2}" )
78
+ return 0
79
+ fi
80
+ done
81
+
82
+ return 1
83
+ }
@@ -0,0 +1,51 @@
1
+ # Copyright 2022 Google LLC
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ # Handle @shaka-bot commands commented on PRs.
16
+
17
+ # Run everything from the folder in which this script lives.
18
+ cd "$(dirname "$0")"
19
+
20
+ # Load utils.
21
+ . lib.sh
22
+
23
+ # Check required environment variables passed from the workflow.
24
+ # If running this manually while testing changes, supply these.
25
+ check_required_variable GH_TOKEN # With repo & org:read scope, write access
26
+ check_required_variable THIS_REPO # like shaka-project/shaka-player
27
+ check_required_variable COMMENTER # like joeyparrish
28
+ check_required_variable PR_NUMBER # like 1234
29
+ check_required_variable COMMENT_BODY # like "@shaka-bot howdy"
30
+
31
+ if [[ "$COMMENTER" == "shaka-bot" ]]; then
32
+ # Exclude comments by shaka-bot, who will sometimes use its own name.
33
+ exit 0
34
+ fi
35
+
36
+ # Parse the command. Outputs to globals SHAKA_BOT_COMMAND and
37
+ # SHAKA_BOT_ARGUMENTS (array).
38
+ parse_command
39
+
40
+ if [[ "$SHAKA_BOT_COMMAND" == "" ]]; then
41
+ # No command found.
42
+ exit 0
43
+ fi
44
+
45
+ echo "PR $PR_NUMBER, detected command $SHAKA_BOT_COMMAND"
46
+
47
+ case "$SHAKA_BOT_COMMAND" in
48
+ help) . command-help.sh ;;
49
+ test) . command-test.sh ;;
50
+ *) echo "Unknown command!" ;;
51
+ esac
@@ -0,0 +1,29 @@
1
+ name: Talk to Shaka Bot (PRs)
2
+
3
+ # Runs when comments are created or edited. Jobs below will be filtered to
4
+ # only run on PRs, not regular issues.
5
+ on:
6
+ issue_comment:
7
+ types: [created, edited]
8
+
9
+ jobs:
10
+ handle_command:
11
+ # Only runs on PRs that contain '@shaka-bot' comments, but not comments
12
+ # made by shaka-bot itself, who will sometimes use its own name.
13
+ # Note that contains() is not case sensitive.
14
+ if: github.event.issue.pull_request && contains(github.event.comment.body, '@shaka-bot') && github.event.comment.user.login != 'shaka-bot'
15
+ runs-on: [ubuntu-latest]
16
+ env:
17
+ # This token must have "repo" scope, "org:read" scope, and write access.
18
+ GH_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN }}
19
+ THIS_REPO: ${{ github.repository }}
20
+ COMMENTER: ${{ github.event.comment.user.login }}
21
+ PR_NUMBER: ${{ github.event.issue.number }}
22
+ COMMENT_BODY: ${{ github.event.comment.body }}
23
+ steps:
24
+ - name: Checkout code
25
+ uses: actions/checkout@v3
26
+
27
+ - name: Handle command
28
+ shell: bash
29
+ run: .github/workflows/shaka-bot-commands/main.sh
@@ -23,7 +23,8 @@ jobs:
23
23
 
24
24
  - name: Update Issues
25
25
  env:
26
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26
+ # Use SHAKA_BOT_TOKEN if found, otherwise the default GITHUB_TOKEN.
27
+ GITHUB_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
27
28
  run: |
28
29
  cd update-issues
29
30
  npm ci
@@ -1,19 +1,11 @@
1
1
  name: Validate PR Title
2
2
 
3
- # We recommend that maintainers use this Chrome/Firefox extension so that
4
- # squashed PRs will have the merged commit message default to the PR title and
5
- # description: https://github.com/zachwhaley/squashed-merge-message
6
- #
7
- # This avoids the need to amend commits after the fact to match the desired PR
8
- # syntax. As long as the PR itself is properly-formatted, this extension will
9
- # help you commit the right format to the repo, too. This, in turn, feeds the
10
- # changelog and release workflows.
11
-
12
3
  on:
13
4
  # NOTE: The automated PRs from release-please-action do not seem to trigger
14
5
  # any of the default PR triggers (opened, synchronize, reopened). So we need
15
6
  # additional types. This is a good set that makes it easy to trigger the
16
- # workflow manually if needed.
7
+ # workflow manually if needed. This is not neccessary if your release-please
8
+ # workflow uses a personal access token (PAT) from Shaka Bot.
17
9
  pull_request_target:
18
10
  types:
19
11
  - opened
@@ -30,6 +22,6 @@ jobs:
30
22
  name: Validate PR Title
31
23
  runs-on: ubuntu-latest
32
24
  steps:
33
- - uses: amannn/action-semantic-pull-request@v4
25
+ - uses: amannn/action-semantic-pull-request@v5
34
26
  env:
35
27
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.4.2](https://github.com/shaka-project/shaka-player/compare/v4.4.1...v4.4.2) (2023-09-13)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * com.apple.fps should work with the default initDataTransform when using legacy Apple Media Keys ([#5603](https://github.com/shaka-project/shaka-player/issues/5603)) ([1a6fcf7](https://github.com/shaka-project/shaka-player/commit/1a6fcf71bc27b37ca44dc2dabdf5e4608a12dea4))
9
+ * Compute correctly the positionAlign in UITextDisplayer ([#5630](https://github.com/shaka-project/shaka-player/issues/5630)) ([b19c5e7](https://github.com/shaka-project/shaka-player/commit/b19c5e720882dd9211f9455f12dff0485b121175))
10
+ * **DASH:** Fix race condition error while switching audio tracks ([#5619](https://github.com/shaka-project/shaka-player/issues/5619)) ([c140ea3](https://github.com/shaka-project/shaka-player/commit/c140ea3d3e5550e1e89e7e0ad8fc50d637c0ed57))
11
+ * **Demo:** Allow com.apple.fps.1_0 in the custom DRM System field ([#5600](https://github.com/shaka-project/shaka-player/issues/5600)) ([30597ed](https://github.com/shaka-project/shaka-player/commit/30597ed5d9f64c5ea56fc70043b46a8f8fdd774d))
12
+ * Fix compiled-mode error formatting ([#5623](https://github.com/shaka-project/shaka-player/issues/5623)) ([838cb16](https://github.com/shaka-project/shaka-player/commit/838cb160653692c378afda9ec77b8fbc996cfd56))
13
+ * fix preferred track selection on Safari ([#5601](https://github.com/shaka-project/shaka-player/issues/5601)) ([0e4a021](https://github.com/shaka-project/shaka-player/commit/0e4a02154ee4588c88e7526eac841aca46902c4f))
14
+ * Fix transmuxed audio timestamps ([#5595](https://github.com/shaka-project/shaka-player/issues/5595)) ([258a91f](https://github.com/shaka-project/shaka-player/commit/258a91f2b70da7267067800e5e571a48f5c17be2))
15
+ * **HLS:** Get the correct video codec for TS segments ([#5598](https://github.com/shaka-project/shaka-player/issues/5598)) ([0020afe](https://github.com/shaka-project/shaka-player/commit/0020afe02ef961581cfdcefbc412d7ae454a8128))
16
+ * **HLS:** Show WebVTT subtitles with X-TIMESTAMP-MAP in segments mode ([#5643](https://github.com/shaka-project/shaka-player/issues/5643)) ([58298e2](https://github.com/shaka-project/shaka-player/commit/58298e24758c27a1fa409246098e3c186a0ab1e4))
17
+ * Improve TsParse to avoid parsing errors ([#5615](https://github.com/shaka-project/shaka-player/issues/5615)) ([c57bb6f](https://github.com/shaka-project/shaka-player/commit/c57bb6f89081c0492dbc75a9b7c1ae7580caf0a7))
18
+ * **TTML:** Fix wrong writing-mode in nested cues ([#5646](https://github.com/shaka-project/shaka-player/issues/5646)) ([521c239](https://github.com/shaka-project/shaka-player/commit/521c2398f2503b04be9f79ed62fb17ecb8d000d1))
19
+ * **UI:** Fix broken language names on Google TV ([#5613](https://github.com/shaka-project/shaka-player/issues/5613)) ([4a84d8e](https://github.com/shaka-project/shaka-player/commit/4a84d8e25250871c3e4cda967b13ee80fe371913))
20
+ * **WebVTT:** Fix support for line:0 vertical alignment ([#5632](https://github.com/shaka-project/shaka-player/issues/5632)) ([14cdc11](https://github.com/shaka-project/shaka-player/commit/14cdc11968e0e7782a9924a9a9be84882a031806))
21
+ * **WebVTT:** Fix wrong writing-mode in nested cues ([#5641](https://github.com/shaka-project/shaka-player/issues/5641)) ([8a7e32e](https://github.com/shaka-project/shaka-player/commit/8a7e32e111fbab76e5989a7df8ea8efc00955eb3))
22
+
23
+ ## [4.4.1](https://github.com/shaka-project/shaka-player/compare/v4.4.0...v4.4.1) (2023-09-02)
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * Fix MediaSourceEngine reset operation ([#5576](https://github.com/shaka-project/shaka-player/issues/5576)) ([8c66b7a](https://github.com/shaka-project/shaka-player/commit/8c66b7a061b044b1e1569fbcf18c094465b94466))
29
+ * Fix Mp4Generator ([#5566](https://github.com/shaka-project/shaka-player/issues/5566)) ([a20f1db](https://github.com/shaka-project/shaka-player/commit/a20f1db194539d43e6851f54f28378c33f98d1d5))
30
+ * Fix PES parsing ([#5559](https://github.com/shaka-project/shaka-player/issues/5559)) ([58e6627](https://github.com/shaka-project/shaka-player/commit/58e6627c5c56057d186823f07f364805d3c26b20))
31
+ * Fix TS transmuxer when the main content is muxed ([#5575](https://github.com/shaka-project/shaka-player/issues/5575)) ([0831b97](https://github.com/shaka-project/shaka-player/commit/0831b979f076b773f8eecb42e72c45bdabbf878b))
32
+ * **HLS:** Allow audio groups on audio-only content ([#5578](https://github.com/shaka-project/shaka-player/issues/5578)) ([17e4ef2](https://github.com/shaka-project/shaka-player/commit/17e4ef25c0f069002c6777e77569cbf90d538449))
33
+ * Prevent codecs override in the transmuxer ([#5568](https://github.com/shaka-project/shaka-player/issues/5568)) ([1286fec](https://github.com/shaka-project/shaka-player/commit/1286fec03da968d71b8f0590421c0d0a39e98d06))
34
+ * Remove debugging code on Simple Text ([#5582](https://github.com/shaka-project/shaka-player/issues/5582)) ([19be642](https://github.com/shaka-project/shaka-player/commit/19be6423ea5366b887d0cf89900d92bfbd573ce5))
35
+
3
36
  ## [4.4.0](https://github.com/shaka-project/shaka-player/compare/v4.4.0...v4.4.0) (2023-08-30)
4
37
 
5
38
 
package/CONTRIBUTORS CHANGED
@@ -80,6 +80,7 @@ Jun Hong Chong <chongjunhong@gmail.com>
80
80
  Jürgen Kartnaller <kartnaller@lovelysystems.com>
81
81
  Konstantin Grushetsky <github@grushetsky.net>
82
82
  Leandro Ribeiro Moreira <leandro.ribeiro.moreira@gmail.com>
83
+ Loïc Raux <loicraux@gmail.com>
83
84
  Lucas Gabriel Sánchez <unkiwii@gmail.com>
84
85
  Martin Stark <martin.stark@eyevinn.se>
85
86
  Matias Russitto <russitto@gmail.com>
package/demo/custom.js CHANGED
@@ -407,14 +407,14 @@ shakaDemo.Custom = class {
407
407
  const licenseServerURL = licenseServerUrlInput.value;
408
408
  const customDRMSystem = customDrmSystemInput.value;
409
409
  if (licenseServerURL) {
410
- // Make a license server entry for every common DRM plugin.
411
410
  assetInProgress.licenseServers.clear();
412
- for (const drmSystem of shakaDemo.Main.commonDrmSystems) {
413
- assetInProgress.licenseServers.set(drmSystem, licenseServerURL);
414
- }
415
411
  if (customDRMSystem) {
416
- // Make a custom entry too.
417
412
  assetInProgress.licenseServers.set(customDRMSystem, licenseServerURL);
413
+ } else {
414
+ // Make a license server entry for every common DRM plugin.
415
+ for (const drmSystem of shakaDemo.Main.commonDrmSystems) {
416
+ assetInProgress.licenseServers.set(drmSystem, licenseServerURL);
417
+ }
418
418
  }
419
419
  } else {
420
420
  assetInProgress.licenseServers.clear();
@@ -258,9 +258,9 @@ f)},q=>{n(q.value,g)});p=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.L
258
258
  const d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.HLS_FULL_MIME_TYPE);this.makeField_(c,d,(e,f)=>{a.mediaPlaylistFullMimeType&&(e.value=a.mediaPlaylistFullMimeType);f=shaka.util.PlayerConfiguration.createDefault();e.placeholder=f.manifest.hls.mediaPlaylistFullMimeType},e=>{a.setMediaPlaylistFullMimeType(e.value)});return b}makeAssetDialogContentsAds_(a,b){b=document.createElement("div");const c=new shakaDemo.InputContainer(b,null,shakaDemo.InputContainer.Style.VERTICAL,null);var d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.AD_TAG_URL);
259
259
  this.makeField_(c,d,(e,f)=>{a.adTagUri&&(e.value=a.adTagUri)},e=>{a.adTagUri=e.value});d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.IMA_CONTENT_SRC_ID);this.makeField_(c,d,(e,f)=>{a.imaContentSrcId&&(e.value=a.imaContentSrcId);this.manifestField_.required=this.checkManifestRequired_(a)},e=>{a.imaContentSrcId=e.value;this.manifestField_.required=this.checkManifestRequired_(a)});d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.IMA_VIDEO_ID);this.makeField_(c,d,(e,f)=>{a.imaVideoId&&
260
260
  (e.value=a.imaVideoId);this.manifestField_.required=this.checkManifestRequired_(a)},e=>{a.imaVideoId=e.value;this.manifestField_.required=this.checkManifestRequired_(a)});d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.IMA_ASSET_KEY);this.makeField_(c,d,(e,f)=>{a.imaAssetKey&&(e.value=a.imaAssetKey);this.manifestField_.required=this.checkManifestRequired_(a)},e=>{a.imaAssetKey=e.value;this.manifestField_.required=this.checkManifestRequired_(a)});d=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.IMA_MANIFEST_TYPE);
261
- this.makeField_(c,d,(e,f)=>{a.imaManifestType&&(e.value=a.imaManifestType);this.manifestField_.required=this.checkManifestRequired_(a)},e=>{a.imaManifestType=e.value;this.manifestField_.required=this.checkManifestRequired_(a)});return b}makeAssetDialogContentsDrm_(a,b){b=document.createElement("div");const c=new shakaDemo.InputContainer(b,null,shakaDemo.InputContainer.Style.VERTICAL,null);let d,e;const f=()=>{const h=d.value,k=e.value;if(h){a.licenseServers.clear();for(const l of shakaDemo.Main.commonDrmSystems)a.licenseServers.set(l,
262
- 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);
263
- 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",
261
+ this.makeField_(c,d,(e,f)=>{a.imaManifestType&&(e.value=a.imaManifestType);this.manifestField_.required=this.checkManifestRequired_(a)},e=>{a.imaManifestType=e.value;this.manifestField_.required=this.checkManifestRequired_(a)});return b}makeAssetDialogContentsDrm_(a,b){b=document.createElement("div");const c=new shakaDemo.InputContainer(b,null,shakaDemo.InputContainer.Style.VERTICAL,null);let d,e;const f=()=>{const h=d.value,k=e.value;if(h)if(a.licenseServers.clear(),k)a.licenseServers.set(k,h);else for(const l of shakaDemo.Main.commonDrmSystems)a.licenseServers.set(l,
262
+ 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);this.makeField_(c,
263
+ 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",
264
264
  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,
265
265
  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()});
266
266
  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);