player icon indicating copy to clipboard operation
player copied to clipboard

Dash Audio only Playlist - Cannot read properties of undefined (reading 'bitrateList')

Open Benny739 opened this issue 1 year ago • 2 comments

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)

Benny739 avatar Oct 05 '24 01:10 Benny739

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);

wintercounter avatar Mar 23 '25 18:03 wintercounter

We have also met with the problem. Looks like audio-only DASH manifests were not considered at all in DASHController implementation.

ZoltanDalmadi avatar Apr 02 '25 19:04 ZoltanDalmadi