@srgssr/pillarbox-web 1.34.1 → 1.35.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.
@@ -90,7 +90,7 @@ function _toPropertyKey(t) {
90
90
  return "symbol" == typeof i ? i : i + "";
91
91
  }
92
92
 
93
- const version = "1.34.0";
93
+ const version = "1.35.0";
94
94
 
95
95
  /** @import VJSPlayer from 'video.js/dist/types/player' */
96
96
  /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
@@ -486,16 +486,20 @@ pillarbox.options.fill = true;
486
486
  * Configuration options for HTML5 settings in Pillarbox.
487
487
  *
488
488
  * @see [VHS useForcedSubtitles Option]{@link https://github.com/videojs/http-streaming/blob/main/README.md#useforcedsubtitles}
489
+ * @see [VHS overrideNative Option]{@link https://github.com/videojs/http-streaming#overridenative}
489
490
  * @type {Object}
490
491
  * @property {Object} vhs - Configuration for the Video.js HTTP Streaming.
491
492
  * @property {boolean} useForcedSubtitles - Enables the player to display forced subtitles by default.
492
493
  * Forced subtitles are pieces of information intended for display when no other text representation
493
494
  * is selected. They are used to clarify dialogue, provide alternate languages, display texted graphics,
494
495
  * or present location/person IDs that are not otherwise covered in the dubbed/localized audio.
496
+ * @property {boolean} overrideNative - Try to use videojs-http-streaming even on platforms that
497
+ * provide some level of HLS support natively
495
498
  */
496
499
  pillarbox.options.html5 = {
497
500
  vhs: {
498
- useForcedSubtitles: true
501
+ useForcedSubtitles: true,
502
+ overrideNative: !pillarbox.browser.IS_SAFARI
499
503
  }
500
504
  };
501
505
  /**
@@ -1391,8 +1395,7 @@ class SRGAnalytics {
1391
1395
  media_quality: this.srcMediaData.mediaData.quality,
1392
1396
  // TODO use media_is_dvr, media_is_live to define peach media_stream_type
1393
1397
  media_subtitles_on: this.isTextTrackEnabled(),
1394
- media_volume: (this.player.volume() * 100).toFixed(0),
1395
- navigation_environment: this.environment
1398
+ media_volume: (this.player.volume() * 100).toFixed(0)
1396
1399
  };
1397
1400
  if (this.isAudioTrackEnabled()) {
1398
1401
  labels.media_audio_track = this.getCurrentAudioTrack();
@@ -1431,7 +1434,8 @@ class SRGAnalytics {
1431
1434
  media_player_name: 'pillarbox-web',
1432
1435
  // TODO add a property playerName in the constructor with a default value ?
1433
1436
  media_player_version: this.playerVersion,
1434
- media_url: this.srcMediaData.src
1437
+ media_url: this.srcMediaData.src,
1438
+ navigation_environment: this.environment
1435
1439
  };
1436
1440
  const analyticsMetadata = this.srcMediaData.mediaData.analyticsMetadata || {};
1437
1441
  window.tc_vars = Object.assign({}, window.tc_vars, data, analyticsMetadata);
@@ -2922,9 +2926,6 @@ class MediaComposition {
2922
2926
  if (!this.mainChapter) {
2923
2927
  this.mainChapter = this.findChapterByUrn(this.chapterUrn);
2924
2928
  }
2925
- if (!this.mainChapter && this.chapterList && this.chapterList.length > 0) {
2926
- [this.mainChapter] = this.chapterList;
2927
- }
2928
2929
  return this.mainChapter;
2929
2930
  }
2930
2931
 
@@ -4537,5 +4538,5 @@ pillarbox.options.srgOptions = {
4537
4538
  tagCommanderScriptURL: undefined
4538
4539
  };
4539
4540
 
4540
- export { DataProvider, MediaComposition, PillarboxMonitoring, Player, SRGAnalytics, SrgSsr, pillarbox as default };
4541
+ export { DataProvider, Image as ImageUtils, MediaComposition, PillarboxMonitoring, Player, SRGAnalytics, SrgSsr, pillarbox as default };
4541
4542
  //# sourceMappingURL=pillarbox.es.js.map