From 9ed6e256d25dd7c751aba8ad679c578ed6b59052 Mon Sep 17 00:00:00 2001 From: Paul Berberian Date: Thu, 27 Jun 2024 16:04:10 +0200 Subject: [PATCH] [Proposal] Remove standalone demo The RxPlayer historically proposed two demo: - The "full" demo, containing a whole application relying on the RxPlayer to load content. Which also corresponds to our advertised RxPlayer demo page on github: https://developers.canal-plus.com/rx-player/ - The "standalone" demo, which is just an HTML page containing a default RxPlayer bundle script and a video element, allowing to perform playback tests through the console. We never really relied on the standalone demo, any kind of test we perform being on any case either on the full demo, or directly linked to final applications developped internally at Canal+. Consequently to simplify the repository maintainance, I propose here to remove the standalone demo and to move the full demo from the `demo/full` directory to just `demo/`. --- .eslintignore | 4 +- .gitignore | 5 +- CONTRIBUTING.md | 43 ++---- FILES.md | 10 +- demo/{full => }/.eslintrc.js | 0 demo/README.md | 13 +- demo/{full => }/assets/canalp.svg | 0 demo/{full => }/assets/languages.ts | 0 demo/{full => }/assets/logo_white.png | Bin demo/{full => }/assets/play.svg | 0 demo/{full => }/assets/select_arrow_black.svg | 0 demo/{full => }/assets/select_arrow_white.svg | 0 demo/{full => }/assets/spinner.gif | Bin demo/{full => }/favicon.ico | Bin demo/{full => }/fonts/FontAwesome.otf | Bin demo/{full => }/index.html | 0 demo/{full => }/mpd-parser.wasm | 0 demo/{full => }/plus.ico | Bin .../scripts/components/BufferContentGraph.tsx | 2 +- demo/{full => }/scripts/components/Button.tsx | 0 .../scripts/components/CheckBox.tsx | 0 .../scripts/components/FocusedInput.tsx | 0 .../scripts/components/GenerateLinkButton.tsx | 0 .../scripts/components/GenerateLinkURL.tsx | 0 .../scripts/components/GitHubButton.tsx | 0 demo/{full => }/scripts/components/Input.tsx | 0 demo/{full => }/scripts/components/Knob.tsx | 0 .../scripts/components/LivePosition.tsx | 0 .../Options/AudioAdaptiveSettings.tsx | 2 +- .../components/Options/BufferOptions.tsx | 0 .../scripts/components/Options/Option.tsx | 0 .../scripts/components/Options/Playback.tsx | 0 .../Options/PlayerOptionNumberInput.tsx | 0 .../components/Options/RequestConfig.tsx | 0 .../components/Options/TrackSwitch.tsx | 0 .../Options/VideoAdaptiveSettings.tsx | 2 +- .../scripts/components/PositionInfos.tsx | 0 .../scripts/components/ProgressBar.tsx | 0 demo/{full => }/scripts/components/Select.tsx | 0 .../components/StickToLiveEdgeButton.tsx | 0 .../{full => }/scripts/components/ToolTip.tsx | 0 .../scripts/components/VideoThumbnail.tsx | 0 demo/{full => }/scripts/contents.ts | 0 .../scripts/controllers/ContentList.tsx | 2 +- .../scripts/controllers/ControlBar.tsx | 0 .../scripts/controllers/ErrorDisplayer.tsx | 0 .../scripts/controllers/FullScreenButton.tsx | 0 demo/{full => }/scripts/controllers/Main.tsx | 2 +- .../scripts/controllers/PlayPauseButton.tsx | 0 .../{full => }/scripts/controllers/Player.tsx | 10 +- .../controllers/PlayerKnobsSettings.tsx | 0 .../scripts/controllers/ProgressBar.tsx | 0 .../scripts/controllers/Settings.tsx | 2 +- .../scripts/controllers/VolumeBar.tsx | 0 .../scripts/controllers/VolumeButton.tsx | 0 .../controllers/charts/BufferContent.tsx | 0 .../scripts/controllers/charts/BufferSize.tsx | 0 .../scripts/controllers/charts/index.tsx | 0 .../controllers/knobs/AudioRepresentation.tsx | 2 +- .../scripts/controllers/knobs/AudioTrack.tsx | 2 +- .../scripts/controllers/knobs/SpeedKnob.tsx | 0 .../scripts/controllers/knobs/Subtitles.tsx | 2 +- .../controllers/knobs/VideoRepresentation.tsx | 2 +- .../scripts/controllers/knobs/VideoTrack.tsx | 2 +- demo/{full => }/scripts/index.tsx | 0 demo/{full => }/scripts/lib/bytes.ts | 0 .../scripts/lib/capitalizeFirstLetter.ts | 0 demo/{full => }/scripts/lib/declareModule.ts | 0 .../scripts/lib/defaultOptionsValues.ts | 2 +- demo/{full => }/scripts/lib/fullscreen.ts | 0 .../scripts/lib/getCheckboxValue.ts | 0 demo/{full => }/scripts/lib/localStorage.ts | 0 .../scripts/lib/parseDRMConfigurations.ts | 2 +- demo/{full => }/scripts/lib/shuffleArray.ts | 0 demo/{full => }/scripts/lib/time.ts | 0 .../scripts/lib/translateLanguageCode.ts | 0 demo/{full => }/scripts/lib/url_hash.ts | 0 demo/{full => }/scripts/lib/useModuleState.ts | 0 demo/{full => }/scripts/metaplaylist_url.ts | 0 demo/{full => }/scripts/modules/ChartData.ts | 0 .../scripts/modules/player/catchUp.ts | 2 +- .../scripts/modules/player/events.ts | 4 +- .../scripts/modules/player/index.ts | 10 +- demo/standalone/index.html | 18 --- demo/{full => }/styles/style.css | 0 demo/{full => }/tsconfig.json | 4 +- package.json | 18 +-- scripts/build_demo.mjs | 6 +- scripts/deploy_new_demo | 12 +- scripts/generate_standalone_demo.mjs | 138 ------------------ scripts/run_standalone_demo.mjs | 33 ----- scripts/start_demo_web_server.mjs | 8 +- scripts/update_gh-pages_demo | 18 +-- sonar-project.properties | 2 +- 94 files changed, 78 insertions(+), 306 deletions(-) rename demo/{full => }/.eslintrc.js (100%) rename demo/{full => }/assets/canalp.svg (100%) rename demo/{full => }/assets/languages.ts (100%) rename demo/{full => }/assets/logo_white.png (100%) rename demo/{full => }/assets/play.svg (100%) rename demo/{full => }/assets/select_arrow_black.svg (100%) rename demo/{full => }/assets/select_arrow_white.svg (100%) rename demo/{full => }/assets/spinner.gif (100%) rename demo/{full => }/favicon.ico (100%) rename demo/{full => }/fonts/FontAwesome.otf (100%) rename demo/{full => }/index.html (100%) rename demo/{full => }/mpd-parser.wasm (100%) rename demo/{full => }/plus.ico (100%) rename demo/{full => }/scripts/components/BufferContentGraph.tsx (99%) rename demo/{full => }/scripts/components/Button.tsx (100%) rename demo/{full => }/scripts/components/CheckBox.tsx (100%) rename demo/{full => }/scripts/components/FocusedInput.tsx (100%) rename demo/{full => }/scripts/components/GenerateLinkButton.tsx (100%) rename demo/{full => }/scripts/components/GenerateLinkURL.tsx (100%) rename demo/{full => }/scripts/components/GitHubButton.tsx (100%) rename demo/{full => }/scripts/components/Input.tsx (100%) rename demo/{full => }/scripts/components/Knob.tsx (100%) rename demo/{full => }/scripts/components/LivePosition.tsx (100%) rename demo/{full => }/scripts/components/Options/AudioAdaptiveSettings.tsx (99%) rename demo/{full => }/scripts/components/Options/BufferOptions.tsx (100%) rename demo/{full => }/scripts/components/Options/Option.tsx (100%) rename demo/{full => }/scripts/components/Options/Playback.tsx (100%) rename demo/{full => }/scripts/components/Options/PlayerOptionNumberInput.tsx (100%) rename demo/{full => }/scripts/components/Options/RequestConfig.tsx (100%) rename demo/{full => }/scripts/components/Options/TrackSwitch.tsx (100%) rename demo/{full => }/scripts/components/Options/VideoAdaptiveSettings.tsx (99%) rename demo/{full => }/scripts/components/PositionInfos.tsx (100%) rename demo/{full => }/scripts/components/ProgressBar.tsx (100%) rename demo/{full => }/scripts/components/Select.tsx (100%) rename demo/{full => }/scripts/components/StickToLiveEdgeButton.tsx (100%) rename demo/{full => }/scripts/components/ToolTip.tsx (100%) rename demo/{full => }/scripts/components/VideoThumbnail.tsx (100%) rename demo/{full => }/scripts/contents.ts (100%) rename demo/{full => }/scripts/controllers/ContentList.tsx (99%) rename demo/{full => }/scripts/controllers/ControlBar.tsx (100%) rename demo/{full => }/scripts/controllers/ErrorDisplayer.tsx (100%) rename demo/{full => }/scripts/controllers/FullScreenButton.tsx (100%) rename demo/{full => }/scripts/controllers/Main.tsx (97%) rename demo/{full => }/scripts/controllers/PlayPauseButton.tsx (100%) rename demo/{full => }/scripts/controllers/Player.tsx (99%) rename demo/{full => }/scripts/controllers/PlayerKnobsSettings.tsx (100%) rename demo/{full => }/scripts/controllers/ProgressBar.tsx (100%) rename demo/{full => }/scripts/controllers/Settings.tsx (99%) rename demo/{full => }/scripts/controllers/VolumeBar.tsx (100%) rename demo/{full => }/scripts/controllers/VolumeButton.tsx (100%) rename demo/{full => }/scripts/controllers/charts/BufferContent.tsx (100%) rename demo/{full => }/scripts/controllers/charts/BufferSize.tsx (100%) rename demo/{full => }/scripts/controllers/charts/index.tsx (100%) rename demo/{full => }/scripts/controllers/knobs/AudioRepresentation.tsx (97%) rename demo/{full => }/scripts/controllers/knobs/AudioTrack.tsx (98%) rename demo/{full => }/scripts/controllers/knobs/SpeedKnob.tsx (100%) rename demo/{full => }/scripts/controllers/knobs/Subtitles.tsx (98%) rename demo/{full => }/scripts/controllers/knobs/VideoRepresentation.tsx (97%) rename demo/{full => }/scripts/controllers/knobs/VideoTrack.tsx (98%) rename demo/{full => }/scripts/index.tsx (100%) rename demo/{full => }/scripts/lib/bytes.ts (100%) rename demo/{full => }/scripts/lib/capitalizeFirstLetter.ts (100%) rename demo/{full => }/scripts/lib/declareModule.ts (100%) rename demo/{full => }/scripts/lib/defaultOptionsValues.ts (96%) rename demo/{full => }/scripts/lib/fullscreen.ts (100%) rename demo/{full => }/scripts/lib/getCheckboxValue.ts (100%) rename demo/{full => }/scripts/lib/localStorage.ts (100%) rename demo/{full => }/scripts/lib/parseDRMConfigurations.ts (98%) rename demo/{full => }/scripts/lib/shuffleArray.ts (100%) rename demo/{full => }/scripts/lib/time.ts (100%) rename demo/{full => }/scripts/lib/translateLanguageCode.ts (100%) rename demo/{full => }/scripts/lib/url_hash.ts (100%) rename demo/{full => }/scripts/lib/useModuleState.ts (100%) rename demo/{full => }/scripts/metaplaylist_url.ts (100%) rename demo/{full => }/scripts/modules/ChartData.ts (100%) rename demo/{full => }/scripts/modules/player/catchUp.ts (99%) rename demo/{full => }/scripts/modules/player/events.ts (99%) rename demo/{full => }/scripts/modules/player/index.ts (97%) delete mode 100644 demo/standalone/index.html rename demo/{full => }/styles/style.css (100%) rename demo/{full => }/tsconfig.json (80%) delete mode 100755 scripts/generate_standalone_demo.mjs delete mode 100755 scripts/run_standalone_demo.mjs diff --git a/.eslintignore b/.eslintignore index 8188f2e07a..0ea09aa772 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,10 +2,8 @@ node_modules *.log *.keys -demo/full/bundle.js -demo/full/lib.js -demo/standalone/lib.js demo/bundle.js +demo/lib.js tools/tests/coverage/ diff --git a/.gitignore b/.gitignore index b35f798001..6472963f02 100644 --- a/.gitignore +++ b/.gitignore @@ -3,9 +3,8 @@ /localhost.key /node_modules -/demo/full/bundle.js -/demo/full/worker.js -/demo/standalone/lib.js +/demo/bundle.js +/demo/worker.js /tests/performance/node_modules /tests/performance/bundle1.js diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf16ab775c..fff1f1afb2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -141,40 +141,24 @@ And the following methods: You might want to quickly test your code modification(s) on a real use case. -For those types of need, we developped two demo pages: +For those types of need, we developped a demo page. This demo has a user-friendly +interface and allow the most frequent API interactions. -- the _full demo_ page, which is also the one used to showcase the player. +It also exposes both the RxPlayer class through `window.RxPlayer` and the rxPlayer +instance through `window.rxPlayer` - both in the global scope. You can thus open a +debugger/inspector in your favorite browser to exploit directly the player's API. - This demo has a user-friendly interface and allow the most frequent API interactions. - - It also exposes both the RxPlayer class through `window.RxPlayer` and the rxPlayer - instance through `window.rxPlayer` - both in the global scope. You can thus open a - debugger/inspector in your favorite browser to exploit directly the player's API. - -- the _standalone demo_ page, which is just a `