Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Demo: store the settings in the url hash #1349

Open
wants to merge 103 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
923fa25
Move directories around
peaBerberian Jan 25, 2024
fe5f68c
Rename "Portal" into "Main" in core
peaBerberian Jan 26, 2024
9b684af
Add linting rule for type imports
peaBerberian Jan 25, 2024
b7b26bf
Rename SegmentBuffers to SegmentSinks
peaBerberian Jan 25, 2024
ec9b355
Move MediaSourceDurationUpdater and endOfStream management to an mse/…
peaBerberian Jan 25, 2024
232a588
Enforce eqeqeq linting rule
peaBerberian Jan 26, 2024
09f1d67
Move MainThreadTextInterface to main_thread
peaBerberian Jan 26, 2024
3517d09
Move getBufferedDataPerMediaBuffer into src/core/main/utils
peaBerberian Jan 26, 2024
8d3bd64
Prefer relying on types directory
peaBerberian Jan 26, 2024
048564f
Rename src/core/main/utils to src/core/main/common
peaBerberian Jan 26, 2024
9d59746
[Proposal] Solution 1: PlaybackObserver is moved in `src`
peaBerberian Jan 26, 2024
1b11702
Update FILES.md
peaBerberian Jan 26, 2024
adfd991
Add prettier and set it up
peaBerberian Jan 26, 2024
e091b24
Add rustfmt and check to CI
peaBerberian Jan 26, 2024
0e3847f
Remove unneeded prettier rule
peaBerberian Jan 26, 2024
cce5d0d
Minor documentation update
peaBerberian Jan 29, 2024
45351b6
Allow width limit on markdown files with prettier
peaBerberian Jan 29, 2024
6a9bca9
Remove compat/index.js file
peaBerberian Jan 29, 2024
b9136fc
Update .npmignore
peaBerberian Jan 29, 2024
ca61b54
Fix JSDoc and naming in tracksstore
peaBerberian Jan 29, 2024
b6a0300
Forbid nested ternary operators through eslint
peaBerberian Jan 29, 2024
66fc6fe
Add more architecture schemas in src/readme.md
peaBerberian Feb 5, 2024
300ae2a
refactor: create a fn getRetryDelay and test it
Florent-Bouisset Feb 1, 2024
1bc73c0
Don't re-load a Manifest's optional external resource each time if in…
peaBerberian Jan 31, 2024
3707906
update .gitignore
peaBerberian Feb 5, 2024
fe60ef2
fix(test): fix flaky test by changing timeout according to the
Florent-Bouisset Feb 1, 2024
e6a2a99
Merge pull request #1370 from canalplus/fix/update-clock-offset
peaBerberian Feb 5, 2024
e729d9a
test: move test related to RetryPromiseWithBackoff in its own file
Florent-Bouisset Feb 5, 2024
441f91b
Re-run prettier on markdown files
peaBerberian Feb 5, 2024
2632ab4
fix(types): remove IIFE to correctly export Player class type
Florent-Bouisset Feb 5, 2024
8da7fb9
Merge pull request #1359 from canalplus/fix/flaky-test-get-license
peaBerberian Feb 5, 2024
c1c605c
fix(demo): text for limit video resolution update when selecting anot…
Florent-Bouisset Feb 9, 2024
b8d11c9
Merge pull request #1376 from canalplus/fix/error-ts-iife
peaBerberian Feb 5, 2024
e28caad
fix circular dependencies issues.
Florent-Bouisset Feb 13, 2024
0897199
Merge pull request #1381 from canalplus/demo/fix-limit-video-res
peaBerberian Feb 9, 2024
6e9177f
Merge pull request #1383 from canalplus/fix/circular-dependencies-reorg
peaBerberian Feb 13, 2024
c7d9175
Fix canal-release.patch post-prettier
peaBerberian Feb 20, 2024
85a9856
Fix update-version script post file reorg
peaBerberian Feb 20, 2024
552649d
Run prettier again after rebase
peaBerberian Feb 20, 2024
cc6a502
Fix update-version script as prettier broke our ugly sed trick
peaBerberian Feb 20, 2024
a40526f
Make some integration tests' timeout higher as they sometimes break i…
peaBerberian Feb 21, 2024
5a5ed8f
fix apply patch correctly for ps5
Florent-Bouisset Feb 21, 2024
8bf8876
Merge pull request #1385 from canalplus/fix/canal-ps5-close-session
peaBerberian Feb 21, 2024
71a25e3
[POC]: Experiment with "txml" parser, to get rid of the DOMParser
peaBerberian Feb 13, 2024
4579511
Parse xml entities
peaBerberian Feb 15, 2024
fe92987
DASH: Begin translating unit tests
peaBerberian Feb 15, 2024
dce924c
Move files around and fix parseFromDocument tests
peaBerberian Feb 15, 2024
69c1d83
DASH: rewrite unit tests
peaBerberian Feb 15, 2024
c849efb
Handle EventStream events
peaBerberian Feb 15, 2024
89f2e1c
Add both DOM and fastjs parser
peaBerberian Feb 16, 2024
9238d1a
Parse xml inside fast js parser
peaBerberian Feb 16, 2024
1707042
Rely on JS parser in multithread mode by default
peaBerberian Feb 16, 2024
5e07364
Fix failing integration test
peaBerberian Feb 19, 2024
66605c6
Add unit test for xml parser
peaBerberian Feb 19, 2024
4bf4fc8
Fix code style after review
peaBerberian Feb 20, 2024
f3b92a1
Remove DASH js feature from features/list for now
peaBerberian Feb 20, 2024
b6c2166
doc: update Multithreading documentation as embedded wasm isnt a requ…
peaBerberian Feb 20, 2024
fded006
Do not fallback if WebAssembly initialization fails
peaBerberian Feb 20, 2024
753400e
Merge pull request #1384 from canalplus/feat/txml
peaBerberian Feb 23, 2024
0344cef
Update nodejs version
peaBerberian Feb 23, 2024
9cfe8d6
Separate steps for memory and integration tests
peaBerberian Feb 23, 2024
60f1651
tests: perform exponential backoff in integration tests
peaBerberian Feb 22, 2024
7211b73
fix commit patch after prettier
Florent-Bouisset Feb 26, 2024
df4b05f
fix(directfile): media with autoplay:false is infinitly in loading state
Florent-Bouisset Feb 27, 2024
17c131a
Merge pull request #1393 from canalplus/fix/directfile-autoplay-infin…
peaBerberian Mar 4, 2024
4f91e78
Remove `isSafariMobile` mention from `main_thread` code.
peaBerberian Mar 4, 2024
0a54469
Fix some JSDoc about the MediaSourceInterface
peaBerberian Mar 5, 2024
e8a7671
Fix end of Arraybuffer wrongly being considered as remaining for low-…
peaBerberian Mar 7, 2024
70c50d5
Merge pull request #1395 from canalplus/misc/remove-is-safari-mobile-…
peaBerberian Mar 7, 2024
026fb05
refactor url hash generation to make it more extensible
Florent-Bouisset Jan 2, 2024
c42c4b6
refactor to use hook useMemo
Florent-Bouisset Jan 3, 2024
66e19b7
make loadVideoConfig and IConstructorOptions reactive in the url
Florent-Bouisset Jan 5, 2024
09aece7
always display link button and add the possibility to copy to clipboard
Florent-Bouisset Jan 8, 2024
f4aecea
make RxPlayer logo redirect to current page
Florent-Bouisset Jan 8, 2024
bc4f508
let enable or disable reactive url
Florent-Bouisset Jan 8, 2024
7e176de
prevent eventual race condition
Florent-Bouisset Jan 16, 2024
2e1d19e
fix prettier
Florent-Bouisset Feb 6, 2024
12636d6
add jsdoc
Florent-Bouisset Feb 6, 2024
f64b702
MR feedback
Florent-Bouisset Feb 7, 2024
c7765b6
remove the link in the page and the copy button
Florent-Bouisset Feb 7, 2024
2c8aca2
some fixes
Florent-Bouisset Feb 7, 2024
b2e92fb
simplify code
Florent-Bouisset Feb 7, 2024
bda1349
make code more resiliant
Florent-Bouisset Feb 7, 2024
1f3c3d7
ensure parsing suceed and check object shape
Florent-Bouisset Feb 7, 2024
6d176fb
add missing 3 options to the reactive URL
Florent-Bouisset Feb 9, 2024
ac519b0
encode URI to prevent wrong parsing of the json in URL
Florent-Bouisset Feb 9, 2024
e7685f2
by default make the reactive URL setting disable
Florent-Bouisset Feb 9, 2024
1a7da65
style: update text and style for reactive URL switch
Florent-Bouisset Feb 9, 2024
c02bc4b
lint
Florent-Bouisset May 31, 2024
8a6a31c
api: throw an error if an application use a video element in multiple…
Florent-Bouisset Mar 11, 2024
9bf4194
DRM: Cleaner implementation for setMediaKeys
peaBerberian Jan 15, 2024
1eeb547
Throw CREATE_MEDIA_KEYS_ERROR when MediaKeys attachment fails
peaBerberian Feb 28, 2024
2fbdfc0
Add MEDIA_KEYS_ATTACHMENT_ERROR
peaBerberian Mar 4, 2024
416a99c
Do not rely on performance.now if unavailable
peaBerberian Mar 8, 2024
fda9867
Fix Worker usage on PS4 browser
peaBerberian Mar 5, 2024
37f74b3
Update changelog
peaBerberian Mar 11, 2024
4de5ee7
On the playstation 5, reload ASAP if a key become unusable
peaBerberian Mar 8, 2024
7f59c45
Add ps5 fix to the CHANGELOG file
peaBerberian Mar 11, 2024
e07bdbc
Provide ES5 version of the worker file
peaBerberian Mar 8, 2024
7836eb6
Fix typo in changelog and run prettier on it
peaBerberian Mar 11, 2024
e2e98fc
fix(safari): autoplay was not working on Safari
Florent-Bouisset Mar 13, 2024
c1d0575
fix(safari): no longer stuck in buffering on safari iOS when video ha…
Florent-Bouisset Mar 14, 2024
f4b647f
refactor: factorize keyId comparison for blacklisting
Florent-Bouisset Mar 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
370 changes: 144 additions & 226 deletions .eslintrc.js

