diff --git a/src/engines/html5/media-source/adapters/native-adapter.js b/src/engines/html5/media-source/adapters/native-adapter.js index da5a2be20..07db3cdda 100644 --- a/src/engines/html5/media-source/adapters/native-adapter.js +++ b/src/engines/html5/media-source/adapters/native-adapter.js @@ -459,9 +459,9 @@ export default class NativeAdapter extends BaseMediaSourceAdapter { requestFilterPromise = requestFilterPromise || Promise.resolve(pkRequest); requestFilterPromise .then(updatedRequest => { - if (this._config.useSourceTag) { + if (this._sourceObj && this._config.useSourceTag) { const source = document.createElement('source'); - const mimetype = this._sourceObj ? this._sourceObj.mimetype.toLowerCase() : 'application/dash+xml'; + const mimetype = this._sourceObj.mimetype.toLowerCase(); source.setAttribute('src', updatedRequest.url); source.setAttribute('type', mimetype);