@srgssr/pillarbox-web 1.19.1 → 1.21.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 +1 -1
- package/dist/pillarbox-core.es.js +1 -1
- package/dist/pillarbox.cjs.js +41 -1
- package/dist/pillarbox.cjs.js.map +1 -1
- package/dist/pillarbox.es.js +41 -1
- package/dist/pillarbox.es.js.map +1 -1
- package/dist/pillarbox.umd.js +41 -1
- package/dist/pillarbox.umd.js.map +1 -1
- package/dist/pillarbox.umd.min.js +9 -9
- package/dist/pillarbox.umd.min.js.map +1 -1
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts +12 -0
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts.map +1 -1
- package/package.json +1 -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.20.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
|
|
|
@@ -73207,6 +73207,17 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73207
73207
|
return PillarboxMonitoring.secondsToMilliseconds(bufferDuration);
|
|
73208
73208
|
}
|
|
73209
73209
|
|
|
73210
|
+
/**
|
|
73211
|
+
* Gets the language of the current audio track.
|
|
73212
|
+
*
|
|
73213
|
+
* @returns {string|undefined} The language of the current audio track, or undefined if no audio track is available or if the language is not set.
|
|
73214
|
+
*/
|
|
73215
|
+
currentAudioTrack() {
|
|
73216
|
+
const audioTrack = this.player.audioTrack();
|
|
73217
|
+
if (!audioTrack || !audioTrack.language) return;
|
|
73218
|
+
return audioTrack.language;
|
|
73219
|
+
}
|
|
73220
|
+
|
|
73210
73221
|
/**
|
|
73211
73222
|
* Get the current representation when playing a Dash or Hls media.
|
|
73212
73223
|
*
|
|
@@ -73272,22 +73283,37 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73272
73283
|
return this.player.currentSource().mediaData;
|
|
73273
73284
|
}
|
|
73274
73285
|
|
|
73286
|
+
/**
|
|
73287
|
+
* Gets the language of the current text track (subtitles or captions).
|
|
73288
|
+
*
|
|
73289
|
+
* @returns {string|undefined} The language of the current text track, or undefined if no text track is available or if the language is not set.
|
|
73290
|
+
*/
|
|
73291
|
+
currentTextTrack() {
|
|
73292
|
+
const textTrack = this.player.textTrack();
|
|
73293
|
+
if (!textTrack || !textTrack.language) return;
|
|
73294
|
+
return textTrack.language;
|
|
73295
|
+
}
|
|
73296
|
+
|
|
73275
73297
|
/**
|
|
73276
73298
|
* Handles player errors by sending an `ERROR` event, then resets the session.
|
|
73277
73299
|
*/
|
|
73278
73300
|
error() {
|
|
73301
|
+
const audio = this.currentAudioTrack();
|
|
73279
73302
|
const error = this.player.error();
|
|
73280
73303
|
const playbackPosition = this.playbackPosition();
|
|
73281
73304
|
const representation = this.currentRepresentation();
|
|
73282
73305
|
const url = representation ? representation.uri : this.player.currentSource().src;
|
|
73306
|
+
const subtitles = this.currentTextTrack();
|
|
73283
73307
|
if (!this.player.hasStarted()) {
|
|
73284
73308
|
this.sendEvent('START', this.startEventData());
|
|
73285
73309
|
}
|
|
73286
73310
|
this.sendEvent('ERROR', _objectSpread2(_objectSpread2({
|
|
73311
|
+
audio,
|
|
73287
73312
|
log: JSON.stringify(error.metadata || pillarbox.log.history().slice(-15)),
|
|
73288
73313
|
message: error.message,
|
|
73289
73314
|
name: PillarboxMonitoring.errorKeyCode(error.code)
|
|
73290
73315
|
}, playbackPosition), {}, {
|
|
73316
|
+
subtitles,
|
|
73291
73317
|
url
|
|
73292
73318
|
}));
|
|
73293
73319
|
this.reset();
|
|
@@ -73721,6 +73747,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73721
73747
|
* @returns {StatusEventData} The current event data
|
|
73722
73748
|
*/
|
|
73723
73749
|
statusEventData() {
|
|
73750
|
+
const audio = this.currentAudioTrack();
|
|
73724
73751
|
const bandwidth = this.bandwidth();
|
|
73725
73752
|
const buffered_duration = this.bufferDuration();
|
|
73726
73753
|
const {
|
|
@@ -73737,7 +73764,9 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73737
73764
|
} = this.playbackPosition();
|
|
73738
73765
|
const stream_type = isFinite(this.player.duration()) ? 'On-demand' : 'Live';
|
|
73739
73766
|
const stall = this.stallInfo();
|
|
73767
|
+
const subtitles = this.currentTextTrack();
|
|
73740
73768
|
const data = {
|
|
73769
|
+
audio,
|
|
73741
73770
|
bandwidth,
|
|
73742
73771
|
bitrate,
|
|
73743
73772
|
buffered_duration,
|
|
@@ -73747,6 +73776,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
73747
73776
|
position_timestamp,
|
|
73748
73777
|
stall,
|
|
73749
73778
|
stream_type,
|
|
73779
|
+
subtitles,
|
|
73750
73780
|
url
|
|
73751
73781
|
};
|
|
73752
73782
|
return data;
|
|
@@ -74333,6 +74363,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74333
74363
|
const JOURNALISTIC$4 = "Dieser Inhalt steht aus publizistischen Gründen vorübergehend nicht zur Verfügung.";
|
|
74334
74364
|
const LEGAL$4 = "Dieser Inhalt ist aus rechtlichen Gründen nicht verfügbar.";
|
|
74335
74365
|
const STARTDATE$4 = "Dieser Inhalt ist noch nicht verfügbar. Bitte probieren Sie es später noch einmal.";
|
|
74366
|
+
const VPNORPROXYDETECTED$4 = "Dieser Inhalt ist mit VPN oder Proxy nicht abspielbar.";
|
|
74336
74367
|
const UNKNOWN$4 = "Dieser Inhalt ist nicht verfügbar.";
|
|
74337
74368
|
const pillarboxLang$4 = {
|
|
74338
74369
|
AGERATING12: AGERATING12$4,
|
|
@@ -74343,6 +74374,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74343
74374
|
JOURNALISTIC: JOURNALISTIC$4,
|
|
74344
74375
|
LEGAL: LEGAL$4,
|
|
74345
74376
|
STARTDATE: STARTDATE$4,
|
|
74377
|
+
VPNORPROXYDETECTED: VPNORPROXYDETECTED$4,
|
|
74346
74378
|
UNKNOWN: UNKNOWN$4
|
|
74347
74379
|
};
|
|
74348
74380
|
|
|
@@ -74492,6 +74524,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74492
74524
|
const JOURNALISTIC$3 = "This content is temporarily unavailable for journalistic reasons.";
|
|
74493
74525
|
const LEGAL$3 = "This content is not available due to legal restrictions.";
|
|
74494
74526
|
const STARTDATE$3 = "This content is not available yet.";
|
|
74527
|
+
const VPNORPROXYDETECTED$3 = "This content cannot be played while using a VPN or a proxy.";
|
|
74495
74528
|
const UNKNOWN$3 = "This content is not available.";
|
|
74496
74529
|
const pillarboxLang$3 = {
|
|
74497
74530
|
AGERATING12: AGERATING12$3,
|
|
@@ -74502,6 +74535,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74502
74535
|
JOURNALISTIC: JOURNALISTIC$3,
|
|
74503
74536
|
LEGAL: LEGAL$3,
|
|
74504
74537
|
STARTDATE: STARTDATE$3,
|
|
74538
|
+
VPNORPROXYDETECTED: VPNORPROXYDETECTED$3,
|
|
74505
74539
|
UNKNOWN: UNKNOWN$3
|
|
74506
74540
|
};
|
|
74507
74541
|
|
|
@@ -74650,6 +74684,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74650
74684
|
const JOURNALISTIC$2 = "Ce contenu est temporairement indisponible pour des raisons éditoriales.";
|
|
74651
74685
|
const LEGAL$2 = "Pour des raisons juridiques, ce contenu n'est pas disponible.";
|
|
74652
74686
|
const STARTDATE$2 = "Ce contenu n'est pas encore disponible. Veuillez réessayer plus tard.";
|
|
74687
|
+
const VPNORPROXYDETECTED$2 = "Ce contenu ne peut pas être lu avec un VPN ou un proxy.";
|
|
74653
74688
|
const UNKNOWN$2 = "Ce contenu n'est actuellement pas disponible.";
|
|
74654
74689
|
const pillarboxLang$2 = {
|
|
74655
74690
|
AGERATING12: AGERATING12$2,
|
|
@@ -74660,6 +74695,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74660
74695
|
JOURNALISTIC: JOURNALISTIC$2,
|
|
74661
74696
|
LEGAL: LEGAL$2,
|
|
74662
74697
|
STARTDATE: STARTDATE$2,
|
|
74698
|
+
VPNORPROXYDETECTED: VPNORPROXYDETECTED$2,
|
|
74663
74699
|
UNKNOWN: UNKNOWN$2
|
|
74664
74700
|
};
|
|
74665
74701
|
|
|
@@ -74797,6 +74833,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74797
74833
|
const JOURNALISTIC$1 = "Questo contenuto è temporaneamente non disponibile per motivi editoriali.";
|
|
74798
74834
|
const LEGAL$1 = "Il contenuto non è fruibile a causa di restrizioni legali.";
|
|
74799
74835
|
const STARTDATE$1 = "Il contenuto non è ancora disponibile. Per cortesia prova più tardi.";
|
|
74836
|
+
const VPNORPROXYDETECTED$1 = "Questo contenuto non può essere riprodotto con VPN o proxy.";
|
|
74800
74837
|
const UNKNOWN$1 = "Questo media non è disponibile.";
|
|
74801
74838
|
const pillarboxLang$1 = {
|
|
74802
74839
|
AGERATING12: AGERATING12$1,
|
|
@@ -74807,6 +74844,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74807
74844
|
JOURNALISTIC: JOURNALISTIC$1,
|
|
74808
74845
|
LEGAL: LEGAL$1,
|
|
74809
74846
|
STARTDATE: STARTDATE$1,
|
|
74847
|
+
VPNORPROXYDETECTED: VPNORPROXYDETECTED$1,
|
|
74810
74848
|
UNKNOWN: UNKNOWN$1
|
|
74811
74849
|
};
|
|
74812
74850
|
|
|
@@ -74857,6 +74895,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74857
74895
|
const JOURNALISTIC = "Quest cuntegn na stat ad interim betg a disposiziun per motivs publicistics.";
|
|
74858
74896
|
const LEGAL = "Quest cuntegn n'è betg disponibel perquai ch'el è scadì.";
|
|
74859
74897
|
const STARTDATE = "Quest cuntegn n'è betg anc disponibel. Empruvai pli tard.";
|
|
74898
|
+
const VPNORPROXYDETECTED = "Quest cuntegn na po betg vegnir reproducì cun VPN ni proxy activà.";
|
|
74860
74899
|
const UNKNOWN = "Quest cuntegn n'è betg disponibel.";
|
|
74861
74900
|
const pillarboxLang = {
|
|
74862
74901
|
"Audio Player": "Audio-Player",
|
|
@@ -74949,6 +74988,7 @@ ${segmentInfoString(segmentInfo)}`); // If there's an init segment associated wi
|
|
|
74949
74988
|
JOURNALISTIC: JOURNALISTIC,
|
|
74950
74989
|
LEGAL: LEGAL,
|
|
74951
74990
|
STARTDATE: STARTDATE,
|
|
74991
|
+
VPNORPROXYDETECTED: VPNORPROXYDETECTED,
|
|
74952
74992
|
UNKNOWN: UNKNOWN
|
|
74953
74993
|
};
|
|
74954
74994
|
|