Skip to content

Add option to align durations of MergingMediaSource elements #8422

@joel1st

Description

@joel1st

I want to set up a default audio clip to play for video playback when there is no audio track present. I want this default audio source to play for the same duration as the video (downloaded mp4 file) MediaSource. My first thought was to use a ClippingMediaSource + MergingMediaSource, but the nature of this application means I do not know what the precise video duration is (unless there is a performant way to easily calculate this without playing the file). If there was a way to dynamically update the ClippingMediaSource duration this could work, but I have not found a way.

So I guess there are two questions:
Is there a way to dynamically update the duration of a ClippingMediaSource?
or is there a way to set the ClippingMediaSource duration to the be same duration as another MediaSource?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions