AVAnnotate / admin-client

Application for building AVAnnotate websites
0 stars 0 forks source link

Infer duration from AV file when possible #32

Closed camdendotlol closed 1 month ago

camdendotlol commented 3 months ago

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.