Skip to content

Commit cd7e0f0

Browse files
committed
Merge branch 'release/v4.3.0' into stable
2 parents 419d66a + 8f1e7f7 commit cd7e0f0

File tree

356 files changed

+12841
-5665
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

356 files changed

+12841
-5665
lines changed

.eslintignore

Lines changed: 0 additions & 15 deletions
This file was deleted.

.eslintrc.js

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,18 @@ module.exports = {
7171
message:
7272
"Avoid relying on `SourceBufferList` directly unless it is API-facing. Prefer our more restricted `ISourceBufferList` type",
7373
},
74+
MediaKeySystemAccess: {
75+
message:
76+
"Avoid relying on `MediaKeySystemAccess` directly unless it is API-facing. Prefer our more restricted `IMediaKeySystemAccess` type",
77+
},
78+
MediaKeys: {
79+
message:
80+
"Avoid relying on `MediaKeys` directly unless it is API-facing. Prefer our more restricted `IMediaKeys` type",
81+
},
82+
MediaKeySession: {
83+
message:
84+
"Avoid relying on `MediaKeySession` directly unless it is API-facing. Prefer our more restricted `IMediaKeySession` type",
85+
},
7486
},
7587
},
7688
],
@@ -191,7 +203,20 @@ module.exports = {
191203
],
192204
"@typescript-eslint/no-shadow": ["error"],
193205
"@typescript-eslint/restrict-plus-operands": "error",
194-
"@typescript-eslint/strict-boolean-expressions": "error",
206+
"@typescript-eslint/strict-boolean-expressions": [
207+
"error",
208+
{
209+
allowAny: false,
210+
allowNullableBoolean: false,
211+
allowNullableEnum: false,
212+
allowNullableNumber: false,
213+
allowNullableObject: false,
214+
allowNullableString: false,
215+
allowNumber: false,
216+
allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing: false,
217+
allowString: false,
218+
},
219+
],
195220
"@typescript-eslint/triple-slash-reference": [
196221
"error",
197222
{

.github/workflows/checks.yml

Lines changed: 58 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
node-version: [20.x]
15+
node-version: [22.x]
1616
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020
- name: Use Node.js ${{ matrix.node-version }}
21-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ matrix.node-version }}
2424
cache: "npm"
@@ -36,13 +36,13 @@ jobs:
3636

3737
strategy:
3838
matrix:
39-
node-version: [20.x]
39+
node-version: [22.x]
4040
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
4141

4242
steps:
43-
- uses: actions/checkout@v2
43+
- uses: actions/checkout@v4
4444
- name: Use Node.js ${{ matrix.node-version }}
45-
uses: actions/setup-node@v2
45+
uses: actions/setup-node@v4
4646
with:
4747
node-version: ${{ matrix.node-version }}
4848
cache: "npm"
@@ -54,13 +54,13 @@ jobs:
5454

5555
strategy:
5656
matrix:
57-
node-version: [20.x]
57+
node-version: [22.x]
5858
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
5959

6060
steps:
61-
- uses: actions/checkout@v2
61+
- uses: actions/checkout@v4
6262
- name: Use Node.js ${{ matrix.node-version }}
63-
uses: actions/setup-node@v2
63+
uses: actions/setup-node@v4
6464
with:
6565
node-version: ${{ matrix.node-version }}
6666
cache: "npm"
@@ -72,13 +72,13 @@ jobs:
7272

7373
strategy:
7474
matrix:
75-
node-version: [20.x]
75+
node-version: [22.x]
7676
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
7777

