Publish for Seamless Play and external javascript

chrystalb21
chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 27 ✶ Headliner ✶
Hello,
I've found that in Firefox the Tap/Click to Continue shows on every page that has audio, but if the course is published for Seamless Play, it works. My problem is that we have external javascript (using jQuery), and if we publish to Seamless play, the script we use doesn't work (example: $('.bg').addClass('blue');). I've tried using the Lectora jQuery and that doesn't work either (example: triv$('.bg',getDisplayWindow().body).addClass('blue');).

The Project Options we use are:
Project Type: AICC and SCORM for LMS
Enable Responsive Project: Not checked



Any ideas? I've attached a test course if needed.

Thanks,
Chrystal


Answers

  • chrystalb21
    chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 27 ✶ Headliner ✶
    I apologize for the bad file above. I used had updated to try using Lectora jQuery (triv$), and changed back to regular jQuery, but forgot to add back the jQuery CDN link.

    That being said, I had downloaded a demo version of Lectora on my home computer to test some things and found something interesting. The reason I was working on this was the Tap/Click to Continue issue in Firefox, but publishing with the demo version, I didn't have that problem.

    I opened the updated course that I had done with the demo version with Lectora on my work computer and republished. The issue happens again. Lectora and Firefox versions are the same.

    For both, the scripts do not work for Seamless play. I also found that an action to change contents in Lectora does not work in Seamless for either.

    Did I mention I'm the queen of Murphy's Law:)

    I've uploaded the updated version, TestJquery2.zip, which will allow for testing of both triv$ and regular jQuery (alternates per page), but also have buttons so you can force the next page to be whichever you want.

    Could someone republish with Lectora Deskop 21.0.3 (12306) and launch in Firefox 96.0.1 to see if you get the Tap/Click to Continue prompt on the last page (3)? I use the following Publish Settings.




  • timk
    timk Community Member Posts: 1,235 ✭ Legend ✭
    edited January 18, 2022
    Have you tried using the document instead of the window?

    triv$(getDisplayDocument()).find(".bg").addClass("blue");
  • chrystalb21
    chrystalb21 Community Member, Lectora® Accessibility Group (LAUG) Member, eLearning Brothers® Partner Posts: 27 ✶ Headliner ✶
    Hi Tim,

    Thanks! That did the trick for jquery with seamless.

    I did find a difference when not publishing to seamless between the demo version of Lectora and my copy (as well as a colleague's copy. That I think if we can fix that, we won't need to use seamless,

    When published, on page986.html there is the following function that is not in the Demo version of Lectora.

    function init() {
    enableAutoStart(init11);
    }