@srgssr/pillarbox-web 1.17.0 → 1.19.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.
Files changed (31) hide show
  1. package/dist/pillarbox-core.cjs.js +11 -6
  2. package/dist/pillarbox-core.cjs.js.map +1 -1
  3. package/dist/pillarbox-core.es.js +11 -6
  4. package/dist/pillarbox-core.es.js.map +1 -1
  5. package/dist/pillarbox.cjs.js +144 -111
  6. package/dist/pillarbox.cjs.js.map +1 -1
  7. package/dist/pillarbox.es.js +145 -112
  8. package/dist/pillarbox.es.js.map +1 -1
  9. package/dist/pillarbox.umd.js +144 -111
  10. package/dist/pillarbox.umd.js.map +1 -1
  11. package/dist/pillarbox.umd.min.js +1 -1
  12. package/dist/pillarbox.umd.min.js.map +1 -1
  13. package/dist/types/build.es.d.ts +5 -1
  14. package/dist/types/build.es.d.ts.map +1 -1
  15. package/dist/types/src/components/player.d.ts +7 -8
  16. package/dist/types/src/components/player.d.ts.map +1 -1
  17. package/dist/types/src/dataProvider/model/MediaComposition.d.ts +12 -0
  18. package/dist/types/src/dataProvider/model/MediaComposition.d.ts.map +1 -1
  19. package/dist/types/src/dataProvider/services/DataProvider.d.ts +3 -3
  20. package/dist/types/src/dataProvider/services/DataProvider.d.ts.map +1 -1
  21. package/dist/types/src/middleware/srgssr.d.ts +76 -73
  22. package/dist/types/src/middleware/srgssr.d.ts.map +1 -1
  23. package/dist/types/src/trackers/PillarboxMonitoring.d.ts +15 -8
  24. package/dist/types/src/trackers/PillarboxMonitoring.d.ts.map +1 -1
  25. package/dist/types/src/trackers/SRGAnalytics.d.ts +55 -55
  26. package/dist/types/src/trackers/SRGAnalytics.d.ts.map +1 -1
  27. package/package.json +1 -1
  28. package/dist/types/src/components/typedef.d.ts +0 -14
  29. package/dist/types/src/components/typedef.d.ts.map +0 -1
  30. package/dist/types/src/middleware/typedef.d.ts +0 -67
  31. package/dist/types/src/middleware/typedef.d.ts.map +0 -1
@@ -107,11 +107,16 @@ function _objectWithoutProperties(source, excluded) {
107
107
  return target;
108
108
  }
109
109
 
110
- const version = "1.16.0";
110
+ const version = "1.18.0";
111
+
112
+ /** @import VJSPlayer from 'video.js/dist/types/player' */
113
+ /** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
114
+ /** @import TextTrack from 'video.js/dist/types/tracks/text-track' */
115
+ /** @import {TrackSelector} from './typedef' */
111
116
 
112
117
  /**
113
118
  * @ignore
114
- * @type {typeof import('video.js/dist/types/player').default}
119
+ * @type {typeof VJSPlayer}
115
120
  */
116
121
  const vjsPlayer = videojs.getComponent('player');
117
122
 