Large diffs are not rendered by default.

112 changes: 79 additions & 33 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,36 @@ name: RxPlayer Tests

on:
push:
branches: [ stable, dev, legacy-v3 ]
branches: [stable, dev, legacy-v3]
pull_request:
types: [opened, synchronize, reopened]

jobs:
typechecking_and_linting:
format_check:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable

- run: npm install
- run: rustup target add wasm32-unknown-unknown
- run: npm run fmt:prettier:check
- run: npm run fmt:rust:check

typechecking_and_linting:
runs-on: ubuntu-latest

strategy:
Expand All @@ -20,17 +43,16 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run check
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run check

unit_tests:

runs-on: ubuntu-latest

strategy:
Expand All @@ -39,17 +61,41 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run test:unit
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm install
- run: npm run test:unit

integration_linux:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
# needed for integration & memory tests codecs support
- run:
sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y
ubuntu-restricted-extras
- run: npm install
- run: npm run build
# Firefox seems to have issue with integration tests on GitHub actions only
# TODO to check
- run: node tests/integration/run.mjs --bchromehl

memory_linux:
runs-on: ubuntu-latest

strategy:
Expand All @@ -58,17 +104,17 @@ jobs:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# needed for integration & memory tests codecs support
- run: sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y ubuntu-restricted-extras
- run: npm install
- run: npm run build
# Firefox seems to have issue with integration tests on GitHub actions only
# TODO to check
- run: node tests/integration/run.mjs --bchromehl
- run: npm run test:memory
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
# needed for integration & memory tests codecs support
- run:
sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y
ubuntu-restricted-extras
- run: npm install
# Firefox seems to have issue with integration tests on GitHub actions only
# TODO to check
- run: npm run test:memory
36 changes: 19 additions & 17 deletions .github/workflows/perfs.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
name: Performance tests
on:
pull_request:
types: [ labeled ]
types: [labeled]

