rx-player 4.2.0-dev.2024082600 → 4.2.0-dev.2024090300
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -3
- package/VERSION +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/commonjs/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/commonjs/compat/browser_detection.d.ts +3 -1
- package/dist/commonjs/compat/browser_detection.d.ts.map +1 -1
- package/dist/commonjs/compat/browser_detection.js +8 -1
- package/dist/commonjs/compat/can_reuse_media_keys.d.ts +2 -0
- package/dist/commonjs/compat/can_reuse_media_keys.d.ts.map +1 -1
- package/dist/commonjs/compat/can_reuse_media_keys.js +3 -1
- package/dist/commonjs/core/cmcd/cmcd_data_builder.js +1 -1
- package/dist/commonjs/core/main/worker/worker_main.js +1 -0
- package/dist/commonjs/main_thread/api/public_api.js +2 -2
- package/dist/commonjs/manifest/classes/adaptation.d.ts +13 -13
- package/dist/commonjs/manifest/classes/representation.d.ts +20 -12
- package/dist/commonjs/manifest/classes/representation.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_dash_wasm.js +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.d.ts.map +1 -1
- package/dist/es2017/__GENERATED_CODE/embedded_worker.js +1 -1
- package/dist/es2017/compat/browser_detection.d.ts +3 -1
- package/dist/es2017/compat/browser_detection.d.ts.map +1 -1
- package/dist/es2017/compat/browser_detection.js +7 -1
- package/dist/es2017/compat/can_reuse_media_keys.d.ts +2 -0
- package/dist/es2017/compat/can_reuse_media_keys.d.ts.map +1 -1
- package/dist/es2017/compat/can_reuse_media_keys.js +4 -2
- package/dist/es2017/core/cmcd/cmcd_data_builder.js +1 -1
- package/dist/es2017/core/main/worker/worker_main.js +1 -0
- package/dist/es2017/main_thread/api/public_api.js +2 -2
- package/dist/es2017/manifest/classes/adaptation.d.ts +13 -13
- package/dist/es2017/manifest/classes/representation.d.ts +20 -12
- package/dist/es2017/manifest/classes/representation.d.ts.map +1 -1
- package/dist/mpd-parser.wasm +0 -0
- package/dist/rx-player.js +18 -18
- package/dist/worker.js +5 -5
- package/package.json +1 -1
- package/src/__GENERATED_CODE/embedded_dash_wasm.ts +1 -1
- package/src/__GENERATED_CODE/embedded_worker.ts +1 -1
- package/src/compat/__tests__/can_reuse_media_keys.test.ts +33 -2
- package/src/compat/browser_detection.ts +9 -0
- package/src/compat/can_reuse_media_keys.ts +4 -2
- package/src/core/cmcd/cmcd_data_builder.ts +1 -1
- package/src/core/main/worker/worker_main.ts +1 -0
- package/src/main_thread/api/public_api.ts +2 -2
- package/src/manifest/classes/adaptation.ts +13 -13
- package/src/manifest/classes/representation.ts +20 -12
- package/.vscode/settings.json +0 -7
|
@@ -10,9 +10,9 @@ describe("Compat - canReuseMediaKeys", () => {
|
|
|
10
10
|
vi.resetModules();
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
it("should return true on
|
|
13
|
+
it("should return true on most browsers", async () => {
|
|
14
14
|
vi.doMock("../browser_detection", () => {
|
|
15
|
-
return { isWebOs: false, isPanasonic: false };
|
|
15
|
+
return { isWebOs: false, isPhilipsNetTv: false, isPanasonic: false };
|
|
16
16
|
});
|
|
17
17
|
const canReuseMediaKeys = (await vi.importActual(
|
|
18
18
|
"../can_reuse_media_keys.ts",
|
|
@@ -26,6 +26,37 @@ describe("Compat - canReuseMediaKeys", () => {
|
|
|
26
26
|
isWebOs: true,
|
|
27
27
|
isWebOs2022: false,
|
|
28
28
|
isPanasonic: false,
|
|
29
|
+
isPhilipsNetTv: false,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const canReuseMediaKeys = (await vi.importActual(
|
|
33
|
+
"../can_reuse_media_keys.ts",
|
|
34
|
+
)) as any;
|
|
35
|
+
expect(canReuseMediaKeys.default()).toBe(false);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("should return false on Panasonic", async () => {
|
|
39
|
+
vi.doMock("../browser_detection", () => {
|
|
40
|
+
return {
|
|
41
|
+
isWebOs: false,
|
|
42
|
+
isWebOs2022: false,
|
|
43
|
+
isPanasonic: true,
|
|
44
|
+
isPhilipsNetTv: false,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
const canReuseMediaKeys = (await vi.importActual(
|
|
48
|
+
"../can_reuse_media_keys.ts",
|
|
49
|
+
)) as any;
|
|
50
|
+
expect(canReuseMediaKeys.default()).toBe(false);
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
it("should return false on Philips' NETTV", async () => {
|
|
54
|
+
vi.doMock("../browser_detection", () => {
|
|
55
|
+
return {
|
|
56
|
+
isWebOs: false,
|
|
57
|
+
isWebOs2022: false,
|
|
58
|
+
isPanasonic: false,
|
|
59
|
+
isPhilipsNetTv: true,
|
|
29
60
|
};
|
|
30
61
|
});
|
|
31
62
|
const canReuseMediaKeys = (await vi.importActual(
|
|
@@ -67,6 +67,9 @@ let isWebOs2022 = false;
|
|
|
67
67
|
/** `true` for Panasonic devices. */
|
|
68
68
|
let isPanasonic = false;
|
|
69
69
|
|
|
70
|
+
/** `true` we're relying on Philips's NetTv browser. */
|
|
71
|
+
let isPhilipsNetTv = false;
|
|
72
|
+
|
|
70
73
|
/** `true` for the PlayStation 4 game console. */
|
|
71
74
|
let isPlayStation4 = false;
|
|
72
75
|
|
|
@@ -155,6 +158,11 @@ let isXbox = false;
|
|
|
155
158
|
) {
|
|
156
159
|
isWebOs2021 = true;
|
|
157
160
|
}
|
|
161
|
+
} else if (
|
|
162
|
+
navigator.userAgent.indexOf("NETTV") !== -1 &&
|
|
163
|
+
navigator.userAgent.indexOf("Philips") !== -1
|
|
164
|
+
) {
|
|
165
|
+
isPhilipsNetTv = true;
|
|
158
166
|
} else if (/[Pp]anasonic/.test(navigator.userAgent)) {
|
|
159
167
|
isPanasonic = true;
|
|
160
168
|
} else if (navigator.userAgent.indexOf("Xbox") !== -1) {
|
|
@@ -168,6 +176,7 @@ export {
|
|
|
168
176
|
isIEOrEdge,
|
|
169
177
|
isFirefox,
|
|
170
178
|
isPanasonic,
|
|
179
|
+
isPhilipsNetTv,
|
|
171
180
|
isPlayStation4,
|
|
172
181
|
isPlayStation5,
|
|
173
182
|
isXbox,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPanasonic, isWebOs } from "./browser_detection";
|
|
1
|
+
import { isPanasonic, isPhilipsNetTv, isWebOs } from "./browser_detection";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns `true` if a `MediaKeys` instance (the `Encrypted Media Extension`
|
|
@@ -9,9 +9,11 @@ import { isPanasonic, isWebOs } from "./browser_detection";
|
|
|
9
9
|
* - (2022-11-21): WebOS (LG TVs), for some encrypted contents, just
|
|
10
10
|
* rebuffered indefinitely when loading a content already-loaded on the
|
|
11
11
|
* HTMLMediaElement.
|
|
12
|
+
* - (2024-08-23): Seen on Philips 2024 and 2023 in:
|
|
13
|
+
* https://github.com/canalplus/rx-player/issues/1464
|
|
12
14
|
*
|
|
13
15
|
* @returns {boolean}
|
|
14
16
|
*/
|
|
15
17
|
export default function canReuseMediaKeys(): boolean {
|
|
16
|
-
return !isWebOs && !isPanasonic;
|
|
18
|
+
return !isWebOs && !isPhilipsNetTv && !isPanasonic;
|
|
17
19
|
}
|
|
@@ -377,8 +377,8 @@ export default class CmcdDataBuilder {
|
|
|
377
377
|
}
|
|
378
378
|
};
|
|
379
379
|
|
|
380
|
-
addNumberProperty("br", "object");
|
|
381
380
|
addNumberProperty("bl", "request");
|
|
381
|
+
addNumberProperty("br", "object");
|
|
382
382
|
addBooleanProperty("bs", "status");
|
|
383
383
|
addStringProperty("cid", "session");
|
|
384
384
|
addNumberProperty("d", "object");
|
|
@@ -744,6 +744,7 @@ function loadOrReloadPreparedContent(
|
|
|
744
744
|
}
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
+
contentTimeBoundariesObserver.onPeriodCleared(value.type, value.period);
|
|
747
748
|
preparedContent.trackChoiceSetter.removeTrackSetter(value.period.id, value.type);
|
|
748
749
|
sendMessage({
|
|
749
750
|
type: WorkerMessageType.PeriodStreamCleared,
|
|
@@ -409,7 +409,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
409
409
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
410
410
|
videoElement.preload = "auto";
|
|
411
411
|
|
|
412
|
-
this.version = /* PLAYER_VERSION */ "4.2.0-dev.
|
|
412
|
+
this.version = /* PLAYER_VERSION */ "4.2.0-dev.2024090300";
|
|
413
413
|
this.log = log;
|
|
414
414
|
this.state = "STOPPED";
|
|
415
415
|
this.videoElement = videoElement;
|
|
@@ -3307,7 +3307,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
|
|
|
3307
3307
|
}
|
|
3308
3308
|
}
|
|
3309
3309
|
}
|
|
3310
|
-
Player.version = /* PLAYER_VERSION */ "4.2.0-dev.
|
|
3310
|
+
Player.version = /* PLAYER_VERSION */ "4.2.0-dev.2024090300";
|
|
3311
3311
|
|
|
3312
3312
|
/** Every events sent by the RxPlayer's public API. */
|
|
3313
3313
|
interface IPublicAPIEvent {
|
|
@@ -49,55 +49,55 @@ export default class Adaptation implements IAdaptationMetadata {
|
|
|
49
49
|
*/
|
|
50
50
|
public manuallyAdded?: boolean;
|
|
51
51
|
/**
|
|
52
|
-
* @see
|
|
52
|
+
* @see IAdaptationMetadata.representations
|
|
53
53
|
*/
|
|
54
54
|
public readonly representations: Representation[];
|
|
55
55
|
/**
|
|
56
|
-
* @see
|
|
56
|
+
* @see ITrackType
|
|
57
57
|
*/
|
|
58
58
|
public readonly type: ITrackType;
|
|
59
59
|
/**
|
|
60
|
-
* @see
|
|
60
|
+
* @see IAdaptationMetadata.isAudioDescription
|
|
61
61
|
*/
|
|
62
62
|
public isAudioDescription?: boolean;
|
|
63
63
|
/**
|
|
64
|
-
* @see
|
|
64
|
+
* @see IAdaptationMetadata.isClosedCaption
|
|
65
65
|
*/
|
|
66
66
|
public isClosedCaption?: boolean;
|
|
67
67
|
/**
|
|
68
|
-
* @see
|
|
68
|
+
* @see IAdaptationMetadata.isForcedSubtitles
|
|
69
69
|
*/
|
|
70
70
|
public isForcedSubtitles?: boolean;
|
|
71
71
|
/**
|
|
72
|
-
* @see
|
|
72
|
+
* @see IAdaptationMetadata.isSignInterpreted
|
|
73
73
|
*/
|
|
74
74
|
public isSignInterpreted?: boolean;
|
|
75
75
|
/**
|
|
76
|
-
* @see
|
|
76
|
+
* @see IAdaptationMetadata.isDub
|
|
77
77
|
*/
|
|
78
78
|
public isDub?: boolean;
|
|
79
79
|
/**
|
|
80
|
-
* @see
|
|
80
|
+
* @see IAdaptationMetadata.language
|
|
81
81
|
*/
|
|
82
82
|
public language?: string;
|
|
83
83
|
/**
|
|
84
|
-
* @see
|
|
84
|
+
* @see IAdaptationMetadata.normalizedLanguage
|
|
85
85
|
*/
|
|
86
86
|
public normalizedLanguage?: string;
|
|
87
87
|
/**
|
|
88
|
-
* @see
|
|
88
|
+
* @see IAdaptationSupportStatus
|
|
89
89
|
*/
|
|
90
90
|
public supportStatus: IAdaptationSupportStatus;
|
|
91
91
|
/**
|
|
92
|
-
* @see
|
|
92
|
+
* @see IAdaptationMetadata.isTrickModeTrack
|
|
93
93
|
*/
|
|
94
94
|
public isTrickModeTrack?: boolean;
|
|
95
95
|
/**
|
|
96
|
-
* @see
|
|
96
|
+
* @see IAdaptationMetadata.label
|
|
97
97
|
*/
|
|
98
98
|
public label?: string;
|
|
99
99
|
/**
|
|
100
|
-
* @see
|
|
100
|
+
* @see IAdaptationMetadata.trickModeTracks
|
|
101
101
|
*/
|
|
102
102
|
public readonly trickModeTracks?: Adaptation[];
|
|
103
103
|
|
|
@@ -37,15 +37,15 @@ class Representation implements IRepresentationMetadata {
|
|
|
37
37
|
/** ID uniquely identifying the Representation in its parent Adaptation. */
|
|
38
38
|
public readonly id: string;
|
|
39
39
|
/**
|
|
40
|
-
* @see IRepresentationMetadata
|
|
40
|
+
* @see IRepresentationMetadata.uniqueId
|
|
41
41
|
*/
|
|
42
42
|
public readonly uniqueId: string;
|
|
43
43
|
/**
|
|
44
|
-
* @see IRepresentationMetadata
|
|
44
|
+
* @see IRepresentationMetadata.bitrate
|
|
45
45
|
*/
|
|
46
46
|
public bitrate: number;
|
|
47
47
|
/**
|
|
48
|
-
* @see IRepresentationMetadata
|
|
48
|
+
* @see IRepresentationMetadata.frameRate
|
|
49
49
|
*/
|
|
50
50
|
public frameRate?: number;
|
|
51
51
|
/**
|
|
@@ -65,39 +65,47 @@ class Representation implements IRepresentationMetadata {
|
|
|
65
65
|
*/
|
|
66
66
|
public cdnMetadata: ICdnMetadata[] | null;
|
|
67
67
|
/**
|
|
68
|
-
* @see IRepresentationMetadata
|
|
68
|
+
* @see IRepresentationMetadata.isSpatialAudio
|
|
69
69
|
*/
|
|
70
70
|
public isSpatialAudio?: boolean | undefined;
|
|
71
71
|
/**
|
|
72
|
-
* @see IRepresentationMetadata
|
|
72
|
+
* @see IRepresentationMetadata.codecs
|
|
73
73
|
*/
|
|
74
74
|
public codecs: string[];
|
|
75
75
|
/**
|
|
76
|
-
* @see IRepresentationMetadata
|
|
76
|
+
* @see IRepresentationMetadata.mimeType
|
|
77
77
|
*/
|
|
78
78
|
public mimeType?: string;
|
|
79
79
|
/**
|
|
80
|
-
* @see IRepresentationMetadata
|
|
80
|
+
* @see IRepresentationMetadata.width
|
|
81
81
|
*/
|
|
82
82
|
public width?: number;
|
|
83
83
|
/**
|
|
84
|
-
* @see IRepresentationMetadata
|
|
84
|
+
* @see IRepresentationMetadata.height
|
|
85
85
|
*/
|
|
86
86
|
public height?: number;
|
|
87
87
|
/**
|
|
88
|
-
* @see IRepresentationMetadata
|
|
88
|
+
* @see IRepresentationMetadata.contentProtections
|
|
89
89
|
*/
|
|
90
90
|
public contentProtections?: IContentProtections;
|
|
91
91
|
/**
|
|
92
|
-
* @see IRepresentationMetadata
|
|
92
|
+
* @see IRepresentationMetadata.hdrInfo
|
|
93
93
|
*/
|
|
94
94
|
public hdrInfo?: IHDRInformation;
|
|
95
95
|
/**
|
|
96
|
-
* @see IRepresentationMetadata
|
|
96
|
+
* @see IRepresentationMetadata.decipherable
|
|
97
|
+
*
|
|
98
|
+
* Note that this property should __NEVER__ be updated directly on an
|
|
99
|
+
* instanciated `Representation`, you are supposed to rely on
|
|
100
|
+
* `Manifest` methods for this.
|
|
97
101
|
*/
|
|
98
102
|
public decipherable?: boolean | undefined;
|
|
99
103
|
/**
|
|
100
|
-
* @see IRepresentationMetadata
|
|
104
|
+
* @see IRepresentationMetadata.isSupported
|
|
105
|
+
*
|
|
106
|
+
* Note that this property should __NEVER__ be updated directly on an
|
|
107
|
+
* instanciated `Representation`, you are supposed to rely on
|
|
108
|
+
* `Manifest` methods for this.
|
|
101
109
|
*/
|
|
102
110
|
public isSupported: boolean | undefined;
|
|
103
111
|
/**
|