mlibrary / heliotrope

Codebase for Fulcrum, a Samvera-based digital publishing platform built by the University of Michigan Library
https://fulcrum.org
Apache License 2.0
45 stars 9 forks source link

Fix caption issue for Animal Acts #745

Closed mbakeryo closed 7 years ago

mbakeryo commented 7 years ago

Seems like audience response with >> with text from caption is throwing the text from showing

There are too many problems with the three solutions listed below. These are the steps to close this ticket:

mbakeryo commented 7 years ago

Upon further investigating (on staging on the video Everything I've Got), there are two problems:

Issue 1: While you can have multiple lines within one time cue, in the Transcripts section of the asset page, these lines are not separated by a break, only a hyphen.

screen shot 2017-02-09 at 9 00 10 am screen shot 2017-02-09 at 8 54 14 am

Issue 2: While you should be able to construct your WEBVTT files with sound effects by surrounding the sound with brackets, doing so will drop any additional lines within that cue.

screen shot 2017-02-09 at 9 03 01 am screen shot 2017-02-09 at 9 04 02 am

Is this potentially a problem with the stylesheet or something similar to what was causing the problem with the translations formatting not sticking when we were working on NU?

conorom commented 7 years ago

Something must be happening to the newlines etc, indicating rendering as html before the Able Player stuff kicks in. Try render plain: instead of render text: and/or adding a content type of text/plain or text/vtt. render plain: with text/vtt probably makes the most sense, assuming it works! https://makandracards.com/makandra/25019-when-using-render-text-set-a-content-type

conorom commented 7 years ago

The above controller change makes no discernible difference. I guess we can set it to plain: because of the deprecation anyway.

The main issue is that Able Player's automatic transcript generation is coded to work to meet the developer's own vision of WebVTT usage, and for us it falls short, particularly in relation to the exact items mentioned here:

There is nothing wrong with what we're doing per se, e.g. having non-verbal noises within a cue along with verbal (or other non-verbal) parts, like here: https://svs.gsfc.nasa.gov/vis/a010000/a011800/a011895/11895_Fermi_Binary_Pulsar_SRT_Captions.en_US.vtt ...but Able player expects those to sit in a cue by themselves and discards anything coming after in the div-generating JS code.

Our choices boil down to: 1) making changes in our WebVTT files. Quite a bit of hoop-jumping where brackets are used, and in the following cue, too, where I think Able Player's transcript generator expects the next voice to be introduced at the start of the next cue (see image). Then (assuming new lines in cues are important we enable data-lyrics-mode as in this example: https://ableplayer.github.io/ableplayer/demos/audio4.html https://ableplayer.github.io/ableplayer/media/paulallen_en.vtt

image

2) hacking/forking or contributing to Able Player to do automatic transcript generation the way we want. In particular we want to remove the assumption that a non-verbal part always sits on its own here: https://github.com/ableplayer/ableplayer/blob/develop/scripts/transcript.js

3) Jump through hoops the way Able Player recommends. Probably start off with an automatic transcription and edit the generated div (as suggested). We end up writing the HTML for the transcript, as in this example: https://ableplayer.github.io/ableplayer/demos/video7.html

mbakeryo commented 7 years ago

In looking at Staging, the transcript box on the asset page looks good - there is no interactive functionality, therefore, no text has been dropped.

However, on the viewer, there is now a Transcript button (next to the CC button) and when selected, the transcript pops up beside the viewer and it is the interactive version of the transcript.

screen shot 2017-02-27 at 6 47 00 am

As this version of the transcript is incorrect (truncated, etc.) can that Transcript button be deactivated? (FWIW, that button does not appear currently on the Fulcrum.org production site.)

screen shot 2017-02-27 at 6 52 24 am