diff --git a/lib/media/media_source_engine.js b/lib/media/media_source_engine.js index a5857a5d93..f1577bc591 100644 --- a/lib/media/media_source_engine.js +++ b/lib/media/media_source_engine.js @@ -392,7 +392,22 @@ shaka.media.MediaSourceEngine = class { } } const type = mimeType + this.config_.sourceBufferExtraFeatures; - const sourceBuffer = this.mediaSource_.addSourceBuffer(type); + + this.destroyer_.ensureNotDestroyed(); + + let sourceBuffer; + + try { + sourceBuffer = this.mediaSource_.addSourceBuffer(type); + } catch (exception) { + throw new shaka.util.Error( + shaka.util.Error.Severity.CRITICAL, + shaka.util.Error.Category.MEDIA, + shaka.util.Error.Code.MEDIA_SOURCE_OPERATION_THREW, + exception, + 'The mediaSource_ status was' + this.mediaSource_.readyState + + 'expected \'open\''); + } if (sequenceMode && !streamsByType.has(ContentType.TEXT)) { // There's no text stream, so we can set sequence mode early instead diff --git a/package.json b/package.json index a087a2782f..f3b01e3104 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@loomhq/shaka-player", "description": "DASH/EME video player library", - "version": "4.3.4-segments-17", + "version": "4.3.4-loomfork-20240327", "homepage": "https://github.com/shaka-project/shaka-player", "author": "Google", "maintainers": [ @@ -47,8 +47,6 @@ "karma-spec-reporter": "^0.0.34", "karma-webdriver-launcher": "^1.0.8", "lcevc_dil.js": "^1.1.20", - "less": "https://gitpkg.now.sh/joeyparrish/less.js/packages/less?28c63a43", - "less-plugin-clean-css": "github:austingardner/less-plugin-clean-css#4e9e77bf", "material-design-lite": "^1.3.0", "mux.js": "^6.2.0", "open-sans-fonts": "^1.6.2",