Skip to content

Commit

Permalink
Merge branch 'release/v3.33.1' into legacy-v3
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Feb 21, 2024
2 parents 1106875 + 550008d commit c999760
Show file tree
Hide file tree
Showing 18 changed files with 105 additions and 79 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## v3.33.1 (2024-02-27)

### Bug fixes

- dash: Don't unnecessarily reload external `<UTCTiming>` resources at each refresh if it failed for the first request of the Manifest [#1370]
- dash: The `DASH_WASM` feature do not rely on WebAssembly's sign-extension operators anymore as that is poorly supported on older Samsung and LG TVs [#1372]

### Other improvements

- build: automatically install Rust and WASM toolchain locally if unavailable when building the RxPlayer WebAssembly file
- doc: Update our documentation generator and fix all invalid anchors in it
- npm: prevent the publishing of unnecessary files on the npm registry [#1377, #1378]

## v3.33.0 (2024-01-24)

### Features
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.33.0
3.33.1
Binary file modified dist/mpd-parser.wasm
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/rx-player.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

import RxPlayer from "./_esm5.processed/core/api/index";
import RxPlayer from "./_esm5.processed/index";
export default RxPlayer;
33 changes: 24 additions & 9 deletions dist/rx-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -7299,7 +7299,7 @@ function retryPromiseWithBackoff(runProm, options, cancelSignal) {
}
function _iterate() {
_iterate = (0,asyncToGenerator/* default */.Z)( /*#__PURE__*/regenerator_default().mark(function _callee() {
var res, delay, fuzzedDelay, _res;
var res, delay, _res;
return regenerator_default().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
Expand Down Expand Up @@ -7333,14 +7333,13 @@ function retryPromiseWithBackoff(runProm, options, cancelSignal) {
if (typeof onRetry === "function") {
onRetry(_context.t0, retryCount);
}
delay = Math.min(baseDelay * Math.pow(2, retryCount - 1), maxDelay);
fuzzedDelay = (0,get_fuzzed_delay/* default */.Z)(delay);
_context.next = 20;
return (0,sleep/* default */.Z)(fuzzedDelay);
case 20:
delay = getRetryDelay(baseDelay, retryCount, maxDelay);
_context.next = 19;
return (0,sleep/* default */.Z)(delay);
case 19:
_res = iterate();
return _context.abrupt("return", _res);
case 22:
case 21:
case "end":
return _context.stop();
}
Expand All @@ -7349,6 +7348,21 @@ function retryPromiseWithBackoff(runProm, options, cancelSignal) {
return _iterate.apply(this, arguments);
}
}
/**
* Get the delay that should be applied to the following retry, it depends on
* the base delay and is increaser for with the retry count. The result is
* ceiled by the maxDelay.
* @param {number} baseDelay - delay after wich the first request is retried
* after a failure
* @param {numbe} retryCount - count of retries
* @param {number} maxDelay - maximum delay
* @returns {number} - the delay that should be applied to the following retry
*/
function getRetryDelay(baseDelay, retryCount, maxDelay) {
var delay = baseDelay * Math.pow(2, retryCount - 1);
var fuzzedDelay = (0,get_fuzzed_delay/* default */.Z)(delay);
return Math.min(fuzzedDelay, maxDelay);
}
;// CONCATENATED MODULE: ./src/compat/eme/get_uuid_kid_from_keystatus_kid.ts
/**
* Copyright 2015 CANAL+ Group
Expand Down Expand Up @@ -27217,6 +27231,7 @@ var Manifest = /*#__PURE__*/function (_EventEmitter) {
_this.uris = parsedManifest.uris === undefined ? [] : parsedManifest.uris;
_this.updateUrl = manifestUpdateUrl;
_this.lifetime = parsedManifest.lifetime;
_this.clockOffset = parsedManifest.clockOffset;
_this.suggestedPresentationDelay = parsedManifest.suggestedPresentationDelay;
_this.availabilityStartTime = parsedManifest.availabilityStartTime;
_this.publishTime = parsedManifest.publishTime;
Expand Down Expand Up @@ -53126,7 +53141,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
// Workaround to support Firefox autoplay on FF 42.
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
videoElement.preload = "auto";
_this.version = /* PLAYER_VERSION */"3.33.0";
_this.version = /* PLAYER_VERSION */"3.33.1";
_this.log = log/* default */.Z;
_this.state = "STOPPED";
_this.videoElement = videoElement;
Expand Down Expand Up @@ -55576,7 +55591,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
}]);
return Player;
}(event_emitter/* default */.Z);
Player.version = /* PLAYER_VERSION */"3.33.0";
Player.version = /* PLAYER_VERSION */"3.33.1";
/* harmony default export */ var public_api = (Player);
;// CONCATENATED MODULE: ./src/core/api/index.ts
/**
Expand Down
2 changes: 1 addition & 1 deletion dist/rx-player.min.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

import RxPlayer from "./_esm5.processed/core/api/index";
import RxPlayer from "./_esm5.processed/index";
export default RxPlayer;
2 changes: 1 addition & 1 deletion dist/rx-player.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions doc/.docConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"favicon": {
"srcPath": "./static/img/favicon.png"
},
"otherVersionsLink": "https://developers.canal-plus.com/rx-player/documentation_pages_by_version.html",
"linksLeft": [
{
"type": "local-doc",
Expand Down Expand Up @@ -43,7 +42,8 @@
"link": "https://github.com/canalplus/rx-player"
},
{
"type": "version"
"type": "version",
"link": "https://developers.canal-plus.com/rx-player/documentation_pages_by_version.html"
}
]
}
64 changes: 32 additions & 32 deletions doc/api/Decryption_Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -581,38 +581,7 @@ You can set the `message` property on the rejected/thrown value as a
`string`. In this case, that string will be used as the error message of
the `KEY_STATUS_CHANGE_ERROR` error (and used at its `message` property).


## Example

Example of a simple DRM configuration for widevine and playready DRMs:

```js
player.loadVideo({
url: manifestURL,
transport: "dash",
keySystems: [
{
type: "widevine",
getLicense(challenge) {
// ajaxPromise is here an AJAX implementation doing a POST request on the
// widevineLicenseServer with the challenge in its body.
return ajaxPromise(widevineLicenseServer, challenge);
},
},
{
type: "playready",
getLicense(challenge) {
// idem
// Note: you may need to format the challenge before doing the request
// depending on the server configuration.
return ajaxPromise(playreadyLicenseServer, challenge);
},
},
],
});
```

## persistentLicense
### persistentLicense

<div class="warning">
This option is deprecated, it will disappear in the next major release
Expand Down Expand Up @@ -689,3 +658,34 @@ above, you can call `JSON.stringify` on that data and retrieve it through a
`JSON.parse` call.

This is very useful for storage APIs which cannot store JavaScript objects.


## Example

Example of a simple DRM configuration for widevine and playready DRMs:

```js
player.loadVideo({
url: manifestURL,
transport: "dash",
keySystems: [
{
type: "widevine",
getLicense(challenge) {
// ajaxPromise is here an AJAX implementation doing a POST request on the
// widevineLicenseServer with the challenge in its body.
return ajaxPromise(widevineLicenseServer, challenge);
},
},
{
type: "playready",
getLicense(challenge) {
// idem
// Note: you may need to format the challenge before doing the request
// depending on the server configuration.
return ajaxPromise(playreadyLicenseServer, challenge);
},
},
],
});
```
5 changes: 3 additions & 2 deletions doc/contributing/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,8 @@ Before each official releases, a list of steps are performed by its maintainers:
as a dependency.
10. If and only if no problem was seen perform a signed merge without
fast-forward of the release branch into master (`git merge -S --no-ff release/vXX.XX.XX master`)
fast-forward of the release branch into legacy-v3
(`git merge -S --no-ff release/vXX.XX.XX legacy-v3`)
11. Launch script to update the gh-pages demo (`./scripts/update_gh-pages_demo`)
Expand All @@ -156,7 +157,7 @@ Before each official releases, a list of steps are performed by its maintainers:
14. Check that the new demo and the new doc work as expected
15. If all seems good, push to origin/master your local master branch.
15. If all seems good, push to remote `legacy-v3` your local `legacy-v3` branch.
16. run `npm publish --tag legacy-v3` to publish the new version on npm's
registry with the `legacy-v3` tag.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rx-player",
"author": "Canal+",
"version": "3.33.0",
"version": "3.33.1",
"description": "Canal+ HTML5 Video Player",
"main": "./dist/rx-player.js",
"keywords": [
Expand Down
18 changes: 9 additions & 9 deletions scripts/generate_demo_list.js → scripts/generate_demo_list.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
* all the right links.
*/

const fs = require("fs");
const path = require("path");
const { encode } = require("html-entities");
const semver = require("semver");
import { lstatSync, readdirSync, existsSync, writeFileSync } from "fs";
import { join } from "path";
import { encode } from "html-entities";
import * as semver from "semver";

const INITIAL_PATH = "./versions";

Expand All @@ -48,7 +48,7 @@ function sortVersions(versions) {
}

function isDirectory(source) {
return fs.lstatSync(source).isDirectory();
return lstatSync(source).isDirectory();
}

export function getUrlsForVersion(initialPath, version) {
Expand Down Expand Up @@ -83,12 +83,12 @@ const head = `<head>

let body = "<body>";

const files = fs.readdirSync(INITIAL_PATH);
const files = readdirSync(INITIAL_PATH);
const versions = [];
for (let i = 0; i < files.length; i++) {
const fileName = files[i];
const filePath = path.join(INITIAL_PATH, fileName);
if (isDirectory(filePath) && fs.existsSync(path.join(filePath, "demo"))) {
const filePath = join(INITIAL_PATH, fileName);
if (isDirectory(filePath) && existsSync(join(filePath, "demo"))) {
versions.push(fileName);
}
}
Expand Down Expand Up @@ -127,4 +127,4 @@ const html = "<html>" +
body +
"<html>";

fs.writeFileSync("./demo_page_by_version.html", html);
writeFileSync("./demo_page_by_version.html", html);
File renamed without changes.
14 changes: 4 additions & 10 deletions scripts/update_gh-pages_demo
Original file line number Diff line number Diff line change
Expand Up @@ -51,30 +51,24 @@ cp -r demo/full/styles $tmpStylesDir -v
cp demo/full/bundle.js $tmpDemoFile -v
cp demo/full/index.html $tmpIndexFile -v
cp demo/full/plus.ico $tmpFaviconFile -v
cp scripts/generate_demo_list.js $tmpDemoList -v
cp scripts/generate_demo_list.mjs $tmpDemoList -v

# update gh-pages
git checkout gh-pages
git pull origin gh-pages

rm -rf "versions/$current_version/demo"
mkdir -p "versions/$current_version/demo"
rm index.html
rm plus.ico
rm bundle.js
rm -rf fonts
rm -rf assets
rm -rf styles
mv $tmpIndexFile "versions/$current_version/demo/index.html"
mv $tmpFaviconFile "versions/$current_version/demo/plus.ico"
mv $tmpDemoFile "versions/$current_version/demo/bundle.js"
mv $tmpFontsDir/fonts "versions/$current_version/demo/fonts"
mv $tmpAssetsDir/assets "versions/$current_version/demo/assets"
mv $tmpStylesDir/styles "versions/$current_version/demo/styles"
mv $tmpDemoList generate_demo_list.js
mv $tmpDemoList generate_demo_list.mjs

node generate_demo_list.js
rm generate_demo_list.js
node generate_demo_list.mjs
rm generate_demo_list.mjs

if [ -n "$(git status --porcelain bundle.js styles fonts assets index.html "versions/$current_version/demo" demo_page_by_version.html)" ]; then
echo "-- Current Status on gh-pages: --"
Expand Down
13 changes: 8 additions & 5 deletions scripts/update_gh-pages_doc
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,26 @@ if [ -n "$(git status --porcelain doc)" ]; then
fi

tmpDir=$(mktemp -d)
tmpDemoList=$(mktemp)
tmpDocList=$(mktemp)

cp -r doc/generated/* $tmpDir
cp scripts/generate_documentation_list.js $tmpDocList -v
cp scripts/generate_demo_list.mjs $tmpDemoList -v
cp scripts/generate_documentation_list.mjs $tmpDocList -v

# update gh-pages
git checkout gh-pages
git pull origin gh-pages

rm -rf "versions/$current_version/doc"
mkdir -p "versions/$current_version/doc"
rm -rf doc
mv $tmpDir/* "versions/$current_version/doc"
mv $tmpDocList generate_documentation_list.js
mv $tmpDemoList generate_demo_list.mjs
mv $tmpDocList generate_documentation_list.mjs

node generate_documentation_list.js
rm generate_documentation_list.js
node generate_documentation_list.mjs
rm generate_documentation_list.mjs
rm generate_demo_list.mjs

if [ -n "$(git status --porcelain doc "versions/$current_version/doc" documentation_pages_by_version.html)" ]; then
echo "-- Current Status on gh-pages: --"
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.projectKey=rx-player
sonar.organization=rx-player
sonar.projectName=rx-player
sonar.projectVersion=3.33.0
sonar.projectVersion=3.33.1
sonar.sources=./src,./demo,./tests
sonar.exclusions=demo/full/bundle.js,demo/standalone/lib.js,demo/bundle.js
sonar.host.url=https://sonarcloud.io
4 changes: 2 additions & 2 deletions src/core/api/public_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
videoElement.preload = "auto";

this.version = /* PLAYER_VERSION */"3.33.0";
this.version = /* PLAYER_VERSION */"3.33.1";
this.log = log;
this.state = "STOPPED";
this.videoElement = videoElement;
Expand Down Expand Up @@ -3140,7 +3140,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
return mediaElementTrackChoiceManager;
}
}
Player.version = /* PLAYER_VERSION */"3.33.0";
Player.version = /* PLAYER_VERSION */"3.33.1";

/** Every events sent by the RxPlayer's public API. */
interface IPublicAPIEvent {
Expand Down

0 comments on commit c999760

Please sign in to comment.