opencast-editor
opencast-editor copied to clipboard
Upload subtitle files
In case people have edited subtitles in a third-party program, they should be able to upload them to Opencast to add to the media package or replace existing subtitles.
FYI for anyone who wants to work on this: It is likely to wise to wait for whether https://github.com/opencast/opencast-editor/pull/958 gets merged or not (or base your work off of it), as it includes substantial changes to subtitle representation in the editor (i.e. you would have to rewrite a lot of code).
Now that #958 has been merged we can get on with this. Maybe we can make uploading a file an option of the create new subtitle track view?
Happy Hacktoberfest, Lars. Are you suggesting to skip the initial dialogue
and have an "Upload" section in the "undefined" box?
So what exactly we have to do in #999
Depends on your development skills and knowledge with the Opencast editor - mine are limited... @Arnei, can you help here?
- Create UI for an upload dialog for a subtitle file
- Find a reasonable place to put the new UI
- Style the new UI so it fits with the rest of the design
- Only allow the user to upload
.vtt
files (those are the only subtitle files we support) -
.vtt
files come with basically no metadata, so either the UI should allow the user to add what is necessary, or it should be clear from context.- For example, it should be made clear somehow whether the uploaded subtitle file is for an existing "language", or for a new "language".
- And if it is for an existing "language", a warning should be displayed to the user that current subtitles for that "language" will be overwritten by the file.
- For example, it should be made clear somehow whether the uploaded subtitle file is for an existing "language", or for a new "language".
- After the user the uploads a file, it needs to be parsed into the internal state (redux).
- We already have a library and internal functions you should be able to use for that.
- In case the parsing of the file fails, an error needs to be displayed to the user.
- After adding the new subtitles into the internal state, everything else (displaying, saving) should "just work"