@srgssr/pillarbox-web 1.26.0 → 1.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/dist/pillarbox-core.cjs +1 -1
- package/dist/pillarbox-core.es.js +1 -1
- package/dist/pillarbox.cjs +28 -11
- package/dist/pillarbox.cjs.map +1 -1
- package/dist/pillarbox.es.js +28 -11
- package/dist/pillarbox.es.js.map +1 -1
- package/dist/pillarbox.umd.js +28 -11
- 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/src/dataProvider/model/MediaComposition.d.ts +7 -1
- package/dist/types/src/dataProvider/model/MediaComposition.d.ts.map +1 -1
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/pillarbox-core.cjs
CHANGED
package/dist/pillarbox.cjs
CHANGED
|
@@ -94,7 +94,7 @@ function _toPropertyKey(t) {
|
|
|
94
94
|
return "symbol" == typeof i ? i : i + "";
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
const version = "1.
|
|
97
|
+
const version = "1.27.0";
|
|
98
98
|
|
|
99
99
|
/** @import VJSPlayer from 'video.js/dist/types/player' */
|
|
100
100
|
/** @import AudioTrack from 'video.js/dist/types/tracks/audio-track' */
|
|
@@ -1928,7 +1928,10 @@ class PillarboxMonitoring {
|
|
|
1928
1928
|
}
|
|
1929
1929
|
this.sendEvent('ERROR', _objectSpread2(_objectSpread2({
|
|
1930
1930
|
audio,
|
|
1931
|
-
log: JSON.stringify(error.metadata ||
|
|
1931
|
+
log: JSON.stringify(error.metadata || {
|
|
1932
|
+
history: pillarbox.log.history().slice(-15),
|
|
1933
|
+
playedRanges: this.player.playedRanges()
|
|
1934
|
+
}),
|
|
1932
1935
|
message: error.message,
|
|
1933
1936
|
name: PillarboxMonitoring.errorKeyCode(error.code)
|
|
1934
1937
|
}, playbackPosition), {}, {
|
|
@@ -2384,12 +2387,16 @@ class PillarboxMonitoring {
|
|
|
2384
2387
|
const stream_type = isFinite(this.player.duration()) ? 'On-demand' : 'Live';
|
|
2385
2388
|
const stall = this.stallInfo();
|
|
2386
2389
|
const subtitles = this.currentTextTrack();
|
|
2390
|
+
const log = JSON.stringify({
|
|
2391
|
+
playedRanges: this.player.playedRanges()
|
|
2392
|
+
});
|
|
2387
2393
|
const data = {
|
|
2388
2394
|
audio,
|
|
2389
2395
|
bandwidth,
|
|
2390
2396
|
bitrate,
|
|
2391
2397
|
buffered_duration,
|
|
2392
2398
|
frame_drops,
|
|
2399
|
+
log,
|
|
2393
2400
|
playback_duration,
|
|
2394
2401
|
position,
|
|
2395
2402
|
position_timestamp,
|
|
@@ -2762,6 +2769,8 @@ class MediaComposition {
|
|
|
2762
2769
|
tokenType: resource.tokenType,
|
|
2763
2770
|
url: resource.url,
|
|
2764
2771
|
urn: this.chapterUrn,
|
|
2772
|
+
validFrom: this.getMainValidFromDate(),
|
|
2773
|
+
validTo: this.getMainValidToDate(),
|
|
2765
2774
|
vendor: this.getMainChapter().vendor
|
|
2766
2775
|
}));
|
|
2767
2776
|
}
|
|
@@ -2794,19 +2803,27 @@ class MediaComposition {
|
|
|
2794
2803
|
/**
|
|
2795
2804
|
* Compute a date from which this content is valid. Always return a date object.
|
|
2796
2805
|
*
|
|
2797
|
-
* @returns {Date} date specified in media composition or
|
|
2806
|
+
* @returns {Date} date specified in media composition or undefined.
|
|
2798
2807
|
*/
|
|
2799
2808
|
getMainValidFromDate() {
|
|
2800
|
-
const mainChapter = this.getMainChapter();
|
|
2801
|
-
if (!mainChapter) {
|
|
2802
|
-
return new Date(0);
|
|
2803
|
-
}
|
|
2804
2809
|
const {
|
|
2805
2810
|
validFrom
|
|
2806
|
-
} =
|
|
2807
|
-
if (validFrom)
|
|
2808
|
-
|
|
2809
|
-
|
|
2811
|
+
} = this.getMainChapter() || {};
|
|
2812
|
+
if (!validFrom) return;
|
|
2813
|
+
return new Date(validFrom);
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
/**
|
|
2817
|
+
* Compute a date to which this content is valid. Always return a date object.
|
|
2818
|
+
*
|
|
2819
|
+
* @returns {Date} date specified in media composition or undefined.
|
|
2820
|
+
*/
|
|
2821
|
+
getMainValidToDate() {
|
|
2822
|
+
const {
|
|
2823
|
+
validTo
|
|
2824
|
+
} = this.getMainChapter() || {};
|
|
2825
|
+
if (!validTo) return;
|
|
2826
|
+
return new Date(validTo);
|
|
2810
2827
|
}
|
|
2811
2828
|
|
|
2812
2829
|
/**
|