Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support manifests with Representation inside SegmentTemplate instead of media #51

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@

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 Expand Up @@ -173,8 +174,8 @@
}

function convertRelativeToAbsoluteSegmentOffsets(
mpd: any,

Check warning on line 177 in src/manifests/utils/dashManifestUtils.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
segmentTemplate: any,

Check warning on line 178 in src/manifests/utils/dashManifestUtils.ts

View workflow job for this annotation

GitHub Actions / lint

Unexpected any. Specify a different type
originalUrlQuery: URLSearchParams,
segmentTemplateTimelineFormat: boolean
): [URLSearchParams, boolean] {
Expand Down
Loading