@srgssr/pillarbox-web 1.15.1 → 1.15.2
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 +16 -2
- package/dist/pillarbox.cjs.js.map +1 -1
- package/dist/pillarbox.es.js +16 -2
- package/dist/pillarbox.es.js.map +1 -1
- package/dist/pillarbox.umd.js +16 -2
- package/dist/pillarbox.umd.js.map +1 -1
- package/dist/pillarbox.umd.min.js +8 -8
- package/dist/pillarbox.umd.min.js.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 +1 -1
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.1";
|
|
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
|
*
|