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 committed May 8, 2023
1 parent fecb11a commit d2cf831
Show file tree
Hide file tree
Showing 5 changed files with 311 additions and 72 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 d2cf831

Please sign in to comment.