hls.js 1.5.14-0.canary.10446 → 1.5.14-0.canary.10449
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/hls.js +13 -2
- package/dist/hls.js.d.ts +1 -0
- package/dist/hls.js.map +1 -1
- package/dist/hls.light.js +13 -2
- package/dist/hls.light.js.map +1 -1
- package/dist/hls.light.min.js +1 -1
- package/dist/hls.light.min.js.map +1 -1
- package/dist/hls.light.mjs +13 -2
- package/dist/hls.light.mjs.map +1 -1
- package/dist/hls.min.js +1 -1
- package/dist/hls.min.js.map +1 -1
- package/dist/hls.mjs +13 -2
- package/dist/hls.mjs.map +1 -1
- package/dist/hls.worker.js +1 -1
- package/dist/hls.worker.js.map +1 -1
- package/package.json +2 -2
- package/src/errors.ts +2 -0
- package/src/hls.ts +11 -0
package/dist/hls.light.mjs
CHANGED
@@ -355,6 +355,7 @@ let ErrorDetails = /*#__PURE__*/function (ErrorDetails) {
|
|
355
355
|
ErrorDetails["BUFFER_NUDGE_ON_STALL"] = "bufferNudgeOnStall";
|
356
356
|
ErrorDetails["INTERNAL_EXCEPTION"] = "internalException";
|
357
357
|
ErrorDetails["INTERNAL_ABORTED"] = "aborted";
|
358
|
+
ErrorDetails["ATTACH_MEDIA_ERROR"] = "attachMediaError";
|
358
359
|
ErrorDetails["UNKNOWN"] = "unknown";
|
359
360
|
return ErrorDetails;
|
360
361
|
}({});
|
@@ -420,7 +421,7 @@ function enableLogs(debugConfig, context, id) {
|
|
420
421
|
// Some browsers don't allow to use bind on console object anyway
|
421
422
|
// fallback to default if needed
|
422
423
|
try {
|
423
|
-
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.
|
424
|
+
newLogger.log(`Debug logs enabled for "${context}" in hls.js version ${"1.5.14-0.canary.10449"}`);
|
424
425
|
} catch (e) {
|
425
426
|
/* log fn threw an exception. All logger methods are no-ops. */
|
426
427
|
return createLogger();
|
@@ -13864,7 +13865,7 @@ function changeTypeSupported() {
|
|
13864
13865
|
return typeof (sourceBuffer == null ? void 0 : (_sourceBuffer$prototy = sourceBuffer.prototype) == null ? void 0 : _sourceBuffer$prototy.changeType) === 'function';
|
13865
13866
|
}
|
13866
13867
|
|
13867
|
-
const version = "1.5.14-0.canary.
|
13868
|
+
const version = "1.5.14-0.canary.10449";
|
13868
13869
|
|
13869
13870
|
// ensure the worker ends up in the bundle
|
13870
13871
|
// If the worker should not be included this gets aliased to empty.js
|
@@ -20947,6 +20948,16 @@ class Hls {
|
|
20947
20948
|
* Attaches Hls.js to a media element
|
20948
20949
|
*/
|
20949
20950
|
attachMedia(media) {
|
20951
|
+
if (!media) {
|
20952
|
+
const error = new Error(`attachMedia failed: media argument is ${media}`);
|
20953
|
+
this.trigger(Events.ERROR, {
|
20954
|
+
type: ErrorTypes.OTHER_ERROR,
|
20955
|
+
details: ErrorDetails.ATTACH_MEDIA_ERROR,
|
20956
|
+
fatal: true,
|
20957
|
+
error
|
20958
|
+
});
|
20959
|
+
return;
|
20960
|
+
}
|
20950
20961
|
this.logger.log('attachMedia');
|
20951
20962
|
this._media = media;
|
20952
20963
|
this.trigger(Events.MEDIA_ATTACHING, {
|