@srgssr/pillarbox-web 1.17.0 → 1.18.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/dist/pillarbox-core.cjs.js +11 -6
- package/dist/pillarbox-core.cjs.js.map +1 -1
- package/dist/pillarbox-core.es.js +11 -6
- package/dist/pillarbox-core.es.js.map +1 -1
- package/dist/pillarbox.cjs.js +143 -111
- package/dist/pillarbox.cjs.js.map +1 -1
- package/dist/pillarbox.es.js +144 -112
- package/dist/pillarbox.es.js.map +1 -1
- package/dist/pillarbox.umd.js +143 -111
- package/dist/pillarbox.umd.js.map +1 -1
- package/dist/pillarbox.umd.min.js +1 -1
- package/dist/pillarbox.umd.min.js.map +1 -1
- package/dist/types/build.es.d.ts +5 -1
- package/dist/types/build.es.d.ts.map +1 -1
- package/dist/types/src/components/player.d.ts +7 -8
- package/dist/types/src/components/player.d.ts.map +1 -1
- package/dist/types/src/dataProvider/model/MediaComposition.d.ts +12 -0
- package/dist/types/src/dataProvider/model/MediaComposition.d.ts.map +1 -1
- package/dist/types/src/dataProvider/services/DataProvider.d.ts +3 -3
- package/dist/types/src/dataProvider/services/DataProvider.d.ts.map +1 -1
- package/dist/types/src/middleware/srgssr.d.ts +76 -73
- package/dist/types/src/middleware/srgssr.d.ts.map +1 -1
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts +15 -8
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts.map +1 -1
- package/dist/types/src/trackers/SRGAnalytics.d.ts +55 -55
- package/dist/types/src/trackers/SRGAnalytics.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/types/src/components/typedef.d.ts +0 -14
- package/dist/types/src/components/typedef.d.ts.map +0 -1
- package/dist/types/src/middleware/typedef.d.ts +0 -67
- package/dist/types/src/middleware/typedef.d.ts.map +0 -1
package/dist/pillarbox.umd.js
CHANGED
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
return target;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
const version$8 = "1.
|
|
113
|
+
const version$8 = "1.17.0";
|
|
114
114
|
|
|
115
115
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
116
116
|
|
|
@@ -71477,9 +71477,14 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71477
71477
|
|
|
71478
71478
|
eme.VERSION = version;
|
|
71479
71479
|
|
|
71480
|
+
/** @import VJSPlayer from 'video.js/dist/types/player' */
|
|
71481
|
+
/** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
|
|
71482
|
+
/** @import TextTrack from 'video.js/dist/types/tracks/text-track' */
|
|
71483
|
+
/** @import {TrackSelector} from './typedef' */
|
|
71484
|
+
|
|
71480
71485
|
/**
|
|
71481
71486
|
* @ignore
|
|
71482
|
-
* @type {typeof
|
|
71487
|
+
* @type {typeof VJSPlayer}
|
|
71483
71488
|
*/
|
|
71484
71489
|
const vjsPlayer = videojs.getComponent('player');
|
|
71485
71490
|
|
|
@@ -71514,7 +71519,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71514
71519
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/kind
|
|
71515
71520
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/AudioTrack/language
|
|
71516
71521
|
*
|
|
71517
|
-
* @param {
|
|
71522
|
+
* @param {TrackSelector} [trackSelector]
|
|
71518
71523
|
*
|
|
71519
71524
|
* @example
|
|
71520
71525
|
* // Get the current audio track
|
|
@@ -71528,7 +71533,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71528
71533
|
* // Activate first audio track found corresponding to language
|
|
71529
71534
|
* player.audioTrack({language:'fr'});
|
|
71530
71535
|
*
|
|
71531
|
-
* @return {
|
|
71536
|
+
* @return {AudioTrack | undefined} The
|
|
71532
71537
|
* currently enabled audio track. See {@link https://docs.videojs.com/audiotrack}.
|
|
71533
71538
|
*/
|
|
71534
71539
|
audioTrack(trackSelector) {
|
|
@@ -71638,7 +71643,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71638
71643
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/TextTrack/kind
|
|
71639
71644
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/textTrack/language
|
|
71640
71645
|
*
|
|
71641
|
-
* @param {
|
|
71646
|
+
* @param {TrackSelector} [trackSelector]
|
|
71642
71647
|
*
|
|
71643
71648
|
* @example
|
|
71644
71649
|
* // Get the current text track
|
|
@@ -71657,7 +71662,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71657
71662
|
* // Activate first text track found corresponding to language
|
|
71658
71663
|
* player.textTrack({language:'fr'});
|
|
71659
71664
|
*
|
|
71660
|
-
* @return {
|
|
71665
|
+
* @return {TextTrack | undefined} The
|
|
71661
71666
|
* currently enabled text track. See {@link https://docs.videojs.com/texttrack}.
|
|
71662
71667
|
*/
|
|
71663
71668
|
textTrack(trackSelector) {
|
|
@@ -71776,10 +71781,11 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71776
71781
|
*/
|
|
71777
71782
|
pillarbox.options.trackers = {};
|
|
71778
71783
|
|
|
71784
|
+
/** @import MediaComposition from '../model/MediaComposition.js' */
|
|
71785
|
+
|
|
71779
71786
|
/**
|
|
71780
71787
|
* Represents a data provider for constructing URLs and handling requests.
|
|
71781
71788
|
* @class
|
|
71782
|
-
* @ignore
|
|
71783
71789
|
*/
|
|
71784
71790
|
class DataProvider {
|
|
71785
71791
|
/**
|
|
@@ -71807,7 +71813,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71807
71813
|
*
|
|
71808
71814
|
* @param {Function} urlHandler A function that constructs the URL
|
|
71809
71815
|
*
|
|
71810
|
-
* @returns {Promise<
|
|
71816
|
+
* @returns {Promise<MediaComposition>} A promise with the fetched data
|
|
71811
71817
|
*/
|
|
71812
71818
|
handleRequest(urlHandler) {
|
|
71813
71819
|
var _this = this;
|
|
@@ -71819,7 +71825,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
71819
71825
|
throw response;
|
|
71820
71826
|
}
|
|
71821
71827
|
|
|
71822
|
-
/** @type {
|
|
71828
|
+
/** @type {MediaComposition} */
|
|
71823
71829
|
const data = yield response.json();
|
|
71824
71830
|
return data;
|
|
71825
71831
|
});
|
|
@@ -72208,67 +72214,65 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
72208
72214
|
*/
|
|
72209
72215
|
const WAITING = 'waiting';
|
|
72210
72216
|
|
|
72217
|
+
/** @import Player from 'video.js/dist/types/player' */
|
|
72218
|
+
|
|
72211
72219
|
/* eslint max-lines-per-function: ["error", 200] */
|
|
72212
72220
|
/* eslint max-statements: ["error", 20]*/
|
|
72213
72221
|
/* eslint complexity: ["error", 10]*/
|
|
72222
|
+
|
|
72214
72223
|
/**
|
|
72215
|
-
* SRG analytics
|
|
72216
|
-
* @class SRGAnalytics
|
|
72217
|
-
* @ignore
|
|
72224
|
+
* The SRG analytics class tracks media playback according to the standard defined by SRG SSR.
|
|
72218
72225
|
*
|
|
72219
|
-
*
|
|
72220
|
-
* JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js
|
|
72226
|
+
* @class SRGAnalytics
|
|
72221
72227
|
*
|
|
72222
72228
|
* ### Official documentation
|
|
72223
|
-
* Variables list
|
|
72224
|
-
* @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Datalayer+for+media+players
|
|
72225
72229
|
*
|
|
72226
|
-
*
|
|
72227
|
-
* @
|
|
72230
|
+
* - [New variable list]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/1009353309/Labels+check+for+migration+of+integration+layer+in+SAM}
|
|
72231
|
+
* - [Variables list]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795904478/Datalayer+for+media+players}
|
|
72232
|
+
* - [Standard event sequences]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795904171/standard+streaming+events+sequence+of+events+for+media+player+actions}
|
|
72233
|
+
* - [Review of Standard Media Actions]{@link https://srgssr-ch.atlassian.net/wiki/spaces/INTFORSCHUNG/pages/795902249/Implementation+Concept+-+draft}
|
|
72234
|
+
* - [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}
|
|
72228
72235
|
*
|
|
72229
|
-
*
|
|
72230
|
-
* @see https://confluence.srg.beecollaboration.com/display/INTFORSCHUNG/Implementation+Concept+-+draft
|
|
72236
|
+
* ### Script URL
|
|
72231
72237
|
*
|
|
72232
|
-
*
|
|
72233
|
-
* @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
|
|
72238
|
+
* JS script : https://colibri-js.akamaized.net/penguin/tc_SRGGD_11.js
|
|
72234
72239
|
*
|
|
72235
72240
|
* ### Variables list
|
|
72236
|
-
* - 'event_id', // init | play | stop | pos | pause | seek | uptime | eof
|
|
72237
|
-
* - 'event_timestamp', // Seems to be generated automatically from the documentation, but the TP overrides it
|
|
72238
|
-
* - 'event_name', // NA TP seems to not sending this variable
|
|
72239
|
-
* - 'event_source', // NA TP seems to not sending this variable
|
|
72240
|
-
* - 'event_name', // NA TP seems to not sending this variable
|
|
72241
|
-
* - 'event_value', // NA TP seems to not sending this variable
|
|
72242
|
-
* - 'navigation_environment', // prod | preprod
|
|
72243
|
-
* - 'media_subtitles_on', // string true | false
|
|
72244
|
-
* - 'media_timeshift', // need better description
|
|
72245
|
-
* - 'media_quality', // SD | HD ?
|
|
72246
|
-
* - 'media_bandwidth', // NA for the web, 64000
|
|
72247
|
-
* - 'media_volume', // from 0 to 100
|
|
72248
|
-
* - 'media_embedding_url', //
|
|
72249
|
-
* - 'media_player_name', // videojs | letterbox-web ?
|
|
72250
|
-
* - 'media_chromecast_selected', // boolean true | false
|
|
72251
|
-
* - 'media_player_version', // player's version
|
|
72252
|
-
* - 'media_player_display', // is the player mode, on the TP : inline, embed etc..
|
|
72253
|
-
* - 'media_audio_track', // NA
|
|
72254
|
-
* - 'media_position_real', // NA
|
|
72255
|
-
* - 'media_time_spent', // NA
|
|
72256
|
-
* - 'device_id', // NA
|
|
72257
|
-
* - 'user_id_log_in', // NA only RTS has log in today
|
|
72258
|
-
* - 'media_thumbnail', // Not required by the spec but sended by the TP
|
|
72259
|
-
* - 'media_bu_distributer', // Not required by the spec but sended by the TP
|
|
72260
72241
|
*
|
|
72242
|
+
* - event_id: init | play | stop | pos | pause | seek | uptime | eof
|
|
72243
|
+
* - event_timestamp: Seems to be generated automatically from the documentation, but the TP overrides it
|
|
72244
|
+
* - event_name: NA TP seems to not sending this variable
|
|
72245
|
+
* - event_source: NA TP seems to not sending this variable
|
|
72246
|
+
* - event_name: NA TP seems to not sending this variable
|
|
72247
|
+
* - event_value: NA TP seems to not sending this variable
|
|
72248
|
+
* - navigation_environment: prod | preprod
|
|
72249
|
+
* - media_subtitles_on: string true | false
|
|
72250
|
+
* - media_timeshift: need better description
|
|
72251
|
+
* - media_quality: SD | HD ?
|
|
72252
|
+
* - media_bandwidth: NA for the web, 64000
|
|
72253
|
+
* - media_volume: from 0 to 100
|
|
72254
|
+
* - media_embedding_url:
|
|
72255
|
+
* - media_player_name: videojs | letterbox-web ?
|
|
72256
|
+
* - media_chromecast_selected: boolean true | false
|
|
72257
|
+
* - media_player_version: player's version
|
|
72258
|
+
* - media_player_display: is the player mode, on the TP : inline, embed etc..
|
|
72259
|
+
* - media_audio_track: NA
|
|
72260
|
+
* - media_position_real: NA
|
|
72261
|
+
* - media_time_spent: NA
|
|
72262
|
+
* - device_id: NA
|
|
72263
|
+
* - user_id_log_in: NA only RTS has log in today
|
|
72264
|
+
* - media_thumbnail: Not required by the spec but sended by the TP
|
|
72265
|
+
* - media_bu_distributer: Not required by the spec but sended by the TP
|
|
72261
72266
|
*
|
|
72262
72267
|
* ### Sequence stories
|
|
72263
72268
|
*
|
|
72264
|
-
*
|
|
72269
|
+
* #### Story 1 (AoD/VOD-basics): A VoD is played. The user does not interact with the player. The VoD plays to its end.
|
|
72265
72270
|
*
|
|
72266
72271
|
* Hints:
|
|
72267
72272
|
* - Media sessions always start with PLAY. They end with STOP or EOF (or with PAUSE or last POS)
|
|
72268
72273
|
* - POS is sent ever 30s
|
|
72269
72274
|
*
|
|
72270
|
-
*
|
|
72271
|
-
* __Story 2 (livestream-basics A)__: A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.
|
|
72275
|
+
* #### Story 2 (livestream-basics A): A Livestream is played. The user does not interact with the player. After 61 seconds, playback is paused.
|
|
72272
72276
|
*
|
|
72273
72277
|
* Hints:
|
|
72274
72278
|
* - Media sessions always start with PLAY. They end with STOP (or, worse for data quailty, with PAUSE or last POS/UPTIME)
|
|
@@ -72276,14 +72280,12 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
72276
72280
|
* - POS is sent ever 30s, UPTIME every 60s with inital UPTIME after 30s.
|
|
72277
72281
|
* - This is the interval: 30s: POS + UPTIME; 60s: POS; 90s: POS + UPTIME; ...
|
|
72278
72282
|
*
|
|
72279
|
-
*
|
|
72280
|
-
* __Story 3 (Seeking a VoD/AoD)__: A VoD is played. User seeks in the VoD/AoD.
|
|
72283
|
+
* #### Story 3 (Seeking a VoD/AoD): A VoD is played. User seeks in the VoD/AoD.
|
|
72281
72284
|
*
|
|
72282
72285
|
* Hints:
|
|
72283
72286
|
* - 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.
|
|
72284
72287
|
*
|
|
72285
|
-
*
|
|
72286
|
-
* __Story 4 (Seeking a livestream)__: A Livestream is played. User goes back in the livestream.
|
|
72288
|
+
* #### Story 4 (Seeking a livestream): A Livestream is played. User goes back in the livestream.
|
|
72287
72289
|
*
|
|
72288
72290
|
* Hints:
|
|
72289
72291
|
* - 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.
|
|
@@ -72292,6 +72294,17 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
72292
72294
|
* 2. The value of media_position is '1'.
|
|
72293
72295
|
*/
|
|
72294
72296
|
class SRGAnalytics {
|
|
72297
|
+
/**
|
|
72298
|
+
* Creates an instance of SRGAnalytics.
|
|
72299
|
+
*
|
|
72300
|
+
* @constructor
|
|
72301
|
+
* @param {Player} player The player instance
|
|
72302
|
+
* @param {SRGAnalyticsOptions} [options={}] Configuration options
|
|
72303
|
+
* @param {boolean} [options.debug=false] Enables debug mode if set to true
|
|
72304
|
+
* @param {string} [options.environment='prod'] The environment in which the data is sent
|
|
72305
|
+
* @param {string} [options.playerVersion='none'] The version of the player
|
|
72306
|
+
* @param {string} [options.tagCommanderScriptURL='//colibri-js.akamaized.net/penguin/tc_SRGGD_11.js'] The URL for the Tag Commander script
|
|
72307
|
+
*/
|
|
72295
72308
|
constructor(player, {
|
|
72296
72309
|
debug = false,
|
|
72297
72310
|
environment = 'prod',
|
|
@@ -73019,6 +73032,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73019
73032
|
}
|
|
73020
73033
|
}
|
|
73021
73034
|
|
|
73035
|
+
/** @import Player from 'video.js/dist/types/player' */
|
|
73036
|
+
|
|
73022
73037
|
/* eslint max-statements: ["error", 25]*/
|
|
73023
73038
|
|
|
73024
73039
|
/**
|
|
@@ -73037,6 +73052,19 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73037
73052
|
* @see https://github.com/SRGSSR/pillarbox-documentation/blob/main/Specifications/monitoring.md
|
|
73038
73053
|
*/
|
|
73039
73054
|
class PillarboxMonitoring {
|
|
73055
|
+
/**
|
|
73056
|
+
* Creates an instance of PillarboxMonitoring.
|
|
73057
|
+
*
|
|
73058
|
+
* @constructor
|
|
73059
|
+
* @param {Player} player The player instance to be monitored
|
|
73060
|
+
* @param {PillarboxMonitoringOptions} [options={}] Configuration options for the monitoring
|
|
73061
|
+
* @param {string} [options.playerName='none'] The name of the player
|
|
73062
|
+
* @param {string} [options.playerVersion='none'] The version of the player
|
|
73063
|
+
* @param {string} [options.platform='Web'] The platform on which the player is running
|
|
73064
|
+
* @param {number} [options.schemaVersion=1] The version of the schema used for monitoring
|
|
73065
|
+
* @param {number} [options.heartbeatInterval=30000] The interval in milliseconds for sending heartbeat signals
|
|
73066
|
+
* @param {string} [options.beaconUrl='https://monitoring.pillarbox.ch/api/events'] The URL for the monitoring beacon
|
|
73067
|
+
*/
|
|
73040
73068
|
constructor(player, {
|
|
73041
73069
|
playerName = 'none',
|
|
73042
73070
|
playerVersion = 'none',
|
|
@@ -73859,6 +73887,19 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73859
73887
|
}
|
|
73860
73888
|
}
|
|
73861
73889
|
|
|
73890
|
+
/**
|
|
73891
|
+
* @typedef {import('./typedef').Channel} Channel
|
|
73892
|
+
* @typedef {import('./typedef').Chapter} Chapter
|
|
73893
|
+
* @typedef {import('./typedef').Episode} Episode
|
|
73894
|
+
* @typedef {import('./typedef').Resource} Resource
|
|
73895
|
+
* @typedef {import('./typedef').Segment} Segment
|
|
73896
|
+
* @typedef {import('./typedef').Show} Show
|
|
73897
|
+
* @typedef {import('./typedef').Subtitle} Subtitle
|
|
73898
|
+
* @typedef {import('./typedef').TimeInterval} TimeInterval
|
|
73899
|
+
* @typedef {import('./typedef').Topic} Topic
|
|
73900
|
+
* @typedef {import('./typedef').MainResource} MainResource
|
|
73901
|
+
*/
|
|
73902
|
+
|
|
73862
73903
|
/**
|
|
73863
73904
|
* Represents the composition of media content.
|
|
73864
73905
|
*
|
|
@@ -74147,19 +74188,6 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74147
74188
|
}
|
|
74148
74189
|
}
|
|
74149
74190
|
|
|
74150
|
-
/**
|
|
74151
|
-
* @typedef {import('./typedef').Channel} Channel
|
|
74152
|
-
* @typedef {import('./typedef').Chapter} Chapter
|
|
74153
|
-
* @typedef {import('./typedef').Episode} Episode
|
|
74154
|
-
* @typedef {import('./typedef').Resource} Resource
|
|
74155
|
-
* @typedef {import('./typedef').Segment} Segment
|
|
74156
|
-
* @typedef {import('./typedef').Show} Show
|
|
74157
|
-
* @typedef {import('./typedef').Subtitle} Subtitle
|
|
74158
|
-
* @typedef {import('./typedef').TimeInterval} TimeInterval
|
|
74159
|
-
* @typedef {import('./typedef').Topic} Topic
|
|
74160
|
-
* @typedef {import('./typedef').MainResource} MainResource
|
|
74161
|
-
*/
|
|
74162
|
-
|
|
74163
74191
|
const Play$4 = "Wiedergabe";
|
|
74164
74192
|
const Pause$4 = "Pause";
|
|
74165
74193
|
const Replay$4 = "Erneut abspielen";
|
|
@@ -74928,6 +74956,10 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74928
74956
|
const _excluded = ["url", "mimeType", "keySystems"],
|
|
74929
74957
|
_excluded2 = ["src"];
|
|
74930
74958
|
|
|
74959
|
+
/** @import Player from 'video.js/dist/types/player' */
|
|
74960
|
+
/** @import {Chapter, MainResource, Segment, Subtitle, TimeInterval} from '../dataProvider/model/typedef' */
|
|
74961
|
+
/** @import {ComposedSrcMediaData, MainResourceWithKeySystems} from './typedef' */
|
|
74962
|
+
|
|
74931
74963
|
/**
|
|
74932
74964
|
* @class SrgSsr
|
|
74933
74965
|
*/
|
|
@@ -74935,8 +74967,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74935
74967
|
/**
|
|
74936
74968
|
* Adds blocked segments to the player.
|
|
74937
74969
|
*
|
|
74938
|
-
* @param {
|
|
74939
|
-
* @param {Array<
|
|
74970
|
+
* @param {Player} player
|
|
74971
|
+
* @param {Array<Segment>} [segments=[]]
|
|
74940
74972
|
*/
|
|
74941
74973
|
static addBlockedSegments(player, segments = []) {
|
|
74942
74974
|
const trackId = 'srgssr-blocked-segments';
|
|
@@ -74958,8 +74990,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74958
74990
|
/**
|
|
74959
74991
|
* Adds remote text tracks from an array of subtitles.
|
|
74960
74992
|
*
|
|
74961
|
-
* @param {
|
|
74962
|
-
* @param {Array<
|
|
74993
|
+
* @param {Player} player
|
|
74994
|
+
* @param {Array<Subtitle>} [subtitles=[]]
|
|
74963
74995
|
*/
|
|
74964
74996
|
static addRemoteTextTracks(player, subtitles = []) {
|
|
74965
74997
|
if (!Array.isArray(subtitles)) return;
|
|
@@ -74983,9 +75015,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74983
75015
|
*
|
|
74984
75016
|
* @param {TextTrack} textTrack
|
|
74985
75017
|
* @param {
|
|
74986
|
-
*
|
|
74987
|
-
*
|
|
74988
|
-
*
|
|
75018
|
+
* Segment |
|
|
75019
|
+
* Chapter |
|
|
75020
|
+
* TimeInterval
|
|
74989
75021
|
* } data SRG SSR's cue-like representation
|
|
74990
75022
|
*/
|
|
74991
75023
|
static addTextTrackCue(textTrack, data) {
|
|
@@ -74997,8 +75029,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74997
75029
|
/**
|
|
74998
75030
|
* Add multiple text tracks to the player.
|
|
74999
75031
|
*
|
|
75000
|
-
* @param {
|
|
75001
|
-
* @param {
|
|
75032
|
+
* @param {Player} player
|
|
75033
|
+
* @param {ComposedSrcMediaData} srcMediaObj
|
|
75002
75034
|
*/
|
|
75003
75035
|
static addTextTracks(player, {
|
|
75004
75036
|
mediaData
|
|
@@ -75012,9 +75044,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75012
75044
|
/**
|
|
75013
75045
|
* Adds chapters to the player.
|
|
75014
75046
|
*
|
|
75015
|
-
* @param {
|
|
75047
|
+
* @param {Player} player
|
|
75016
75048
|
* @param {string} chapterUrn The URN of the main chapter.
|
|
75017
|
-
* @param {Array.<
|
|
75049
|
+
* @param {Array.<Chapter>} [chapters=[]]
|
|
75018
75050
|
*/
|
|
75019
75051
|
static addChapters(player, chapterUrn, chapters = []) {
|
|
75020
75052
|
const trackId = 'srgssr-chapters';
|
|
@@ -75035,8 +75067,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75035
75067
|
/**
|
|
75036
75068
|
* Adds intervals to the player.
|
|
75037
75069
|
*
|
|
75038
|
-
* @param {
|
|
75039
|
-
* @param {Array.<
|
|
75070
|
+
* @param {Player} player
|
|
75071
|
+
* @param {Array.<TimeInterval>} [intervals=[]]
|
|
75040
75072
|
*/
|
|
75041
75073
|
static addIntervals(player, intervals = []) {
|
|
75042
75074
|
const trackId = 'srgssr-intervals';
|
|
@@ -75057,8 +75089,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75057
75089
|
* Set a blocking reason according to the block reason returned
|
|
75058
75090
|
* by mediaData.
|
|
75059
75091
|
*
|
|
75060
|
-
* @param {
|
|
75061
|
-
* @param {
|
|
75092
|
+
* @param {Player} player
|
|
75093
|
+
* @param {ComposedSrcMediaData} srcMediaObj
|
|
75062
75094
|
*
|
|
75063
75095
|
* @returns {undefined|Boolean}
|
|
75064
75096
|
*/
|
|
@@ -75081,9 +75113,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75081
75113
|
* if at least one of them has tokenType
|
|
75082
75114
|
* set to Akamai.
|
|
75083
75115
|
*
|
|
75084
|
-
* @param {Array.<
|
|
75116
|
+
* @param {Array.<MainResourceWithKeySystems>} resources
|
|
75085
75117
|
*
|
|
75086
|
-
* @returns {Promise<Array.<
|
|
75118
|
+
* @returns {Promise<Array.<MainResourceWithKeySystems>>}
|
|
75087
75119
|
*/
|
|
75088
75120
|
static composeAkamaiResources(resources = []) {
|
|
75089
75121
|
return _asyncToGenerator(function* () {
|
|
@@ -75100,9 +75132,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75100
75132
|
* Add the keySystems property to all resources
|
|
75101
75133
|
* if at least one of them has DRM.
|
|
75102
75134
|
*
|
|
75103
|
-
* @param {Array.<
|
|
75135
|
+
* @param {Array.<MainResource>} resources
|
|
75104
75136
|
*
|
|
75105
|
-
* @returns {Array.<
|
|
75137
|
+
* @returns {Array.<MainResourceWithKeySystems>}
|
|
75106
75138
|
*/
|
|
75107
75139
|
static composeKeySystemsResources(resources = []) {
|
|
75108
75140
|
if (!Drm.hasDrm(resources)) return resources;
|
|
@@ -75116,7 +75148,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75116
75148
|
*
|
|
75117
75149
|
* @param {MediaComposition} mediaComposition
|
|
75118
75150
|
*
|
|
75119
|
-
* @returns {Promise<Array.<
|
|
75151
|
+
* @returns {Promise<Array.<MainResourceWithKeySystems>>}
|
|
75120
75152
|
*/
|
|
75121
75153
|
static composeMainResources(mediaComposition) {
|
|
75122
75154
|
return SrgSsr.composeAkamaiResources(SrgSsr.composeKeySystemsResources(SrgSsr.filterIncompatibleResources(mediaComposition.getMainResources())));
|
|
@@ -75129,9 +75161,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75129
75161
|
* @param {any} srcObj
|
|
75130
75162
|
* @param {any} srcObj.mediaData overrides or adds metadata to the composed mediaData.
|
|
75131
75163
|
* @param {boolean} srcObj.disableTrackers
|
|
75132
|
-
* @param {
|
|
75164
|
+
* @param {MainResourceWithKeySystems} resource
|
|
75133
75165
|
*
|
|
75134
|
-
* @returns {
|
|
75166
|
+
* @returns {ComposedSrcMediaData}
|
|
75135
75167
|
*/
|
|
75136
75168
|
static composeSrcMediaData({
|
|
75137
75169
|
mediaData: srcMediaData,
|
|
@@ -75156,7 +75188,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75156
75188
|
/**
|
|
75157
75189
|
* Create a new metadata text track.
|
|
75158
75190
|
*
|
|
75159
|
-
* @param {
|
|
75191
|
+
* @param {Player} player
|
|
75160
75192
|
* @param {String} trackId Text track unique ID
|
|
75161
75193
|
*
|
|
75162
75194
|
* @returns {Promise<TextTrack>}
|
|
@@ -75178,7 +75210,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75178
75210
|
/**
|
|
75179
75211
|
* Proxy SRG SSR chapters and intervals cuechange events at player level.
|
|
75180
75212
|
*
|
|
75181
|
-
* @param {
|
|
75213
|
+
* @param {Player} player
|
|
75182
75214
|
*/
|
|
75183
75215
|
static cuechangeEventProxy(player) {
|
|
75184
75216
|
player.textTracks().on('addtrack', ({
|
|
@@ -75199,7 +75231,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75199
75231
|
/**
|
|
75200
75232
|
* SRG SSR data provider singleton.
|
|
75201
75233
|
*
|
|
75202
|
-
* @param {
|
|
75234
|
+
* @param {Player} player
|
|
75203
75235
|
*
|
|
75204
75236
|
* @returns {DataProvider}
|
|
75205
75237
|
*/
|
|
@@ -75223,7 +75255,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75223
75255
|
/**
|
|
75224
75256
|
* Set an error if something goes wrong with the data provider.
|
|
75225
75257
|
*
|
|
75226
|
-
* @param {
|
|
75258
|
+
* @param {Player} player
|
|
75227
75259
|
* @param {Object} error
|
|
75228
75260
|
*
|
|
75229
75261
|
* @returns {undefined|true}
|
|
@@ -75248,7 +75280,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75248
75280
|
/**
|
|
75249
75281
|
* Set player error.
|
|
75250
75282
|
*
|
|
75251
|
-
* @param {
|
|
75283
|
+
* @param {Player} player
|
|
75252
75284
|
* @param {Object} error
|
|
75253
75285
|
*/
|
|
75254
75286
|
static error(player, {
|
|
@@ -75267,9 +75299,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75267
75299
|
/**
|
|
75268
75300
|
* Filter out incompatible resources such as `RTMP` and `HDS`.
|
|
75269
75301
|
*
|
|
75270
|
-
* @param {Array.<
|
|
75302
|
+
* @param {Array.<MainResource>} resources Resources to filter
|
|
75271
75303
|
*
|
|
75272
|
-
* @returns {Array.<
|
|
75304
|
+
* @returns {Array.<MainResource>} The filtered resources
|
|
75273
75305
|
*/
|
|
75274
75306
|
static filterIncompatibleResources(resources = []) {
|
|
75275
75307
|
return resources.filter(resource => !['RTMP', 'HDS'].includes(resource.streaming));
|
|
@@ -75278,7 +75310,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75278
75310
|
/**
|
|
75279
75311
|
* Get the current blocked segment from the player.
|
|
75280
75312
|
*
|
|
75281
|
-
* @param {
|
|
75313
|
+
* @param {Player} player
|
|
75282
75314
|
*
|
|
75283
75315
|
* @returns {VTTCue|undefined} The blocked segment cue object, or undefined
|
|
75284
75316
|
*/
|
|
@@ -75295,7 +75327,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75295
75327
|
/**
|
|
75296
75328
|
* Get the VTT cue of a blocked segment.
|
|
75297
75329
|
*
|
|
75298
|
-
* @param {
|
|
75330
|
+
* @param {Player} player
|
|
75299
75331
|
* @param {Number} currentTime
|
|
75300
75332
|
*
|
|
75301
75333
|
* @returns {VTTCue|undefined} The VTT cue of a blocked segment, or undefined
|
|
@@ -75325,9 +75357,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75325
75357
|
/**
|
|
75326
75358
|
* Get the mediaData most likely to be compatible depending on the browser.
|
|
75327
75359
|
*
|
|
75328
|
-
* @param {Array.<
|
|
75360
|
+
* @param {Array.<MainResourceWithKeySystems>} resources
|
|
75329
75361
|
*
|
|
75330
|
-
* @returns {
|
|
75362
|
+
* @returns {MainResourceWithKeySystems} By default, the first entry is used if none is compatible.
|
|
75331
75363
|
*/
|
|
75332
75364
|
static getMediaData(resources = []) {
|
|
75333
75365
|
if (AkamaiTokenService.hasToken(resources)) return resources[0];
|
|
@@ -75341,10 +75373,10 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75341
75373
|
/**
|
|
75342
75374
|
* Get the source media object.
|
|
75343
75375
|
*
|
|
75344
|
-
* @param {
|
|
75376
|
+
* @param {Player} player
|
|
75345
75377
|
* @param {any} srcObj
|
|
75346
75378
|
*
|
|
75347
|
-
* @returns {Promise<
|
|
75379
|
+
* @returns {Promise<ComposedSrcMediaData>} - The composed source media data.
|
|
75348
75380
|
*/
|
|
75349
75381
|
static getSrcMediaObj(player, srcObj) {
|
|
75350
75382
|
return _asyncToGenerator(function* () {
|
|
@@ -75376,7 +75408,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75376
75408
|
* _Note_: This function should disappear as soon as this behavior is
|
|
75377
75409
|
* supported on the packaging side.
|
|
75378
75410
|
*
|
|
75379
|
-
* @param {
|
|
75411
|
+
* @param {Player} player
|
|
75380
75412
|
* @param {number} currentTime
|
|
75381
75413
|
*
|
|
75382
75414
|
* @returns {number}
|
|
@@ -75408,7 +75440,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75408
75440
|
* _Note_: This function should disappear as soon as this behavior is
|
|
75409
75441
|
* supported on the packaging side.
|
|
75410
75442
|
*
|
|
75411
|
-
* @param {
|
|
75443
|
+
* @param {Player} player
|
|
75412
75444
|
* @param {number} currentTime
|
|
75413
75445
|
*
|
|
75414
75446
|
* @returns {number}
|
|
@@ -75430,7 +75462,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75430
75462
|
* - handle blocking reasons
|
|
75431
75463
|
* - add remote subtitles
|
|
75432
75464
|
*
|
|
75433
|
-
* @param {
|
|
75465
|
+
* @param {Player} player
|
|
75434
75466
|
* @param {any} srcObj
|
|
75435
75467
|
* @param {function} next
|
|
75436
75468
|
*
|
|
@@ -75456,7 +75488,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75456
75488
|
/**
|
|
75457
75489
|
* SRG SSR analytics singleton.
|
|
75458
75490
|
*
|
|
75459
|
-
* @param {
|
|
75491
|
+
* @param {Player} player
|
|
75460
75492
|
*/
|
|
75461
75493
|
static srgAnalytics(player) {
|
|
75462
75494
|
if (player.options().trackers.srgAnalytics === false) return;
|
|
@@ -75477,7 +75509,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75477
75509
|
/**
|
|
75478
75510
|
* PillarboxMonitoring monitoring singleton.
|
|
75479
75511
|
*
|
|
75480
|
-
* @param {
|
|
75512
|
+
* @param {Player} player
|
|
75481
75513
|
*
|
|
75482
75514
|
* @returns {PillarboxMonitoring} instance of PillarboxMonitoring
|
|
75483
75515
|
*/
|
|
@@ -75501,8 +75533,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75501
75533
|
/**
|
|
75502
75534
|
* Update player's poster.
|
|
75503
75535
|
*
|
|
75504
|
-
* @param {
|
|
75505
|
-
* @param {
|
|
75536
|
+
* @param {Player} player
|
|
75537
|
+
* @param {ComposedSrcMediaData} srcMediaObj
|
|
75506
75538
|
* @param {Image} imageService
|
|
75507
75539
|
*/
|
|
75508
75540
|
static updatePoster(player, srcMediaObj, imageService = Image) {
|
|
@@ -75514,8 +75546,8 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75514
75546
|
/**
|
|
75515
75547
|
* Update player titleBar with title and description.
|
|
75516
75548
|
*
|
|
75517
|
-
* @param {
|
|
75518
|
-
* @param {
|
|
75549
|
+
* @param {Player} player
|
|
75550
|
+
* @param {ComposedSrcMediaData} srcMediaObj
|
|
75519
75551
|
*/
|
|
75520
75552
|
static updateTitleBar(player, srcMediaObj) {
|
|
75521
75553
|
if (!player.titleBar) return;
|
|
@@ -75528,7 +75560,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
75528
75560
|
/**
|
|
75529
75561
|
* Middleware to resolve SRG SSR URNs into playable media.
|
|
75530
75562
|
*
|
|
75531
|
-
* @param {
|
|
75563
|
+
* @param {Player} player
|
|
75532
75564
|
*
|
|
75533
75565
|
* @returns {Object}
|
|
75534
75566
|
*/
|