jobs:
perf-tests:
if: ${{ github.event.label.name == 'Performance checks' }}
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# needed for integration & memory tests codecs support
- run: sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y ubuntu-restricted-extras
- run: npm install
- run: export DISPLAY=:99
- run: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- run: node tests/performance/run.mjs
perf-tests:
if: ${{ github.event.label.name == 'Performance checks' }}
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
# needed for integration & memory tests codecs support
- run:
sudo add-apt-repository multiverse && sudo apt update && sudo apt install -y
ubuntu-restricted-extras
- run: npm install
- run: export DISPLAY=:99
- run: sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
- run: node tests/performance/run.mjs
4 changes: 2 additions & 2 deletions .github/workflows/sonarcloud_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
11 changes: 0 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,11 @@
/tmp
/*.keys
/*.log
/.scannerwork
/localhost.crt
/localhost.key
/node_modules
/test-output.xml

/demo/full/bundle.js
/demo/full/worker.js
/demo/full/lib.js
/demo/full/bundle.js.LICENSE.txt
/demo/full/lib.js.LICENSE.txt
/demo/standalone/lib.js
/demo/bundle.js

/tests/integration/coverage
/coverage

/tests/performance/node_modules
/tests/performance/bundle1.js
Expand Down
10 changes: 1 addition & 9 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,12 @@
/sonar-project.properties
/localhost.crt
/localhost.key
/.travis.yml
/node_modules
/test-output.xml
/tslint.json
/webpack-demo.config.js
/webpack-tests.config.js
/webpack.config.js
/webpack-demo.config.mjs

/demo

/tests
/coverage

/dist/_esm5.raw

/doc
/src
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 90,
"proseWrap": "always"
}
Loading