7878
steps:
79-
- uses: actions/checkout@v2
79+
- uses: actions/checkout@v4
8080
- name: Use Node.js ${{ matrix.node-version }}
81-
uses: actions/setup-node@v2
81+
uses: actions/setup-node@v4
8282
with:
8383
node-version: ${{ matrix.node-version }}
8484
cache: "npm"
@@ -88,20 +88,62 @@ jobs:
8888
ubuntu-restricted-extras
8989
- run: npm ci
9090
- run: npm run build
91-
- run: npm run test:integration
91+
- run: |
92+
npm run test:integration:chrome && npm run test:integration:firefox && npm run test:integration:edge ||
93+
# retry on failure
94+
if [ $? -ne 0 ]; then
95+
echo "First tests attempt failed. Retrying after 20 seconds..."
96+
sleep 20
97+
npm run test:integration:chrome && npm run test:integration:firefox && npm run test:integration:edge
98+
fi
99+
100+
integration_windows:
101+
runs-on: windows-latest
102+
103+
strategy:
104+
matrix:
105+
node-version: [22.x]
106+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
107+
108+
steps:
109+
- name: Use Node.js ${{ matrix.node-version }}
110+
uses: actions/checkout@v4
111+
with:
112+
node-version: ${{ matrix.node-version }}
113+
cache: "npm"
114+
115+
- shell: bash
116+
run: npm ci
117+
- shell: bash
118+
run: npm run build
119+
- shell: bash
120+
run: |
121+
npm run test:integration:chrome && npm run test:integration:firefox && npm run test:integration:edge ||
122+
# retry on failure
123+
if [ $? -ne 0 ]; then
124+
echo "First tests attempt failed. Retrying after 20 seconds..."
125+
sleep 20
126+
npm run test:integration:chrome && npm run test:integration:firefox && npm run test:integration:edge ||
127+
# Other OSes than linux are particularly bad on github actions, run it three times
128+
if [ $? -ne 0 ]; then
129+
echo "Second tests attempt failed. Retrying after 60 seconds..."
130+
sleep 60
131+
npm run test:integration:chrome && npm run test:integration:firefox && npm run test:integration:edge
132+
fi
133+
fi
92134
93135
memory_linux:
94136
runs-on: ubuntu-latest
95137

96138
strategy:
97139
matrix:
98-
node-version: [20.x]
140+
node-version: [22.x]
99141
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
100142

101143
steps:
102-
- uses: actions/checkout@v2
144+
- uses: actions/checkout@v4
103145
- name: Use Node.js ${{ matrix.node-version }}
104-
uses: actions/setup-node@v2
146+
uses: actions/setup-node@v4
105147
with:
106148
node-version: ${{ matrix.node-version }}
107149
cache: "npm"

.github/workflows/perfs.yml

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
name: Performance tests
2+
23
on:
34
pull_request:
4-
types: [labeled]
5+
types: [opened, synchronize, reopened]
6+
7+
# Abort if new commit since then
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
10+
cancel-in-progress: true
511

612
jobs:
713
perf-tests:
8-
if: ${{ github.event.label.name == 'Performance checks' }}
14+
if:
15+
${{ !contains(github.event.pull_request.labels.*.name, 'skip-performance-checks') }}
916
runs-on: [ubuntu-latest]
17+
permissions:
18+
pull-requests: write
1019
steps:
11-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v3
1221
- name: Use Node.js ${{ matrix.node-version }}
1322
uses: actions/setup-node@v2
1423
with:
@@ -21,4 +30,24 @@ jobs:
2130
- run: npm ci
2231
- run: export DISPLAY=:99
2332
- run: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
24-
- run: node tests/performance/run.mjs
33+
- run:
34+
node tests/performance/run.mjs --branch $GITHUB_BASE_REF --remote-git-url
35+
https://github.com/canalplus/rx-player.git --report perf-report.md
36+
- name: Post comment
37+
if: always()
38+
uses: actions/github-script@v7
39+
with:
40+
script: |
41+
const { readFileSync, existsSync } = require('fs');
42+
if (!existsSync("./perf-report.md")) {
43+
return;
44+
}
45+
const fileContent = readFileSync("./perf-report.md").toString();
46+
github.rest.issues.createComment({
47+
issue_number: context.issue.number,
48+
owner: context.repo.owner,
49+
repo: context.repo.repo,
50+
// TODO: generate comment header inside the report file instead of here for better portability?
51+
// We should already have access to the sha1 through `git` and the destination branch through the command line arguments.
52+
body: fileContent,
53+
})

.github/workflows/publish_test_package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
id: npm-pack
5959

