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 b67f3d7
Show file tree
Hide file tree
Showing 6 changed files with 318 additions and 83 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 b67f3d7

Please sign in to comment.