@@ -146,7 +151,7 @@ class Player extends vjsPlayer {
146
151
  * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind
147
152
  * @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language
148
153
  *
149
- * @param {import('./typedef').TrackSelector} [trackSelector]
154
+ * @param {TrackSelector} [trackSelector]
150
155
  *
151
156
  * @example
152
157
  * // Get the current audio track
@@ -160,7 +165,7 @@ class Player extends vjsPlayer {
160
165
  * // Activate first audio track found corresponding to language
161
166
  * player.audioTrack({language:'fr'});
162
167
  *
163
- * @return {import('video.js/dist/types/tracks/audio-track').default | undefined} The
168
+ * @return {AudioTrack | undefined} The
164
169
  * currently enabled audio track. See {@link https://docs.videojs.com/audiotrack}.
165
170
  */
166
171
  audioTrack(trackSelector) {
@@ -270,7 +275,7 @@ class Player extends vjsPlayer {
270
275
  * @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind
271
276
  * @see https://developer.mozilla.org/en-US/docs/Web/API/textTrack/language
272
277
  *
273
- * @param {import('./typedef').TrackSelector} [trackSelector]
278
+ * @param {TrackSelector} [trackSelector]
274
279
  *
275
280
  * @example
276
281
  * // Get the current text track
@@ -289,7 +294,7 @@ class Player extends vjsPlayer {
289
294
  * // Activate first text track found corresponding to language
290
295
  * player.textTrack({language:'fr'});
291
296
  *
292
- * @return {import('video.js/dist/types/tracks/text-track').default | undefined} The
297
+ * @return {TextTrack | undefined} The
293
298
  * currently enabled text track. See {@link https://docs.videojs.com/texttrack}.
294
299
  */
295
300
  textTrack(trackSelector) {
@@ -408,10 +413,11 @@ pillarbox.options.responsive = true;
408
413
  */
409
414
  pillarbox.options.trackers = {};
410
415
 
416
+ /** @import MediaComposition from '../model/MediaComposition.js' */
417
+
411
418
  /**
412
419
  * Represents a data provider for constructing URLs and handling requests.
413
420
  * @class
414
- * @ignore
415
421
  */
416
422
  class DataProvider {
417
423
  /**
@@ -439,7 +445,7 @@ class DataProvider {
439
445
  *
440
446
  * @param {Function} urlHandler A function that constructs the URL
441
447
  *
442
- * @returns {Promise<import('../model/MediaComposition.js').default>} A promise with the fetched data
448
+ * @returns {Promise<MediaComposition>} A promise with the fetched data
443
449
  */
444
450
  handleRequest(urlHandler) {
445
451
  var _this = this;
@@ -451,7 +457,7 @@ class DataProvider {
451
457
  throw response;
452
458
  }
453
459
 
454
- /** @type {import('../model/MediaComposition.js').default} */
460
+ /** @type {MediaComposition} */
455
461
  const data = yield response.json();
456
462
  return data;
457
463
  });
@@ -840,67 +846,65 @@ const TIME_UPDATE = 'timeupdate';
840
846
  */
841
847
  const WAITING = 'waiting';
842
848
 
849
+ /** @import Player from 'video.js/dist/types/player' */
850
+
843
851
  /* eslint max-lines-per-function: ["error", 200] */
844
852
  /* eslint max-statements: ["error", 20]*/
845
853
  /* eslint complexity: ["error", 10]*/
854
+
846
855
  /**
847
- * SRG analytics
848
- * @class SRGAnalytics
849
- * @ignore
856
+ * The SRG analytics class tracks media playback according to the standard defined by SRG SSR.
850
857
  *
851
- * ### Script URL
852
- * JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js
858
+ * @class SRGAnalytics
853
859
  *
854
860
  * ### Official documentation
855
- * Variables list
856
- * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Datalayer+for+media+players
857
861
  *
858
- * Standard event sequences
859
- * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/standard+streaming+events%3A+sequence+of+events+for+media+player+actions
862
+ * - [New variable list]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/1009353309/Labels+check+for+migration+of+integration+layer+in+SAM}
863
+ * - [Variables list]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795904478/Datalayer+for+media+players}
864
+ * - [Standard event sequences]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795904171/standard+streaming+events+sequence+of+events+for+media+player+actions}
865
+ * - [Review of Standard Media Actions]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795902249/Implementation+Concept+-+draft}
866
+ * - [ComScore Implementation Guide]{@link https://www.dropbox.com/sh/cdwuikq0abxi21m/AABmSyXYKUTWSAwRZgQA9Ujna/JavaScript%20Latest%20Version?dl=0&preview=Comscore_Library-JavaScript-Streaming_Tag-Implementation_Guide-International.pdf&subfolder_nav_tracking=1}
860
867
  *
861
- * Review of Standard Media Actions
862
- * @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Implementation+Concept+-+draft
868
+ * ### Script URL
863
869
  *
864
- * ComScore Implementation Guide
865
- * @see https://www.dropbox.com/sh/cdwuikq0abxi21m/AABmSyXYKUTWSAwRZgQA9Ujna/JavaScript%20Latest%20Version?dl=0&preview=Comscore_Library-JavaScript-Streaming_Tag-Implementation_Guide-International.pdf&subfolder_nav_tracking=1
870
+ * JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js
866
871
  *
867
872
  * ### Variables list
868
- * - 'event_id', // init | play | stop | pos | pause | seek | uptime | eof
869
- * - 'event_timestamp', // Seems to be generated automatically from the documentation, but the TP overrides it
870
- * - 'event_name', // NA TP seems to not sending this variable
871
- * - 'event_source', // NA TP seems to not sending this variable
872
- * - 'event_name', // NA TP seems to not sending this variable
873
- * - 'event_value', // NA TP seems to not sending this variable
874
- * - 'navigation_environment', // prod | preprod
875
- * - 'media_subtitles_on', // string true | false
876
- * - 'media_timeshift', // need better description
877
- * - 'media_quality', // SD | HD ?
878
- * - 'media_bandwidth', // NA for the web, 64000
879
- * - 'media_volume', // from 0 to 100
880
- * - 'media_embedding_url', //
881
- * - 'media_player_name', // videojs | letterbox-web ?
882
- * - 'media_chromecast_selected', // boolean true | false
883
- * - 'media_player_version', // player's version
884
- * - 'media_player_display', // is the player mode, on the TP : inline, embed etc..
885
- * - 'media_audio_track', // NA
886
- * - 'media_position_real', // NA
887
- * - 'media_time_spent', // NA
888
- * - 'device_id', // NA
889
- * - 'user_id_log_in', // NA only RTS has log in today
890
- * - 'media_thumbnail', // Not required by the spec but sended by the TP
891
- * - 'media_bu_distributer', // Not required by the spec but sended by the TP
892
873
  *
874
+ * - event_id: init | play | stop | pos | pause | seek | uptime | eof
875
+ * - event_timestamp: Seems to be generated automatically from the documentation, but the TP overrides it
876
+ * - event_name: NA TP seems to not sending this variable
877
+ * - event_source: NA TP seems to not sending this variable
878
+ * - event_name: NA TP seems to not sending this variable
879
+ * - event_value: NA TP seems to not sending this variable
880
+ * - navigation_environment: prod | preprod
881
+ * - media_subtitles_on: string true | false
882
+ * - media_timeshift: need better description
883
+ * - media_quality: SD | HD ?
884
+ * - media_bandwidth: NA for the web, 64000
885
+ * - media_volume: from 0 to 100
886
+ * - media_embedding_url:
887
+ * - media_player_name: videojs | letterbox-web ?
888
+ * - media_chromecast_selected: boolean true | false
889
+ * - media_player_version: player's version
890
+ * - media_player_display: is the player mode, on the TP : inline, embed etc..
891
+ * - media_audio_track: NA
892
+ * - media_position_real: NA
893
+ * - media_time_spent: NA
894
+ * - device_id: NA
895
+ * - user_id_log_in: NA only RTS has log in today
896
+ * - media_thumbnail: Not required by the spec but sended by the TP
897
+ * - media_bu_distributer: Not required by the spec but sended by the TP
893
898
  *
894
899
  * ### Sequence stories
895
900
  *
896
- * __Story 1 (AoD/VOD-basics)__: A VoD is played. The user does not interact with the player. The VoD plays to its end.
901
+ * #### Story 1 (AoD/VOD-basics): A VoD is played. The user does not interact with the player. The VoD plays to its end.
897
902
  *
898
903
  * Hints:
899
904
  * - Media sessions always start with PLAY. They end with STOP or EOF (or with PAUSE or last POS)
900
905
  * - POS is sent ever 30s
901
906
  *
902
- *
903
- * __Story 2 (livestream-basics A)__: A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.
907
+ * #### Story 2 (livestream-basics A): A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.
904
908
  *
905
909
  * Hints:
906
910
  * - Media sessions always start with PLAY. They end with STOP (or, worse for data quailty, with PAUSE or last POS/UPTIME)
@@ -908,14 +912,12 @@ const WAITING = 'waiting';
908
912
  * - POS is sent ever 30s, UPTIME every 60s with inital UPTIME after 30s.
909
913
  * - This is the interval: 30s: POS + UPTIME; 60s: POS; 90s: POS + UPTIME; ...
910
914
  *
911
- *
912
- * __Story 3 (Seeking a VoD/AoD)__: A VoD is played. User seeks in the VoD/AoD.
915
+ * #### Story 3 (Seeking a VoD/AoD): A VoD is played. User seeks in the VoD/AoD.
913
916
  *
914
917
  * Hints:
915
918
  * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the media position has altered.
916
919
  *
917
- *
918
- * __Story 4 (Seeking a livestream)__: A Livestream is played. User goes back in the livestream.
920
+ * #### Story 4 (Seeking a livestream): A Livestream is played. User goes back in the livestream.
919
921
  *
920
922
  * Hints:
921
923
  * - Once the Media Player slider is released (seek is over), another action to finish up the seeking is initiated. Typically this is PLAY. For that second PLAY, the a new variable, media_timeshift is passed.
@@ -924,6 +926,17 @@ const WAITING = 'waiting';
924
926
  * 2. The value of media_position is '1'.
925
927
  */
926
928
  class SRGAnalytics {
929
+ /**
930
+ * Creates an instance of SRGAnalytics.
931
+ *
932
+ * @constructor
933
+ * @param {Player} player The player instance
934
+ * @param {SRGAnalyticsOptions} [options={}] Configuration options
935
+ * @param {boolean} [options.debug=false] Enables debug mode if set to true
936
+ * @param {string} [options.environment='prod'] The environment in which the data is sent
937
+ * @param {string} [options.playerVersion='none'] The version of the player
938
+ * @param {string} [options.tagCommanderScriptURL='//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js'] The URL for the Tag Commander script
939
+ */
927
940
  constructor(player, {
928
941
  debug = false,
929
942
  environment = 'prod',
@@ -1651,6 +1664,8 @@ class SRGAnalytics {
1651
1664
  }
1652
1665
  }
1653
1666
 
1667
+ /** @import Player from 'video.js/dist/types/player' */
1668
+
1654
1669
  /* eslint max-statements: ["error", 25]*/
1655
1670
 
1656
1671
  /**
@@ -1669,6 +1684,19 @@ class SRGAnalytics {
1669
1684
  * @see https://github.com/SRGSSR/pillarbox-documentation/blob/main/Specifications/monitoring.md
1670
1685
  */
1671
1686
  class PillarboxMonitoring {
1687
+ /**
1688
+ * Creates an instance of PillarboxMonitoring.
1689
+ *
1690
+ * @constructor
1691
+ * @param {Player} player The player instance to be monitored
1692
+ * @param {PillarboxMonitoringOptions} [options={}] Configuration options for the monitoring
1693
+ * @param {string} [options.playerName='none'] The name of the player
1694
+ * @param {string} [options.playerVersion='none'] The version of the player
1695
+ * @param {string} [options.platform='Web'] The platform on which the player is running
1696
+ * @param {number} [options.schemaVersion=1] The version of the schema used for monitoring
1697
+ * @param {number} [options.heartbeatInterval=30000] The interval in milliseconds for sending heartbeat signals
1698
+ * @param {string} [options.beaconUrl='https://monitoring.pillarbox.ch/api/events'] The URL for the monitoring beacon
1699
+ */
1672
1700
  constructor(player, {
1673
1701
  playerName = 'none',
1674
1702
  playerVersion = 'none',
@@ -2491,6 +2519,19 @@ class PillarboxMonitoring {
2491
2519
  }
2492
2520
  }
2493
2521
 
2522
+ /**
2523
+ * @typedef {import('./typedef').Channel} Channel
2524
+ * @typedef {import('./typedef').Chapter} Chapter
2525
+ * @typedef {import('./typedef').Episode} Episode
2526
+ * @typedef {import('./typedef').Resource} Resource
2527
+ * @typedef {import('./typedef').Segment} Segment
2528
+ * @typedef {import('./typedef').Show} Show
2529
+ * @typedef {import('./typedef').Subtitle} Subtitle
2530
+ * @typedef {import('./typedef').TimeInterval} TimeInterval
2531
+ * @typedef {import('./typedef').Topic} Topic
2532
+ * @typedef {import('./typedef').MainResource} MainResource
2533
+ */
2534
+
2494
2535
  /**
2495
2536
  * Represents the composition of media content.
2496
2537
  *
@@ -2689,6 +2730,7 @@ class MediaComposition {
2689
2730
  imageCopyright: this.getMainChapter().imageCopyright,
2690
2731
  intervals: this.getMainTimeIntervals(),
2691
2732
  live: resource.live,
2733
+ mediaContainer: resource.mediaContainer,
2692
2734
  mediaType: this.getMainChapter().mediaType,
2693
2735
  mimeType: resource.mimeType,
2694
2736
  presentation: resource.presentation,
@@ -2779,19 +2821,6 @@ class MediaComposition {
2779
2821
  }
2780
2822
  }
2781
2823
 
2782
- /**
2783
- * @typedef {import('./typedef').Channel} Channel
2784
- * @typedef {import('./typedef').Chapter} Chapter
2785
- * @typedef {import('./typedef').Episode} Episode
2786
- * @typedef {import('./typedef').Resource} Resource
2787
- * @typedef {import('./typedef').Segment} Segment
2788
- * @typedef {import('./typedef').Show} Show
2789
- * @typedef {import('./typedef').Subtitle} Subtitle
2790
- * @typedef {import('./typedef').TimeInterval} TimeInterval
2791
- * @typedef {import('./typedef').Topic} Topic
2792
- * @typedef {import('./typedef').MainResource} MainResource
2793
- */
2794
-
2795
2824
  const Play$4 = "Wiedergabe";
2796
2825
  const Pause$4 = "Pause";
2797
2826
  const Replay$4 = "Erneut abspielen";
@@ -3560,6 +3589,10 @@ pillarbox.addLanguage('rm', _objectSpread2({}, pillarboxLang));
3560
3589
  const _excluded = ["url", "mimeType", "keySystems"],
3561
3590
  _excluded2 = ["src"];
3562
3591
 
3592
+ /** @import Player from 'video.js/dist/types/player' */
3593
+ /** @import {Chapter, MainResource, Segment, Subtitle, TimeInterval} from '../dataProvider/model/typedef' */
3594
+ /** @import {ComposedSrcMediaData, MainResourceWithKeySystems} from './typedef' */
3595
+
3563
3596
  /**
3564
3597
  * @class SrgSsr
3565
3598
  */
@@ -3567,8 +3600,8 @@ class SrgSsr {
3567
3600
  /**
3568
3601
  * Adds blocked segments to the player.
3569
3602
  *
3570
- * @param {import('video.js/dist/types/player').default} player
3571
- * @param {Array<import('../dataProvider/model/typedef').Segment>} [segments=[]]
3603
+ * @param {Player} player
3604
+ * @param {Array<Segment>} [segments=[]]
3572
3605
  */
3573
3606
  static addBlockedSegments(player, segments = []) {
3574
3607
  const trackId = 'srgssr-blocked-segments';
@@ -3590,8 +3623,8 @@ class SrgSsr {
3590
3623
  /**
3591
3624
  * Adds remote text tracks from an array of subtitles.
3592
3625
  *
3593
- * @param {import('video.js/dist/types/player').default} player
3594
- * @param {Array<import('../dataProvider/model/typedef').Subtitle>} [subtitles=[]]
3626
+ * @param {Player} player
3627
+ * @param {Array<Subtitle>} [subtitles=[]]
3595
3628
  */
3596
3629
  static addRemoteTextTracks(player, subtitles = []) {
3597
3630
  if (!Array.isArray(subtitles)) return;
@@ -3615,9 +3648,9 @@ class SrgSsr {
3615
3648
  *
3616
3649
  * @param {TextTrack} textTrack
3617
3650
  * @param {
3618
- * import('../dataProvider/model/typedef').Segment |
3619
- * import('../dataProvider/model/typedef').Chapter |
3620
- * import('../dataProvider/model/typedef').TimeInterval
3651
+ * Segment |
3652
+ * Chapter |
3653
+ * TimeInterval
3621
3654
  * } data SRG SSR's cue-like representation
3622
3655
  */
3623
3656
  static addTextTrackCue(textTrack, data) {
@@ -3629,8 +3662,8 @@ class SrgSsr {
3629
3662
  /**
3630
3663
  * Add multiple text tracks to the player.
3631
3664
  *
3632
- * @param {import('video.js/dist/types/player').default} player
3633
- * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj
3665
+ * @param {Player} player
3666
+ * @param {ComposedSrcMediaData} srcMediaObj
3634
3667
  */
3635
3668
  static addTextTracks(player, {
3636
3669
  mediaData
@@ -3644,9 +3677,9 @@ class SrgSsr {
3644
3677
  /**
3645
3678
  * Adds chapters to the player.
3646
3679
  *
3647
- * @param {import('video.js/dist/types/player').default} player
3680
+ * @param {Player} player
3648
3681
  * @param {string} chapterUrn The URN of the main chapter.
3649
- * @param {Array.<import('../dataProvider/model/typedef').Chapter>} [chapters=[]]
3682
+ * @param {Array.<Chapter>} [chapters=[]]
3650
3683
  */
3651
3684
  static addChapters(player, chapterUrn, chapters = []) {
3652
3685
  const trackId = 'srgssr-chapters';
@@ -3667,8 +3700,8 @@ class SrgSsr {
3667
3700
  /**
3668
3701
  * Adds intervals to the player.
3669
3702
  *
3670
- * @param {import('video.js/dist/types/player').default} player
3671
- * @param {Array.<import('../dataProvider/model/typedef').TimeInterval>} [intervals=[]]
3703
+ * @param {Player} player
3704
+ * @param {Array.<TimeInterval>} [intervals=[]]
3672
3705
  */
3673
3706
  static addIntervals(player, intervals = []) {
3674
3707
  const trackId = 'srgssr-intervals';
@@ -3689,8 +3722,8 @@ class SrgSsr {
3689
3722
  * Set a blocking reason according to the block reason returned
3690
3723
  * by mediaData.
3691
3724
  *
3692
- * @param {import('video.js/dist/types/player').default} player
3693
- * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj
3725
+ * @param {Player} player
3726
+ * @param {ComposedSrcMediaData} srcMediaObj
3694
3727
  *
3695
3728
  * @returns {undefined|Boolean}
3696
3729
  */
@@ -3713,9 +3746,9 @@ class SrgSsr {
3713
3746
  * if at least one of them has tokenType
3714
3747
  * set to Akamai.
3715
3748
  *
3716
- * @param {Array.<import('./typedef').MainResourceWithKeySystems>} resources
3749
+ * @param {Array.<MainResourceWithKeySystems>} resources
3717
3750
  *
3718
- * @returns {Promise<Array.<import('./typedef').MainResourceWithKeySystems>>}
3751
+ * @returns {Promise<Array.<MainResourceWithKeySystems>>}
3719
3752
  */
3720
3753
  static composeAkamaiResources(resources = []) {
3721
3754
  return _asyncToGenerator(function* () {
@@ -3732,9 +3765,9 @@ class SrgSsr {
3732
3765
  * Add the keySystems property to all resources
3733
3766
  * if at least one of them has DRM.
3734
3767
  *
3735
- * @param {Array.<import('../dataProvider/model/typedef').MainResource>} resources
3768
+ * @param {Array.<MainResource>} resources
3736
3769
  *
3737
- * @returns {Array.<import('./typedef').MainResourceWithKeySystems>}
3770
+ * @returns {Array.<MainResourceWithKeySystems>}
3738
3771
  */
3739
3772
  static composeKeySystemsResources(resources = []) {
3740
3773
  if (!Drm.hasDrm(resources)) return resources;
@@ -3748,7 +3781,7 @@ class SrgSsr {
3748
3781
  *
3749
3782
  * @param {MediaComposition} mediaComposition
3750
3783
  *
3751
- * @returns {Promise<Array.<import('./typedef').MainResourceWithKeySystems>>}
3784
+ * @returns {Promise<Array.<MainResourceWithKeySystems>>}
3752
3785
  */
3753
3786
  static composeMainResources(mediaComposition) {
3754
3787
  return SrgSsr.composeAkamaiResources(SrgSsr.composeKeySystemsResources(SrgSsr.filterIncompatibleResources(mediaComposition.getMainResources())));
@@ -3761,9 +3794,9 @@ class SrgSsr {
3761
3794
  * @param {any} srcObj
3762
3795
  * @param {any} srcObj.mediaData overrides or adds metadata to the composed mediaData.
3763
3796
  * @param {boolean} srcObj.disableTrackers
3764
- * @param {import('./typedef').MainResourceWithKeySystems} resource
3797
+ * @param {MainResourceWithKeySystems} resource
3765
3798
  *
3766
- * @returns {import('./typedef').ComposedSrcMediaData}
3799
+ * @returns {ComposedSrcMediaData}
3767
3800
  */
3768
3801
  static composeSrcMediaData({
3769
3802
  mediaData: srcMediaData,
@@ -3788,7 +3821,7 @@ class SrgSsr {
3788
3821
  /**
3789
3822
  * Create a new metadata text track.
3790
3823
  *
3791
- * @param {import('video.js/dist/types/player').default} player
3824
+ * @param {Player} player
3792
3825
  * @param {String} trackId Text track unique ID
3793
3826
  *
3794
3827
  * @returns {Promise<TextTrack>}
@@ -3810,7 +3843,7 @@ class SrgSsr {
3810
3843
  /**
3811
3844
  * Proxy SRG SSR chapters and intervals cuechange events at player level.
3812
3845
  *
3813
- * @param {import('video.js/dist/types/player').default} player
3846
+ * @param {Player} player
3814
3847
  */
3815
3848
  static cuechangeEventProxy(player) {
3816
3849
  player.textTracks().on('addtrack', ({
@@ -3831,7 +3864,7 @@ class SrgSsr {
3831
3864
  /**
3832
3865
  * SRG SSR data provider singleton.
3833
3866
  *
3834
- * @param {import('video.js/dist/types/player').default} player
3867
+ * @param {Player} player
3835
3868
  *
3836
3869
  * @returns {DataProvider}
3837
3870
  */
@@ -3855,7 +3888,7 @@ class SrgSsr {
3855
3888
  /**
3856
3889
  * Set an error if something goes wrong with the data provider.
3857
3890
  *
3858
- * @param {import('video.js/dist/types/player').default} player
3891
+ * @param {Player} player
3859
3892
  * @param {Object} error
3860
3893
  *
3861
3894
  * @returns {undefined|true}
@@ -3880,7 +3913,7 @@ class SrgSsr {
3880
3913
  /**
3881
3914
  * Set player error.
3882
3915
  *
3883
- * @param {import('video.js/dist/types/player').default} player
3916
+ * @param {Player} player
3884
3917
  * @param {Object} error
3885
3918
  */
3886
3919
  static error(player, {
@@ -3899,9 +3932,9 @@ class SrgSsr {
3899
3932
  /**
3900
3933
  * Filter out incompatible resources such as `RTMP` and `HDS`.
3901
3934
  *
3902
- * @param {Array.<import('../dataProvider/model/typedef').MainResource>} resources Resources to filter
3935
+ * @param {Array.<MainResource>} resources Resources to filter
3903
3936
  *
3904
- * @returns {Array.<import('../dataProvider/model/typedef').MainResource>} The filtered resources
3937
+ * @returns {Array.<MainResource>} The filtered resources
3905
3938
  */
3906
3939
  static filterIncompatibleResources(resources = []) {
3907
3940
  return resources.filter(resource => !['RTMP', 'HDS'].includes(resource.streaming));
@@ -3910,7 +3943,7 @@ class SrgSsr {
3910
3943
  /**
3911
3944
  * Get the current blocked segment from the player.
3912
3945
  *
3913
- * @param {import('video.js/dist/types/player').default} player
3946
+ * @param {Player} player
3914
3947
  *
3915
3948
  * @returns {VTTCue|undefined} The blocked segment cue object, or undefined
3916
3949
  */
@@ -3927,7 +3960,7 @@ class SrgSsr {
3927
3960
  /**
3928
3961
  * Get the VTT cue of a blocked segment.
3929
3962
  *
3930
- * @param {import('video.js/dist/types/player').default} player
3963
+ * @param {Player} player
3931
3964
  * @param {Number} currentTime
3932
3965
  *
3933
3966
  * @returns {VTTCue|undefined} The VTT cue of a blocked segment, or undefined
@@ -3957,9 +3990,9 @@ class SrgSsr {
3957
3990
  /**
3958
3991
  * Get the mediaData most likely to be compatible depending on the browser.
3959
3992
  *
3960
- * @param {Array.<import('./typedef').MainResourceWithKeySystems>} resources
3993
+ * @param {Array.<MainResourceWithKeySystems>} resources
3961
3994
  *
3962
- * @returns {import('./typedef').MainResourceWithKeySystems} By default, the first entry is used if none is compatible.
3995
+ * @returns {MainResourceWithKeySystems} By default, the first entry is used if none is compatible.
3963
3996
  */
3964
3997
  static getMediaData(resources = []) {
3965
3998
  if (AkamaiTokenService.hasToken(resources)) return resources[0];
@@ -3973,10 +4006,10 @@ class SrgSsr {
3973
4006
  /**
3974
4007
  * Get the source media object.
3975
4008
  *
3976
- * @param {import('video.js/dist/types/player').default} player
4009
+ * @param {Player} player
3977
4010
  * @param {any} srcObj
3978
4011
  *
3979
- * @returns {Promise<import('./typedef').ComposedSrcMediaData>} - The composed source media data.
4012
+ * @returns {Promise<ComposedSrcMediaData>} - The composed source media data.
3980
4013
  */
3981
4014
  static getSrcMediaObj(player, srcObj) {
3982
4015
  return _asyncToGenerator(function* () {
@@ -4008,7 +4041,7 @@ class SrgSsr {
4008
4041
  * _Note_: This function should disappear as soon as this behavior is
4009
4042
  * supported on the packaging side.
4010
4043
  *
4011
- * @param {import('video.js/dist/types/player').default} player
4044
+ * @param {Player} player
4012
4045
  * @param {number} currentTime
4013
4046
  *
4014
4047
  * @returns {number}
@@ -4040,7 +4073,7 @@ class SrgSsr {
4040
4073
  * _Note_: This function should disappear as soon as this behavior is
4041
4074
  * supported on the packaging side.
4042
4075
  *
4043
- * @param {import('video.js/dist/types/player').default} player
4076
+ * @param {Player} player
4044
4077
  * @param {number} currentTime
4045
4078
  *
4046
4079
  * @returns {number}
@@ -4062,7 +4095,7 @@ class SrgSsr {
4062
4095
  * - handle blocking reasons
4063
4096
  * - add remote subtitles
4064
4097
  *
4065
- * @param {import('video.js/dist/types/player').default} player
4098
+ * @param {Player} player
4066
4099
  * @param {any} srcObj
4067
4100
  * @param {function} next
4068
4101
  *
@@ -4088,7 +4121,7 @@ class SrgSsr {
4088
4121
  /**
4089
4122
  * SRG SSR analytics singleton.
4090
4123
  *
4091
- * @param {import('video.js/dist/types/player').default} player
4124
+ * @param {Player} player
4092
4125
  */
4093
4126
  static srgAnalytics(player) {
4094
4127
  if (player.options().trackers.srgAnalytics === false) return;
@@ -4109,7 +4142,7 @@ class SrgSsr {
4109
4142
  /**
4110
4143
  * PillarboxMonitoring monitoring singleton.
4111
4144
  *
4112
- * @param {import('video.js/dist/types/player').default} player
4145
+ * @param {Player} player
4113
4146
  *
4114
4147
  * @returns {PillarboxMonitoring} instance of PillarboxMonitoring
4115
4148
  */
@@ -4133,8 +4166,8 @@ class SrgSsr {
4133
4166
  /**
4134
4167
  * Update player's poster.
4135
4168
  *
4136
- * @param {import('video.js/dist/types/player').default} player
4137
- * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj
4169
+ * @param {Player} player
4170
+ * @param {ComposedSrcMediaData} srcMediaObj
4138
4171
  * @param {Image} imageService
4139
4172
  */
4140
4173
  static updatePoster(player, srcMediaObj, imageService = Image) {
@@ -4146,8 +4179,8 @@ class SrgSsr {
4146
4179
  /**
4147
4180
  * Update player titleBar with title and description.
4148
4181
  *
4149
- * @param {import('video.js/dist/types/player').default} player
4150
- * @param {import('./typedef').ComposedSrcMediaData} srcMediaObj
4182
+ * @param {Player} player
4183
+ * @param {ComposedSrcMediaData} srcMediaObj
4151
4184
  */
4152
4185
  static updateTitleBar(player, srcMediaObj) {
4153
4186
  if (!player.titleBar) return;
@@ -4160,7 +4193,7 @@ class SrgSsr {
4160
4193
  /**
4161
4194
  * Middleware to resolve SRG SSR URNs into playable media.
4162
4195
  *
4163
- * @param {import('video.js/dist/types/player').default} player
4196
+ * @param {Player} player
4164
4197
  *
4165
4198
  * @returns {Object}
4166
4199
  */
@@ -4191,5 +4224,5 @@ pillarbox.options.srgOptions = {
4191
4224
  tagCommanderScriptURL: undefined
4192
4225
  };
4193
4226
 
4194
- export { Player, SrgSsr, pillarbox as default };
4227
+ export { DataProvider, MediaComposition, PillarboxMonitoring, Player, SRGAnalytics, SrgSsr, pillarbox as default };
4195
4228
  //# sourceMappingURL=pillarbox.es.js.map