@srgssr/pillarbox-web 1.15.0 → 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/README.md +117 -0
- 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 +2 -2
package/dist/pillarbox.es.js
CHANGED
|
@@ -107,7 +107,7 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
107
107
|
return target;
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const version = "1.
|
|
110
|
+
const version = "1.15.1";
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* @ignore
|
|
@@ -1890,7 +1890,7 @@ class PillarboxMonitoring {
|
|
|
1890
1890
|
this.sendEvent('ERROR', _objectSpread2(_objectSpread2({
|
|
1891
1891
|
log: JSON.stringify(error.metadata || pillarbox.log.history().slice(-15)),
|
|
1892
1892
|
message: error.message,
|
|
1893
|
-
name: error.code
|
|
1893
|
+
name: PillarboxMonitoring.errorKeyCode(error.code)
|
|
1894
1894
|
}, playbackPosition), {}, {
|
|
1895
1895
|
url
|
|
1896
1896
|
}));
|
|
@@ -2402,6 +2402,20 @@ class PillarboxMonitoring {
|
|
|
2402
2402
|
};
|
|
2403
2403
|
}
|
|
2404
2404
|
|
|
2405
|
+
/**
|
|
2406
|
+
* Returns a string representing the error key combined with its error code.
|
|
2407
|
+
*
|
|
2408
|
+
* If the error code doesn't exist the error key undefined.
|
|
2409
|
+
*
|
|
2410
|
+
* @param {number} code The error code
|
|
2411
|
+
*
|
|
2412
|
+
* @returns {string} The error key combined with its error code
|
|
2413
|
+
*/
|
|
2414
|
+
static errorKeyCode(code) {
|
|
2415
|
+
const error = ['MEDIA_ERR_CUSTOM', ...Object.keys(window.MediaError), 'MEDIA_ERR_ENCRYPTED'];
|
|
2416
|
+
return `${error[code]}: ${code}`;
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2405
2419
|
/**
|
|
2406
2420
|
* Generates a new session ID.
|
|
2407
2421
|
*
|