shaka-player 4.3.10 → 4.3.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.
- package/.github/workflows/deflake.yaml +8 -5
- package/.github/workflows/release-please.yaml +64 -9
- package/.github/workflows/report-incremental-coverage.yaml +2 -2
- package/.github/workflows/shaka-bot-commands/command-help.sh +27 -0
- package/.github/workflows/shaka-bot-commands/command-test.sh +56 -0
- package/.github/workflows/shaka-bot-commands/lib.sh +83 -0
- package/.github/workflows/shaka-bot-commands/main.sh +51 -0
- package/.github/workflows/talk-to-shaka-bot.yaml +29 -0
- package/.github/workflows/update-issues.yaml +2 -1
- package/.github/workflows/validate-pr-title.yaml +3 -11
- package/CHANGELOG.md +20 -0
- package/CONTRIBUTORS +1 -0
- package/demo/custom.js +5 -5
- package/dist/demo.compiled.debug.js +3 -3
- package/dist/demo.compiled.debug.map +1 -1
- package/dist/demo.compiled.js +3 -3
- package/dist/demo.compiled.map +1 -1
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.debug.js +75 -74
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.js +554 -555
- package/dist/shaka-player.compiled.map +3 -3
- package/dist/shaka-player.ui.debug.js +87 -87
- package/dist/shaka-player.ui.debug.map +2 -2
- package/dist/shaka-player.ui.js +688 -689
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/faq.md +1 -1
- package/externs/shaka/namespace.js +2 -2
- package/lib/hls/hls_parser.js +1 -0
- package/lib/player.js +8 -57
- package/lib/text/ttml_text_parser.js +2 -1
- package/lib/text/ui_text_displayer.js +49 -3
- package/lib/text/vtt_text_parser.js +2 -2
- package/lib/util/player_configuration.js +2 -2
- package/lib/util/stream_utils.js +13 -11
- package/package.json +2 -2
- package/test/hls/hls_parser_unit.js +12 -13
- package/test/text/ttml_text_parser_unit.js +3 -4
- package/test/text/vtt_text_parser_unit.js +17 -2
- package/test/text/web_vtt_layout_integration.js +0 -1
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
name: Deflake Tests
|
|
2
2
|
|
|
3
|
-
# Runs when the Selenum
|
|
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:
|
|
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.
|
|
16
|
+
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
|
14
17
|
runs-on: ubuntu-latest
|
|
15
18
|
|
|
16
19
|
steps:
|
|
@@ -21,10 +21,16 @@ jobs:
|
|
|
21
21
|
release-type: node
|
|
22
22
|
# Make sure we create the PR against the correct branch.
|
|
23
23
|
default-branch: ${{ github.ref_name }}
|
|
24
|
+
# Use a special shaka-bot access token for releases.
|
|
25
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
24
26
|
|
|
25
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.
|
|
26
29
|
- uses: actions/checkout@v3
|
|
27
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 }}
|
|
28
34
|
- name: Custom update Player version
|
|
29
35
|
if: steps.release.outputs.release_created == false
|
|
30
36
|
run: |
|
|
@@ -38,9 +44,9 @@ jobs:
|
|
|
38
44
|
sed -e "s/^\\(shaka.Player.version =\\).*/\\1 '$VERSION';/" \
|
|
39
45
|
-i lib/player.js
|
|
40
46
|
git add lib/player.js
|
|
41
|
-
#
|
|
42
|
-
git config user.name "
|
|
43
|
-
git config user.email "
|
|
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"
|
|
44
50
|
# Update the PR.
|
|
45
51
|
git commit --amend --no-edit
|
|
46
52
|
git push -f
|
|
@@ -55,12 +61,16 @@ jobs:
|
|
|
55
61
|
steps:
|
|
56
62
|
- uses: actions/checkout@v3
|
|
57
63
|
with:
|
|
64
|
+
# Check out the origin repo, and do it at main, not the PR branch.
|
|
58
65
|
ref: main
|
|
66
|
+
# Use a special shaka-bot access token for releases.
|
|
67
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
59
68
|
- name: Tag the main branch
|
|
60
69
|
run: |
|
|
61
|
-
#
|
|
62
|
-
git config user.name "
|
|
63
|
-
git config user.email "
|
|
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.
|
|
64
74
|
VERSION=${{ needs.release.outputs.tag_name }}
|
|
65
75
|
git tag -m "$VERSION-main" "$VERSION-main"
|
|
66
76
|
git push origin "$VERSION-main"
|
|
@@ -80,10 +90,52 @@ jobs:
|
|
|
80
90
|
node-version: 16
|
|
81
91
|
registry-url: 'https://registry.npmjs.org'
|
|
82
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
|
+
|
|
83
126
|
- run: npm ci
|
|
84
|
-
-
|
|
127
|
+
- name: Publish
|
|
85
128
|
env:
|
|
86
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
|
|
87
139
|
|
|
88
140
|
- run: npm pack
|
|
89
141
|
- uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2
|
|
@@ -124,10 +176,11 @@ jobs:
|
|
|
124
176
|
TAG_NAME=${{ needs.release.outputs.tag_name }}
|
|
125
177
|
|
|
126
178
|
if [[ "$TAG_NAME" == "$LATEST_RELEASE" ]]; then
|
|
127
|
-
|
|
179
|
+
APPSPOT_PROMOTE=true
|
|
128
180
|
else
|
|
129
|
-
|
|
181
|
+
APPSPOT_PROMOTE=false
|
|
130
182
|
fi
|
|
183
|
+
APPSPOT_PROMOTE=$APPSPOT_PROMOTE >> $GITHUB_ENV
|
|
131
184
|
|
|
132
185
|
# Debug the decisions made here.
|
|
133
186
|
echo "Subdomain: $APPSPOT_SUBDOMAIN"
|
|
@@ -155,6 +208,8 @@ jobs:
|
|
|
155
208
|
- uses: actions/checkout@v3
|
|
156
209
|
with:
|
|
157
210
|
fetch-depth: 0
|
|
211
|
+
# Use a special shaka-bot access token for releases.
|
|
212
|
+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
158
213
|
|
|
159
214
|
- name: Create release branch
|
|
160
215
|
run: |
|
|
@@ -21,7 +21,7 @@ jobs:
|
|
|
21
21
|
id: compute
|
|
22
22
|
shell: bash
|
|
23
23
|
env:
|
|
24
|
-
GITHUB_TOKEN: ${{ secrets.
|
|
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.
|
|
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
|
-
|
|
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@
|
|
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,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [4.3.12](https://github.com/shaka-project/shaka-player/compare/v4.3.11...v4.3.12) (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)) ([8017636](https://github.com/shaka-project/shaka-player/commit/8017636821c030822cf426bb8d494246c372cb93))
|
|
9
|
+
* Compute correctly the positionAlign in UITextDisplayer ([#5630](https://github.com/shaka-project/shaka-player/issues/5630)) ([154131a](https://github.com/shaka-project/shaka-player/commit/154131a81c57d8866499676c7c68683f807dfac5))
|
|
10
|
+
* **Demo:** Allow com.apple.fps.1_0 in the custom DRM System field ([#5600](https://github.com/shaka-project/shaka-player/issues/5600)) ([4853af8](https://github.com/shaka-project/shaka-player/commit/4853af8f39a92a57c3e2f5f899a01e76e130c4df))
|
|
11
|
+
* fix preferred track selection on Safari ([#5601](https://github.com/shaka-project/shaka-player/issues/5601)) ([a85174a](https://github.com/shaka-project/shaka-player/commit/a85174a667ee20451742e1acd8d9e89262a4c51e))
|
|
12
|
+
* **TTML:** Fix wrong writing-mode in nested cues ([#5646](https://github.com/shaka-project/shaka-player/issues/5646)) ([e125e53](https://github.com/shaka-project/shaka-player/commit/e125e539cda726cd9c2674211246673008d3fda0))
|
|
13
|
+
* **WebVTT:** Fix support for line:0 vertical alignment ([#5632](https://github.com/shaka-project/shaka-player/issues/5632)) ([5074de7](https://github.com/shaka-project/shaka-player/commit/5074de721f2669c70054a970526cffea295567c5))
|
|
14
|
+
* **WebVTT:** Fix wrong writing-mode in nested cues ([#5641](https://github.com/shaka-project/shaka-player/issues/5641)) ([ba9a852](https://github.com/shaka-project/shaka-player/commit/ba9a852fc68adf0081e5c9d921bd374404113e34))
|
|
15
|
+
|
|
16
|
+
## [4.3.11](https://github.com/shaka-project/shaka-player/compare/v4.3.10...v4.3.11) (2023-09-02)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **HLS:** Allow audio groups on audio-only content ([#5578](https://github.com/shaka-project/shaka-player/issues/5578)) ([9028495](https://github.com/shaka-project/shaka-player/commit/90284959bda3c0cadcacbd7acbe0425d3028d9d5))
|
|
22
|
+
|
|
3
23
|
## [4.3.10](https://github.com/shaka-project/shaka-player/compare/v4.3.9...v4.3.10) (2023-08-30)
|
|
4
24
|
|
|
5
25
|
|
package/CONTRIBUTORS
CHANGED
|
@@ -74,6 +74,7 @@ Julian Domingo <juliandomingo@google.com>
|
|
|
74
74
|
Jun Hong Chong <chongjunhong@gmail.com>
|
|
75
75
|
Jürgen Kartnaller <kartnaller@lovelysystems.com>
|
|
76
76
|
Leandro Ribeiro Moreira <leandro.ribeiro.moreira@gmail.com>
|
|
77
|
+
Loïc Raux <loicraux@gmail.com>
|
|
77
78
|
Lucas Gabriel Sánchez <unkiwii@gmail.com>
|
|
78
79
|
Martin Stark <martin.stark@eyevinn.se>
|
|
79
80
|
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();
|
|
@@ -248,9 +248,9 @@ f)},q=>{n(q.value,g)});p=shakaDemoMain.getLocalizedString(shakaDemo.MessageIds.L
|
|
|
248
248
|
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);
|
|
249
249
|
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&&
|
|
250
250
|
(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);
|
|
251
|
-
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)
|
|
252
|
-
h);
|
|
253
|
-
|
|
251
|
+
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,
|
|
252
|
+
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,
|
|
253
|
+
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",
|
|
254
254
|
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,
|
|
255
255
|
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()});
|
|
256
256
|
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);
|