player
player copied to clipboard
Dash Audio only Playlist - Cannot read properties of undefined (reading 'bitrateList')
When using an audio only playlist the dash provider throws an error:
Uncaught TypeError: Cannot read properties of undefined (reading 'bitrateList')
at DASHController.onManifestLoaded_fn (vidstack-dash.js:182:18)
I'm facing the same issue. I'm removing manually the video from the manifest.
const parser = new DOMParser();
const xmlDoc = parser.parseFromString(xmlString, "text/xml");
// Remove video track from manifest
xmlDoc.querySelector("AdaptationSet[mimeType='video/mp4']")?.remove();
// Replace relative URLS with absolute URLS
xmlDoc.querySelectorAll("[initialization]")?.forEach((el) => {
el.setAttribute(
"initialization",
new URL(el.getAttribute("initialization")!, manifestUrl).href,
);
el.setAttribute(
"media",
new URL(el.getAttribute("media")!, manifestUrl).href,
);
});
const result = new XMLSerializer().serializeToString(xmlDoc);
We have also met with the problem. Looks like audio-only DASH manifests were not considered at all in DASHController implementation.