shaka-player 4.3.11 → 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 +47 -7
- package/.github/workflows/shaka-bot-commands/command-test.sh +1 -1
- package/CHANGELOG.md +13 -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 +32 -32
- package/dist/shaka-player.compiled.d.ts +257 -257
- package/dist/shaka-player.compiled.debug.d.ts +257 -257
- package/dist/shaka-player.compiled.debug.js +73 -72
- 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.d.ts +301 -301
- package/dist/shaka-player.ui.debug.d.ts +301 -301
- package/dist/shaka-player.ui.debug.js +85 -84
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.js +688 -689
- package/dist/shaka-player.ui.map +3 -3
- package/docs/tutorials/faq.md +1 -1
- 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/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:
|
|
@@ -29,8 +29,6 @@ jobs:
|
|
|
29
29
|
- uses: actions/checkout@v3
|
|
30
30
|
if: steps.release.outputs.release_created == false
|
|
31
31
|
with:
|
|
32
|
-
# Checkout the fork, where the PR is generated from.
|
|
33
|
-
repository: shaka-bot/${{ github.event.repository.name }}
|
|
34
32
|
# Use a special shaka-bot access token for releases.
|
|
35
33
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
36
34
|
- name: Custom update Player version
|
|
@@ -63,8 +61,7 @@ jobs:
|
|
|
63
61
|
steps:
|
|
64
62
|
- uses: actions/checkout@v3
|
|
65
63
|
with:
|
|
66
|
-
# Check out the origin repo,
|
|
67
|
-
# PR branch.
|
|
64
|
+
# Check out the origin repo, and do it at main, not the PR branch.
|
|
68
65
|
ref: main
|
|
69
66
|
# Use a special shaka-bot access token for releases.
|
|
70
67
|
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
|
|
@@ -93,10 +90,52 @@ jobs:
|
|
|
93
90
|
node-version: 16
|
|
94
91
|
registry-url: 'https://registry.npmjs.org'
|
|
95
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
|
+
|
|
96
126
|
- run: npm ci
|
|
97
|
-
-
|
|
127
|
+
- name: Publish
|
|
98
128
|
env:
|
|
99
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
|
|
100
139
|
|
|
101
140
|
- run: npm pack
|
|
102
141
|
- uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2
|
|
@@ -137,10 +176,11 @@ jobs:
|
|
|
137
176
|
TAG_NAME=${{ needs.release.outputs.tag_name }}
|
|
138
177
|
|
|
139
178
|
if [[ "$TAG_NAME" == "$LATEST_RELEASE" ]]; then
|
|
140
|
-
|
|
179
|
+
APPSPOT_PROMOTE=true
|
|
141
180
|
else
|
|
142
|
-
|
|
181
|
+
APPSPOT_PROMOTE=false
|
|
143
182
|
fi
|
|
183
|
+
APPSPOT_PROMOTE=$APPSPOT_PROMOTE >> $GITHUB_ENV
|
|
144
184
|
|
|
145
185
|
# Debug the decisions made here.
|
|
146
186
|
echo "Subdomain: $APPSPOT_SUBDOMAIN"
|
|
@@ -25,7 +25,7 @@ WORKFLOW_ARGS=( "pr=$PR_NUMBER" )
|
|
|
25
25
|
|
|
26
26
|
case "${SHAKA_BOT_ARGUMENTS[0]}" in
|
|
27
27
|
# CE devices only.
|
|
28
|
-
ce) WORKFLOW_ARGS+=( "browser_filter=Tizen
|
|
28
|
+
ce) WORKFLOW_ARGS+=( "browser_filter=Tizen ChromecastUltra ChromecastGTV ChromeAndroid" ) ;;
|
|
29
29
|
|
|
30
30
|
# No command argument, no extra workflow arguments.
|
|
31
31
|
"") ;;
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
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
|
+
|
|
3
16
|
## [4.3.11](https://github.com/shaka-project/shaka-player/compare/v4.3.10...v4.3.11) (2023-09-02)
|
|
4
17
|
|
|
5
18
|
|
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);
|