@srgssr/pillarbox-web 1.15.1 → 1.16.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 +23 -3
- package/dist/pillarbox.cjs.js.map +1 -1
- package/dist/pillarbox.es.js +23 -3
- package/dist/pillarbox.es.js.map +1 -1
- package/dist/pillarbox.min.css +1 -1
- package/dist/pillarbox.min.css.map +1 -1
- package/dist/pillarbox.umd.js +6455 -2514
- package/dist/pillarbox.umd.js.map +1 -1
- package/dist/pillarbox.umd.min.js +12 -17
- package/dist/pillarbox.umd.min.js.map +1 -1
- package/dist/types/src/middleware/srgssr.d.ts.map +1 -1
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts +10 -0
- package/dist/types/src/trackers/PillarboxMonitoring.d.ts.map +1 -1
- package/package.json +3 -3
- package/scss/components/_progress.scss +2 -5
package/dist/pillarbox.cjs.js
CHANGED
|
@@ -109,7 +109,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
109
109
|
return target;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
const version = "1.15.
|
|
112
|
+
const version = "1.15.2";
|
|
113
113
|
|
|
114
114
|
/**
|
|
115
115
|
* @ignore
|
|
@@ -1892,7 +1892,7 @@ class PillarboxMonitoring {
|
|
|
1892
1892
|
this.sendEvent('ERROR', _objectSpread2(_objectSpread2({
|
|
1893
1893
|
log: JSON.stringify(error.metadata || pillarbox.log.history().slice(-15)),
|
|
1894
1894
|
message: error.message,
|
|
1895
|
-
name: error.code
|
|
1895
|
+
name: PillarboxMonitoring.errorKeyCode(error.code)
|
|
1896
1896
|
}, playbackPosition), {}, {
|
|
1897
1897
|
url
|
|
1898
1898
|
}));
|
|
@@ -2404,6 +2404,20 @@ class PillarboxMonitoring {
|
|
|
2404
2404
|
};
|
|
2405
2405
|
}
|
|
2406
2406
|
|
|
2407
|
+
/**
|
|
2408
|
+
* Returns a string representing the error key combined with its error code.
|
|
2409
|
+
*
|
|
2410
|
+
* If the error code doesn't exist the error key undefined.
|
|
2411
|
+
*
|
|
2412
|
+
* @param {number} code The error code
|
|
2413
|
+
*
|
|
2414
|
+
* @returns {string} The error key combined with its error code
|
|
2415
|
+
*/
|
|
2416
|
+
static errorKeyCode(code) {
|
|
2417
|
+
const error = ['MEDIA_ERR_CUSTOM', ...Object.keys(window.MediaError), 'MEDIA_ERR_ENCRYPTED'];
|
|
2418
|
+
return `${error[code]}: ${code}`;
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2407
2421
|
/**
|
|
2408
2422
|
* Generates a new session ID.
|
|
2409
2423
|
*
|
|
@@ -3977,7 +3991,13 @@ class SrgSsr {
|
|
|
3977
3991
|
srcOptions = _objectWithoutProperties(srcObj, _excluded2);
|
|
3978
3992
|
const mediaComposition = yield SrgSsr.getMediaComposition(urn, SrgSsr.dataProvider(player));
|
|
3979
3993
|
const mainResources = yield SrgSsr.composeMainResources(mediaComposition);
|
|
3980
|
-
|
|
3994
|
+
let mediaData = SrgSsr.getMediaData(mainResources);
|
|
3995
|
+
if (!mediaData) {
|
|
3996
|
+
mediaData = {
|
|
3997
|
+
blockReason: mediaComposition.getMainChapter().blockReason,
|
|
3998
|
+
imageUrl: mediaComposition.getMainChapterImageUrl()
|
|
3999
|
+
};
|
|
4000
|
+
}
|
|
3981
4001
|
return SrgSsr.composeSrcMediaData(srcOptions, mediaData);
|
|
3982
4002
|
})();
|
|
3983
4003
|
}
|