Skip to content

Commit

Permalink
fix: support manifests with Representation inside SegmentTemplate ins…
Browse files Browse the repository at this point in the history
…tead of media (#51)
  • Loading branch information
friday authored Feb 7, 2024
1 parent f8131b5 commit 2e96f88
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/manifests/utils/dashManifestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,9 @@ export default function (): DASHManifestTools {

DASH_JSON.MPD.Period.map((period) => {
period.AdaptationSet.map((adaptationSet) => {
if (adaptationSet.SegmentTemplate) {
// There should only be one segment template with this format
// If there is a SegmentTemplate directly in the adaptationSet there should only be one
// But if it has no media property it is invalid and we should try the Representation instead
if (adaptationSet.SegmentTemplate?.[0]?.$?.media) {
const segmentTemplate = adaptationSet.SegmentTemplate[0];

// Media attr
Expand Down

0 comments on commit 2e96f88

Please sign in to comment.