-
Notifications
You must be signed in to change notification settings - Fork 6k
Description
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?