Currently we're trusting the user to enter the correct duration for an AV file on the Event form, and then we're not really using that info. We need to store durations because they're required for the manifest generation, so we can't just remove the field. But in order to make sure that it's accurate, we should fetch the length from the AV file and set the duration property in the background instead of showing it in the foreground.
This could probably be done with react-player, which (almost certainly) exposes some sort of duration property when it loads a file.
Note: The latest Figma designs include the ability to offer offline AV files, which will still need to show the duration input since we would have no way to pull the timestamps for those.
Currently we're trusting the user to enter the correct duration for an AV file on the Event form, and then we're not really using that info. We need to store durations because they're required for the manifest generation, so we can't just remove the field. But in order to make sure that it's accurate, we should fetch the length from the AV file and set the
duration
property in the background instead of showing it in the foreground.This could probably be done with
react-player
, which (almost certainly) exposes some sort ofduration
property when it loads a file.Note: The latest Figma designs include the ability to offer offline AV files, which will still need to show the duration input since we would have no way to pull the timestamps for those.