Publish for Seamless Play and external javascript
January 6, 2022 12:00 AM
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
Solution
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.
Discussion (4)
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.
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);
}
Have you tried using the document instead of the window?
triv$(getDisplayDocument()).find(".bg").addClass("blue");
The following is information for publishing with seamless play not enabled.
With the help from an expert at eLearning Brothers, I've found that using the following code in bottom of the file scripting will work.
getDisplayWindow().enableAutoStart = function (cb){ cb(); }
When using this code, the course will:
Autoplay the audio in desktop with no Tap/Click to continue for Firefox.
Require the user to click the audio player to play without the Tap/Click to continue.
For more info on disablign the Tap/Click here - Play Button feature, see:
https://rockstars.elearningbrothers.com/discussion/comment/447231#Comment_447231