rx-player 3.28.0-dev.2022062700 → 3.28.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "rx-player",
3
3
  "author": "Canal+",
4
- "version": "3.28.0-dev.2022062700",
4
+ "version": "3.28.0",
5
5
  "description": "Canal+ HTML5 Video Player",
6
6
  "main": "./dist/rx-player.js",
7
7
  "keywords": [
@@ -1,7 +1,7 @@
1
1
  sonar.projectKey=rx-player
2
2
  sonar.organization=rx-player
3
3
  sonar.projectName=rx-player
4
- sonar.projectVersion=3.28.0-dev.2022062700
4
+ sonar.projectVersion=3.28.0
5
5
  sonar.sources=./src,./demo,./tests
6
6
  sonar.exclusions=demo/full/bundle.js,demo/standalone/lib.js,demo/bundle.js
7
7
  sonar.host.url=https://sonarcloud.io
@@ -175,7 +175,7 @@ function getDocumentVisibilityRef(
175
175
  "visibilitychange";
176
176
 
177
177
  const isHidden = document[hidden as "hidden"];
178
- const ref = createSharedReference(isHidden);
178
+ const ref = createSharedReference(!isHidden);
179
179
 
180
180
  addEventListener(document, visibilityChangeEvent, () => {
181
181
  const isVisible = !(document[hidden as "hidden"]);
@@ -205,11 +205,13 @@ function getPageActivityRef(
205
205
  const ref = createSharedReference(true);
206
206
  stopListening.register(() => {
207
207
  clearTimeout(currentTimeout);
208
+ currentTimeout = undefined;
208
209
  ref.finish();
209
210
  });
210
211
 
211
212
  isDocVisibleRef.onUpdate(function onDocVisibilityChange(isVisible : boolean) : void {
212
213
  clearTimeout(currentTimeout); // clear potential previous timeout
214
+ currentTimeout = undefined;
213
215
  if (!isVisible) {
214
216
  const { INACTIVITY_DELAY } = config.getCurrent();
215
217
  currentTimeout = window.setTimeout(() => {
@@ -313,6 +315,7 @@ function getVideoVisibilityRef(
313
315
  const ref = createSharedReference(true);
314
316
  stopListening.register(() => {
315
317
  clearTimeout(currentTimeout);
318
+ currentTimeout = undefined;
316
319
  ref.finish();
317
320
  });
318
321
 
@@ -324,6 +327,8 @@ function getVideoVisibilityRef(
324
327
  return ref;
325
328
 
326
329
  function checkCurrentVisibility() : void {
330
+ clearTimeout(currentTimeout);
331
+ currentTimeout = undefined;
327
332
  if (pipStatus.getValue().isEnabled || isDocVisibleRef.getValue()) {
328
333
  ref.setValueIfChanged(true);
329
334
  } else {
@@ -102,7 +102,7 @@ function createAudioTracks(
102
102
  const track = { language: audioTrack.language,
103
103
  id,
104
104
  normalized: normalizeLanguage(audioTrack.language),
105
- audioDescription: false,
105
+ audioDescription: audioTrack.kind === "descriptions",
106
106
  representations: [] as Representation[] };
107
107
  newAudioTracks.push({ track,
108
108
  nativeTrack: audioTrack });
@@ -432,7 +432,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
432
432
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
433
433
  videoElement.preload = "auto";
434
434
 
435
- this.version = /* PLAYER_VERSION */"3.28.0-dev.2022062700";
435
+ this.version = /* PLAYER_VERSION */"3.28.0";
436
436
  this.log = log;
437
437
  this.state = "STOPPED";
438
438
  this.videoElement = videoElement;
@@ -2943,7 +2943,7 @@ class Player extends EventEmitter<IPublicAPIEvent> {
2943
2943
  return activeRepresentations[currentPeriod.id];
2944
2944
  }
2945
2945
  }
2946
- Player.version = /* PLAYER_VERSION */"3.28.0-dev.2022062700";
2946
+ Player.version = /* PLAYER_VERSION */"3.28.0";
2947
2947
 
2948
2948
  /** Every events sent by the RxPlayer's public API. */
2949
2949
  interface IPublicAPIEvent {