Skip to content

Commit

Permalink
fix: For text content is not necessary codec switching (#5731)
Browse files Browse the repository at this point in the history
Fixes #5730
  • Loading branch information
avelad authored Oct 5, 2023
1 parent 6156dce commit bdbaae5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -1778,6 +1778,9 @@ shaka.media.MediaSourceEngine = class {
* @private
*/
async codecSwitchIfNecessary_(contentType, stream, streamsByType) {
if (contentType == shaka.util.ManifestParserUtils.ContentType.TEXT) {
return false;
}
const MimeUtils = shaka.util.MimeUtils;
const currentCodec = MimeUtils.getCodecBase(
MimeUtils.getCodecs(this.sourceBufferTypes_[contentType]));
Expand Down Expand Up @@ -1840,6 +1843,9 @@ shaka.media.MediaSourceEngine = class {
* @private
*/
isCodecSwitchNecessary_(contentType, stream) {
if (contentType == shaka.util.ManifestParserUtils.ContentType.TEXT) {
return false;
}
const MimeUtils = shaka.util.MimeUtils;
const currentCodec = MimeUtils.getCodecBase(
MimeUtils.getCodecs(this.sourceBufferTypes_[contentType]));
Expand Down

0 comments on commit bdbaae5

Please sign in to comment.