opencast-editor icon indicating copy to clipboard operation
opencast-editor copied to clipboard

Upload subtitle files

Open oas777 opened this issue 1 year ago • 6 comments

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.

oas777 avatar Mar 16 '23 08:03 oas777

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).

Arnei avatar Mar 24 '23 16:03 Arnei

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?

Screenshot from 2023-09-27 20-34-22

lkiesow avatar Sep 27 '23 18:09 lkiesow

Happy Hacktoberfest, Lars. Are you suggesting to skip the initial dialogue grafik and have an "Upload" section in the "undefined" box?

oas777 avatar Sep 27 '23 20:09 oas777

So what exactly we have to do in #999

Prashant04627 avatar Oct 14 '23 21:10 Prashant04627

Depends on your development skills and knowledge with the Opencast editor - mine are limited... @Arnei, can you help here?

oas777 avatar Oct 14 '23 21:10 oas777

  • 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.
  • 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"

Arnei avatar Oct 16 '23 07:10 Arnei