TypeError with Closed Captioning & Cornerstone On-Demand

schapman1885
Community Member Posts: 53
I have several courses to which I have added closed captions using the WebVTT method. I use a button to all the learner to turn the CC on/off. Tested in scorm cloud, works like a champ. Client loaded into SCOD and we're getting a
[OnMClkRunJS] TypeError: Cannot read property 'click' of null
Error on the button to turn the CC on/off.
The button performs the following:
1)Shows button to turn off CC
2) Hides itself
3) runs JS:
var mePl = parent.document.getElementsByClassName("mejs-container")[0].id;
var mePlId = mePl + "_captions_en";
parent.document.getElementById(mePlId).click();
4) Sets flag to know that CC is On, for use on following pages (if they have video to turn CC on accordingly.)
The course is published with: SCORM 1.2, seamless play on, responsive off. I'm not sure where to go from here.
[OnMClkRunJS] TypeError: Cannot read property 'click' of null
Error on the button to turn the CC on/off.
The button performs the following:
1)Shows button to turn off CC
2) Hides itself
3) runs JS:
var mePl = parent.document.getElementsByClassName("mejs-container")[0].id;
var mePlId = mePl + "_captions_en";
parent.document.getElementById(mePlId).click();
4) Sets flag to know that CC is On, for use on following pages (if they have video to turn CC on accordingly.)
The course is published with: SCORM 1.2, seamless play on, responsive off. I'm not sure where to go from here.
Comments
-
-
Very difficult to troubleshoot if it only happens in the LMS and I don't know Cornerstone. It seems like the JS can't find the radio button to click. You could try to use getDisplayDocument() instead of "parent.document". You could also try to get the butttons directly. As long as you have only one video the ids will always be the same:
getDisplayDocument().getElementById("mep_0_captions_en").click();
-
-
First, thanks to everyone who responded.
It seems that the error was.... the client didn't move the .vtt file associated with the closed captions to the LMS server and their server didn't recognize the MIME type. Anyway, we've gotten past this hoop. Now, on to why we cannot run these on mobile devices (ipad, iphone android).
mnotermans.... any ideas on a mobile device deployment. I get a light blue screen and then nothing.
Klaatu - not a good answer, but, I will research this. Do you think I don't need to load it at all or a newer version?
CarlFink - yes!! This is probably the issue.
timk - I have different videos in some of my .awts and noticed that the id changed every time I went back into a page, so I was trying to pick it up each time I needed it. -
-
Math, it is a problem with the seamless play. Unfortunately, the course design really requires the seamless play.
So, the issue is... similar to the one described here for Lectora Online:
http://community.trivantis.com/knowledge-base/containing-containers-custom-javascript-suggestions-lectora-online/
You can't use window.top in COD... it freaks out. I changed the reference in the trivantis.js to window.parent...and off we go, it works as expected in scorm cloud, now to test on COD... I don't really like overwriting files like this...but, we've done some really thorough troubleshooting and were able to isolate exactly where the issue occurs. So, it's hard to ignore.... -
They added the .vtt document to the LMS and updated the MIME types...then, it worked. Once they moved it to an area that I could see, I was able to determine that they hadn't included the closed caption file... the button was working and executing part of the actions, just couldn't turn the CC on.
-
I encountered a similar issue when I published to Pathlore. All of my captions were in SRT (which is the only option for output from Camtasia) and Pathlore was not picking up the captions. I tried XML and that worked like a charm, so I wonder if Pathlore has the same "limitation".
If you do ever want to convert to XML, I found a great site (SRT to XML for JW Player) - the only drawback is that you can only do one at a time. When I use it, I add a checkmark to No CDATA, as it's easier to read in case I need to make edits.
Categories
- 35.8K All Categories
- 108 ✫ Announcements
- 33.1K Lectora®
- 31.1K Lectora Discussions
- 28.9K Lectora Desktop
- 2K Lectora Online
- 2K Lectora Feature Requests
- 71 Lectora User Groups
- 36 Lectora Accessibility User Group (LAUG)
- 22 ELB Learning Content
- 22 ELB Learning Content Discussions
- 321 CenarioVR®
- 188 CenarioVR Discussions
- 133 CenarioVR Feature Requests
- 41 Rockstar Learning Platform®
- 38 Rockstar Learning Platform Discussions
- 108 CourseMill®
- 108 CourseMill Discussions
- 47 ReviewLink®
- 47 ReviewLink Discussions
- 5 The Training Arcade®
- 5 The Training Arcade Discussions
- 934 All Things eLearning
- 36 eLearning Development
- 546 Learning Management System (LMS) Integration
- 332 Web Accessibility
- 1.2K ♪ The Green Room
- 9 Additional Learning Products