Skip to content

Commit

Permalink
Merge pull request #1308 from canalplus/feat/reload-keySystems
Browse files Browse the repository at this point in the history
Add the possibility to set a new `keySystems` option on the `reload` API
  • Loading branch information
peaBerberian committed Dec 3, 2023
2 parents d1fde0d + d1d77c5 commit 5b920ed
Show file tree
Hide file tree
Showing 494 changed files with 17,009 additions and 78,831 deletions.
11 changes: 10 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module.exports = {
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "tsconfig.json",
"project": "tsconfig.eslint.json",
"sourceType": "module"
},
"plugins": [
Expand Down Expand Up @@ -328,6 +328,15 @@ module.exports = {
"prefer-template": "off",
"no-restricted-properties": [
"error",
{
"object": "performance",
"property": "now",
"message": "Avoid using `performance.now` directly as timestamps may be different in the worker and the main thread. Please use the `getMonotonicTimeStamp` util instead.",
},
{
"object": "window",
"message": "`window` doesn't work in Node.JS and only works when JavaScript is running in the main thread. Please import `globalScope` instead.",
},
{
"object": "Object",
"property": "assign",
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- run: npm install
# Firefox seems to have issue with integration tests on GitHub actions only
# TODO to check
- run: node tests/integration/run.js --bchromehl
- run: node tests/integration/run.mjs --bchromehl
- run: npm run test:memory

# Windows seems to be a lot less stable for some reason.
Expand All @@ -75,7 +75,7 @@ jobs:
# - run: npm install
# # Firefox seems to have issue with integration tests on GitHub actions only
# # TODO to check
# - run: node tests/integration/run.js --bchromehl
# - run: node tests/integration/run.mjs --bchromehl
# - run: npm run test:memory

# MacOS seems to be a lot less stable for some reason.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/perfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
- 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.js
- run: node tests/performance/run.mjs
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@
/tests/performance/package.json
/tests/performance/package-lock.json

/dist/_esm5.processed
/dist/_esm5.raw
/dist/

/doc/generated

Expand Down
225 changes: 225 additions & 0 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions FILES.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ At the time of writing, there are two distinct demos:

The `demo/` directory stores the player builds of the last version released.

Contains the minified (``rx-player.min.js``) and the non-minified files
(``rx-player.js``). Both are automatically generated with scripts at every new
release.

Two directories, namely ``_esm5.raw`` and ``_esm5.processed`` can also be
generated in here if the right scripts are called.
Directories can also be generated in here if the right scripts are called.
These allow to publish more modular codebases to npm.


Expand Down Expand Up @@ -128,7 +123,6 @@ What is exported there are functions to load:
- Manifests/MPDs
- video/audio segments
- subtitles tracks
- image tracks

For different streaming technologies.

Expand Down
25 changes: 0 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,31 +205,6 @@ npm install
```


### Build ######################################################################

We use npm scripts to bundle, lint and test the player. Here are some examples:
```sh
# build the player in dist/rx-player.js
npm run build

# lint the code in src/ with eslint
npm run lint

# launch the demo on a local server (http://127.0.0.1:8000)
npm run start

# launch our test suite on various browsers
npm run test

# list all available npm scripts
npm run list
```

Builds are included in the ``dist/`` directory (builds based on the last version
are already included there).



## Why a new player? ###########################################################

### A need for an advanced media player ########################################
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.32.1
4.0.0-beta.3
15 changes: 11 additions & 4 deletions demo/full/scripts/components/BufferContentGraph.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import * as React from "react";
import type { IRepresentation } from "../../../../src/public_types";
import type {
IAudioRepresentation,
IVideoRepresentation,
} from "../../../../src/public_types";
import capitalizeFirstLetter from "../lib/capitalizeFirstLetter";
import shuffleArray from "../lib/shuffleArray";
import type { IBufferedData } from "../modules/player/index";
import ToolTip from "./ToolTip";

type IRepresentation = IAudioRepresentation | IVideoRepresentation;

const {
useEffect,
useMemo,
Expand Down Expand Up @@ -258,12 +263,14 @@ export default function BufferContentGraph({

let newTipText = "";
switch (adaptation.type) {
case "video":
newTipText += `width: ${representation.width ?? "?"}` + "\n" +
`height: ${representation.height ?? "?"}` + "\n" +
case "video": {
const rep = representation as IVideoRepresentation;
newTipText += `width: ${rep.width ?? "?"}` + "\n" +
`height: ${rep.height ?? "?"}` + "\n" +
`codec: ${representation.codec ?? "?"}` + "\n" +
`bitrate: ${representation.bitrate ?? "?"}` + "\n";
break;
}
case "audio":
newTipText += `language: ${adaptation.language ?? "?"}` + "\n" +
`audioDescription: ${
Expand Down
58 changes: 0 additions & 58 deletions demo/full/scripts/components/ImageThumbnail.tsx

This file was deleted.

Loading

0 comments on commit 5b920ed

Please sign in to comment.