You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Try to play an MPD that contains AdaptationSets with an unsupported codec, for instance audio ec-3
Observed behavior
dash.js will not filter the complete AdaptationSet and tries to create a SourceBuffer for an unsupported codec
Console output
[6303][BufferController][audio] Caught error on create SourceBuffer: NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('audio/mp4;codecs="ec-3"') is unsupported.
Expected behavior
dash.js should filter unsupported AdaptationSets prior to creating the SourceBuffer. Currently filtering is only done on Representation level
function filterCodecs(type) {
const realAdaptation = adapter.getAdaptationForType(streamInfo ? streamInfo.index : null, type, streamInfo);
if (!realAdaptation || !Array.isArray(realAdaptation.Representation_asArray)) return;
// Filter codecs that are not supported
realAdaptation.Representation_asArray = realAdaptation.Representation_asArray.filter((_, i) => {
// keep at least codec from lowest representation
if (i === 0) return true;
const codec = adapter.getCodec(realAdaptation, i, true);
if (!capabilities.supportsCodec(codec)) {
logger.error('[Stream] codec not supported: ' + codec);
return false;
}
return true;
});
}
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce
Observed behavior
dash.js will not filter the complete AdaptationSet and tries to create a SourceBuffer for an unsupported codec
Console output
Expected behavior
dash.js should filter unsupported AdaptationSets prior to creating the SourceBuffer. Currently filtering is only done on Representation level
The text was updated successfully, but these errors were encountered: