Explore the community Forums Lectora Lectora Questions & Answers TypeError with Closed Captioning & Cornerstone On-Demand

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #393927 Score: 0
    Profile photo of SB Chapman
    SB Chapman
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    contributor
    curious george
    Group Member
    @schapman1885

    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.

     

    • This topic was modified 8 months ago by Profile photo of SB Chapman SB Chapman.
    Attachments:
    1. Test_cc.zip
    #394248 Score: 0
    Profile photo of SB Chapman
    SB Chapman
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    contributor
    curious george
    Group Member
    @schapman1885

    Update: still having the issue. Seems like part of the problem may be that the LMS has a content type server… so the code resides on one server and runs on another. That’s all I’ve gotten so far. Any help would be appreciated.

    #394330 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    251 pts
    @timk

    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();

    #394366 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    13 pts
    @CarlFink

    I’m not an expert, but as a security thing some browsers will block JS from servers other than the one serving the page (XSS=Cross-Site Scripting is a potential security point of failure). Could that be the issue here?

    #394383 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    192 pts
    @Klaatu

    Why are you loading jQuery (and a very old version at that)?

    #394387 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    106 pts
    @mnotermans5114

    COD has a setting for IE-compatibility. If thats set to a too low version, Javascript among other things will fail. Doublecheck what IE-comp setting it has, and ensure it is at least IE-11 compatible.

    #394518 Score: 0
    Profile photo of SB Chapman
    SB Chapman
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    contributor
    curious george
    Group Member
    @schapman1885

    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.

    • This reply was modified 8 months ago by Profile photo of SB Chapman SB Chapman.
    #394527 Score: 0
    Profile photo of Math Notermans
    Math Notermans
    Member
    contributor
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    LUC16 Attendee
    LUC16
    wise owl
    curious george
    106 pts
    @mnotermans5114

    You might wanna try put seamless off and test that on mobile. Just to see whether thats the issue it aint playing on mobiles. A sample to test would be good.

    #394533 Score: 0
    Profile photo of SB Chapman
    SB Chapman
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    contributor
    curious george
    Group Member
    @schapman1885

    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:

    Containing your containers: Custom JavaScript Suggestions for 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….

    #394535 Score: 0
    Profile photo of Tim K
    Tim K
    Member
    contributor
    beginner
    intermediate
    advanced
    friend finder
    junior moderator
    advocate
    wise owl
    curious george
    Group Member
    251 pts
    @timk

    Did you try the code I posted above? It should work with seamless play.

    #394537 Score: 0
    Profile photo of SB Chapman
    SB Chapman
    Member
    beginner
    intermediate
    profile
    picture perfect
    wise owl
    friend finder
    contributor
    curious george
    Group Member
    @schapman1885

    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.

    #394632 Score: 0
    Profile photo of Jason Dalrymple
    Jason Dalrymple
    Member
    beginner
    intermediate
    profile
    wise owl
    curious george
    contributor
    friend finder
    advanced
    picture perfect
    42 pts
    @JasonADal

    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.

Viewing 12 posts - 1 through 12 (of 12 total)

You must be logged in to reply to this topic.