Skip to content

Commit

Permalink
fix source for mimetype may be null #2
Browse files Browse the repository at this point in the history
  • Loading branch information
inbalvasserman committed Nov 16, 2023
1 parent 73f0848 commit 4090fd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/engines/html5/media-source/adapters/native-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4090fd4

Please sign in to comment.