Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Closed Captions don't show up in html on Chrome


I need to be able to inspect the closed caption text that is currently being displayed while on Chrome browser. This works on Firefox, but does not work on chrome.

I am using this demo page: https://support.jwplayer.com/customer/portal/articles/1407438-adding-closed-captions

This is a portion of the html that I see on Firefox:

<div style="font-size: 21px;" class="jw-captions jw-captions-enabled jw-reset">
<div style="position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; margin: 1.5%;" class="jw-text-track-container jw-reset">
<div class="jw-text-track-display jw-reset" style="text-align: center; white-space: pre-line; position: absolute; direction: ltr; writing-mode: horizontal-tb; left: 0px; width: 940.9px; top: 249.15px; bottom: 31.5px; right: 0px; height: auto;">
<div style="position: relative; left: 0px; right: 0px; top: 0px; bottom: 0px; display: inline; writing-mode: horizontal-tb;" class="jw-text-track-cue jw-reset">
What brings you to the land of the gatekeepers?
</div>
</div>
</div>
</div>

This is the same node in chrome:

<div class="jw-captions jw-captions-enabled jw-reset">
<div class="jw-captions-window jw-reset">
<span class="jw-captions-text jw-reset"></span>
</div>
</div>

Is there anything we can do to enable the text in the html, or is this an issue with jwplayer?

3 Community Answers

Alex

JW Player Support Agent  
0 rated :

Hi there,

The reason why you are unable to see the captions in the DOM in Chrome is because our player passes on the captions rendering to be handled natively by Chrome. This is not the case in Firefox where we have to handle the captions rendering so you would be able to see the captions in the DOM.

Thank you.

Joel

User  
0 rated :

Hi Alex,

Thanks for your quick response. I understand why the captions are not in the DOM in Chrome now, but is there any way to check what the current captions are in Chrome? I'm looking for an API or something that we could use in javascript to check what captions are displayed currently.

Thanks,
Joel

Alex

JW Player Support Agent  
1 rated :

Hi Joel,

There are not current API methods or other methods that I know of to be able to retrieve the actual captions text. Other customers have had success with making their own AJAX requests for the VTT file and parsing it themselves, but that is not something that we would be able to provide assistance with.

Thank you.

This question has received the maximum number of answers.