Picture of Cormac O'Keeffe
Formatting subtitle files
by Cormac O'Keeffe - Wednesday, 11 July 2018, 3:42 PM
 

Hi, 

I was wondering if anyone had encountered this issue and found a solution. I've been applying formatting to the subtitle files in order to highlight certain content-based, lexical, morphological, prosodic, orthographic, etc features. 

To do this, I've been using this guide https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API#Styling_WebTT_cues and https://www.speechpad.com/captions/webvtt but, when build my course, the default CSS (black background, white text overrides any styling that I've applied. 

Has anyone found a solution to this or would be generous enough to tell me what I've done wrong?

Best, 

Cormac

Picture of Matt Leathes
Re: Formatting subtitle files
by Matt Leathes - Friday, 13 July 2018, 5:18 PM
 

Hi Cormac

The video player used in the media component is mediaelement.js (v2.21.2) - and it's that which is handling displaying the captions - and I guess doesn't support what you're trying to do.

It's not something I've ever had cause to address but I guess you could probably work around this with a bit of clever CSS... just a case of doing a bit of experimentation I fear.

Either that or you could try swapping over to adapt-native-media as it doesn't use mediaelement. It's been ages since I used it but it should still work... it will definitely need updating to add support for the <track> element but that should be fairly easy to do.

Hope this helps

Picture of Cormac O'Keeffe
Re: Formatting subtitle files
by Cormac O'Keeffe - Friday, 13 July 2018, 9:13 AM
 

Hi Matt,

Thanks very much for the suggestions - some good leads already!

Best, 


Cormac