Islandora-Labs / islandora_solution_pack_oralhistories

Adds all required Fedora objects to allow users to ingest and retrieve Oral Histories (video/audio) files through the Islandora interface
GNU General Public License v3.0
13 stars 23 forks source link

TRANSCRIPT vtt file does not specify language code in CC interface #71

Closed kimpham54 closed 7 years ago

kimpham54 commented 7 years ago

Description Ingesting an oral history with a TRANSCRIPT vtt does not provide a language code. Would be nice to specify a language code in the file or have the ability to change the language code in the CC options after the fact.

Steps to Reproduce

  1. Ingest audio/oral with webvtt file
  2. Go to interface, select CC

Expected Behaviour A closed caption option with the appropriate language code is displayed.

Actual Behaviour A blank closed caption option is available (captions do work)

Notes Tested with vtt files called MEDIATRACK.vtt, MEDIATRACK_en.vtt, MEDIATRACK_fr.vtt This happens only when you ingest an audio/oral history for the first time. If you ingest MEDIATRACK files after uploading just the audio/oral content first, the correct language appears. If you ingest TRANSCRIPT xml first, the generated MEDIATRACK appears with an 'en' language default. If you ingest TRANSCRIPT xml first then add MEDIATRACK_fr, MEDIATRACK_hi, the correct language option appears for those datastreams.

Natkeeran commented 7 years ago

@kimpham54

If the user uploads the oral history with TRANSCRIPT vtt, we can get the language from the file name. Would that work? For instance, they can specify MEDIATRACK_fr.vtt. If no language is specified, then will default to English.

kimpham54 commented 7 years ago

@Natkeeran what will the filename need to look like? Will something like this be implemented for TRANSCRIPT xml files too (see https://github.com/digitalutsc/islandora_solution_pack_oralhistories/issues/70)?

Natkeeran commented 7 years ago

Currently, we simply convert (string)$cue->transcript into the default MEDIATRACK datastream. We would have to make that configurable, so that a MEDIATRACK can be generated from a specified cue/element.

We may have to specify the language of that cue as well in the configuration.

Natkeeran commented 7 years ago

@kimpham54 , here is a partial solution: https://github.com/digitalutsc/islandora_solution_pack_oralhistories/tree/issue_70

If you upload a transcript vtt with a filename extension indicating the language (i.e MEDIATRACK_fr.vtt), and you have fr as default, it will display fr by default.

With respect to vtts that get created from xml, pls see my previous comments. It is related to https://github.com/digitalutsc/islandora_solution_pack_oralhistories/issues/70

kimpham54 commented 7 years ago

addressed with https://github.com/digitalutsc/islandora_solution_pack_oralhistories/pull/89.