Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio captions part 2 #830

Merged
merged 3 commits into from
Apr 28, 2021
Merged

Conversation

elizoller
Copy link
Member

@elizoller elizoller commented Apr 20, 2021

What does this Pull Request do?

Provides a solution to DISPLAY the captions for audio files

What's new?

  • a small amount of javascript to move the text out of the actual audio player
  • a template change

How should this be tested?

  • spin up (or use an existing) islandora site
  • pull in this PR
  • add an audio file
  • add captions to the service file for the audio (make sure its set as the default)
  • view the node
  • press play
  • view captions with the audio file
  • should be tested in as many browsers as you can find (i tested in chrome, firefox, and safari)

Additional Notes:

This spawned out of conversation on #826 with @kayakr

You should see the text of the captions above the audio player like so:
Screen Shot 2021-04-20 at 3 06 03 PM

Interested parties

@Islandora/8-x-committers

@seth-shaw-unlv
Copy link

@elizoller, do you have an audio file with a companion caption file I can test with? (I have a bunch of audio, but no time-marked transcriptions yet.)


function init(context,settings){
if (!initialized){
console.log("hello audio");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, console.log.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -15,14 +15,18 @@
* @ingroup themeable
*/
#}
<div id="audioTrack"></div>
{#<video {{ attributes }} controls poster="http://localhost:8000/sites/default/files/2021-03/1-Service%20File.jpg">#}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: commented out <video> element.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@elizoller
Copy link
Member Author

@seth-shaw-unlv i used https://umd-mith.github.io/webvtt-player/annotations.html which @kayakr was testing with previously

@seth-shaw-unlv seth-shaw-unlv self-requested a review April 28, 2021 18:00
@seth-shaw-unlv
Copy link

Yeah.... I totally want that webvtt-player....

@elizoller
Copy link
Member Author

we could go that route if you want, it wouldn't be that hard

@seth-shaw-unlv
Copy link

As a separate PR. Let's get this merged for now.

@elizoller
Copy link
Member Author

ok, sounds good

Copy link

@seth-shaw-unlv seth-shaw-unlv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@seth-shaw-unlv seth-shaw-unlv merged commit 5bc9d04 into Islandora:8.x-1.x Apr 28, 2021
IAMlKeno pushed a commit to IAMlKeno/islandora that referenced this pull request Aug 11, 2021
* pulling the text track outside of the audio element so its not hidden
* do not set default in the template, because its an attribute that can be set in the track config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants