Skip to content

Commit

Permalink
feat: Add support for changing codecs in MediaSourceEngine
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored and Álvaro Velad Galván committed May 9, 2023
1 parent fecb11a commit 4d8b9bd
Show file tree
Hide file tree
Showing 6 changed files with 362 additions and 73 deletions.
10 changes: 10 additions & 0 deletions lib/media/media_source_capabilities.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ shaka.media.Capabilities = class {
supportMap.set(type, currentSupport);
return currentSupport;
}

/**
* Determine support for SourceBuffer.changeType
* @return {boolean}
*/
static isChangeTypeSupported() {
return !!window.SourceBuffer &&
// eslint-disable-next-line no-restricted-syntax
!!SourceBuffer.prototype && !!SourceBuffer.prototype.changeType;
}
};

/**
Expand Down
Loading

0 comments on commit 4d8b9bd

Please sign in to comment.