6060
- name: Upload archive to release
61-
uses: svenstaro/upload-release-action@v2
61+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd
6262
id: upload-action
6363
with:
6464
repo_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonarcloud_analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
with:
1515
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1616
- name: SonarCloud Scan
17-
uses: SonarSource/sonarcloud-github-action@master
17+
uses: SonarSource/sonarqube-scan-action@0303d6b62e310685c0e34d0b9cde218036885c4d
1818
env:
1919
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
2020
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
/demo/worker.js
88

99
/tests/performance/node_modules
10-
/tests/performance/bundle1.js
11-
/tests/performance/bundle2.js
10+
/tests/performance/previous.js
11+
/tests/performance/current.js
1212
/tests/performance/package.json
1313
/tests/performance/package-lock.json
1414

CHANGELOG.md

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,64 @@
11
# Changelog
22

3+
## v4.3.0
4+
5+
### Features
6+
7+
- Add the possibility to rely on `ManagedMediaSource` on iOS devices [#1562]
8+
- DASH: Implement DASH Thumbnail tracks by adding `renderThumbnail` and
9+
`getAvailableThumbnailTracks` API [#1496]
10+
- DRM: Add `keySystems[].wantedSessionTypes` `loadVideo` option to also initialize a DRM
11+
config for future contents, not just the current one [#1604]
12+
- Add `experimentalOptions.enableRepresentationAvoidance` option to `loadVideo` to enable
13+
our new Representation avoidance mechanism [#1523]
14+
15+
### Bug fixes
16+
17+
- Tracks API do not return unplayable representations by default [#1599]
18+
- MULTI_THREAD: Fix `onmessageerror` being undefined on older devices [#1585]
19+
- MULTI_THREAD: Do not attempt to play audio and/or video media data in a Worker whose
20+
codec is not supported specifically in a Worker context (previous behavior led to some
21+
fatal errors on Edge with HEVC support) [#1664]
22+
- Compat: On "FREEZING" try to un-freeze regardless of if the wanted position was reached
23+
to fix a remaining Tizen (Samsung) infinite rebuffering issue [#1586]
24+
- MULTI_THREAD: Fix error not being thrown on manifest update [#1653]
25+
- DRM: check that ec-3 codec is supported when encrypted [#1657]
26+
- DRM: fix typo which prevented `MediaKeys` reusage on some devices including desktop
27+
browsers [#1615]
28+
- DRM: Only ask for `"persistent-license"` `MediaKeySession` (and not also for
29+
`"temporary"` license) when only a `keySystems[].persistentLicenseConfig` is
30+
communicated [#1604]
31+
- DRM: Fix reusage of some `keySystems[]` option changing when reusing a
32+
`MediaKeySystemAccess` with a different `keySystems[]` configuration [#1616]
33+
- DRM: Fix `KEY_UPDATE_ERROR` which was mistakenly inheriting the code `KEY_LOAD_ERROR`
34+
[#1670]
35+
- Fix minor memory leak when switching RepresentationStream through ABR [#1665]
36+
- On Tizen, fix infinite loading that may occur in some condition if both the audio and
37+
video segments have a gap at the expected initial position [#1637]
38+
- fix rare infinite rebuffering issues that may happen when updating tracks in a
39+
`newAvailablePeriods` event [#1643]
40+
- MULTI_THREAD: Fix potential leak when cleaning now inexistant Period [#1644]
41+
42+
### Other improvements
43+
44+
- Compat: Limit long "FREEZING" issues on Tizen (samsung) by awaiting for browser action
45+
before seeking ourselves over a discontinuity [#1587]
46+
- DRM: Only reuse cached `MediaKeySystemAccess` if none is more wanted for the current
47+
content [#1591]
48+
- MULTI_THREAD: Some `LOADING` and `RELOADING` attempts may have taken more time than
49+
necessary due to a wrong "initial Period prediction", this is fixed [#1628]
50+
- Improve `FREEZING` work-arounds by reloading if our initial strategies do not give a
51+
result [#1523]
52+
- DRM: Reuse cache even if key system type given in API is not the same [#1611]
53+
- DEBUG_ELEMENT: Add buffer size estimate to debug buffer content graph [#1558]
54+
- DEBUG_ELEMENT: Add `hdr` information to video Representation [#1583]
55+
- Set LogFormat to `full` on RxPlayer's debug mode [#1625]
56+
- Avoid error log when stopping a stream with a pending `BufferGarbageCollector` buffer
57+
removal [#1684]
58+
- tests: Our performance-regression tests now run on all RxPlayer updates to better
59+
protect against performance regressions [#1630]
60+
- CI/tests: CI integration tests on Edge and windows [#1621]
61+
362
## v4.2.0 (2024-10-17)
463

564
### Features
@@ -26,7 +85,8 @@
2685
- Fix rare cases where the active Period would not be advertised by the RxPlayer [#1502]
2786
- Actually trigger a `BUFFER_FULL_ERROR` when `QuotaExceededError` mitigations after
2887
`appendBuffer` MSE calls don't work #1546
29-
- Fix issues when handling a `QuotaExceededError` after an `appendBuffer` MSE call [#1546, #1559]
88+
- Fix issues when handling a `QuotaExceededError` after an `appendBuffer` MSE call [#1546,
89+
#1559]
3090
- Directfile/Compat: Fix `startAt.fromLastPosition` handling on Safari when playing
3191
directfile contents [#1548]
3292
- DRM/Compat: Re-create MediaKeys for each content on Philips' NETTV, and `KSTB40XX`
@@ -72,7 +132,8 @@
72132

73133
### Bug fixes
74134

75-
- DASH: support absolute path in URL resolution with RFC 3986 implementation [#1443, #1440]
135+
- DASH: support absolute path in URL resolution with RFC 3986 implementation [#1443,
136+
#1440]
76137
- DASH: fix cases of blinking subtitles [#1416, #1424]
77138
- Fix precision issues of the `maxVideoBufferSize` API [#1421]
78139
- DASH: Prevent multiple loading of the same segment for some DASH low-latency contents
@@ -86,7 +147,8 @@
86147
- MULTI_THREAD: Perform several actions so that our `MULTI_THREAD` experimental feature
87148
now works on older browser and on the Playstation 4 [#1401, #1402]
88149
- Directfile/Compat: On safari on iOS no longer stay stuck in buffering when `autoPlay` is
89-
set to `false` or not set and the video element has the attribute "playsinline" [#1408, #1390]
150+
set to `false` or not set and the video element has the attribute "playsinline" [#1408,
151+
#1390]
90152
- Directfile/compat: On safari mobile in directfile mode, do not stay in an infinite
91153
`LOADING` state if the `duration` is set to `NaN` (rare issue in a normally-unsupported
92154
multiple RxPlayer-per-media-element scenario) [#1393]
@@ -725,7 +787,8 @@
725787
- TypeScript: Add IBitrateEstimate, IPositionUpdate and IPlayerState types to the exported
726788
types [#1084]
727789
- Remove dependency on pinkie's promise ponyfill [#1058, #1090]
728-
- tests: add performance tests, to better catch and avoid performance regressions [#1053, #1062]
790+
- tests: add performance tests, to better catch and avoid performance regressions [#1053,
791+
#1062]
729792
- DRM: Refactor DRM logic for better maintainability. DRM-linked logs are now prefixed by
730793
`DRM:` instead of `EME:` like previously [#1042]
731794

@@ -869,15 +932,17 @@
869932
- Update used RxJS version to 7.0.0, which might bring with it a smaller size and better
870933
performances [#954]
871934
- demo: remove Chart.js dependency (we found that its new API documentation and errors
872-
were too impenetrable) and replace the "Buffer Size" chart by a homemade one. [#955, #957]
935+
were too impenetrable) and replace the "Buffer Size" chart by a homemade one. [#955,
936+
#957]
873937

874938
## v3.24.0 (2021-04-01)
875939

876940
### Features
877941

878942
- Add `inbandEvent` event for when an event is encountered in a media segment [#892]
879943
- DRM: Add `singleLicensePer` `keySystems` option to be able to signal in advance that the
880-
current content has a single license, even if it has multiple encryption keys [#863, #904]
944+
current content has a single license, even if it has multiple encryption keys [#863,
945+
#904]
881946
- DRM: Add `keySystems[].licenseStorage.disableRetroCompatibility` boolean to unlock
882947
optimizations when compatibility with EME sessions persisted in older RxPlayer versions
883948
is not important [#919]

0 commit comments

Comments
 (0)