Embedded (Iframe) audio recorder
August 9, 2018 12:00 AM
Hello
I have embedded an audio recorder (H5P recorder running on a wordpress site) into a lectora lesson by using an iframe (i.e. it is an html object). Ideally, I would like to change a variable when students click the record button or playback button or whatever. That would be the best. Should that not be possible (I suspect it is not) I thought that we could run an onclick action such that if the embedded page (html object) is clicked then it will modify a variable. That does not seem to work. I have thought of overlaying various parts of the iframe with objects e.g. a button or rectangle, but I don't think that we can click through to the next layer.
Any ideas would be most welcome.
Discussion (3)
Hi Andrew,
Basically you should be able to get any events from the H5P components as described here:
https://h5p.org/events
If you use the console and check your H5P component you for sure will notice some events.
Regards,
Math
What about adding an image on the page that looks like the video at start. Then a button that removes the image, starts the video, and reports a variable. Not sure why a Web Window wouldn't support an on click action. I'll through it out to the dev guys for conversation.
Initially that is an idea, but it would not work as it sets the variable only once. After initiation, when you would push the controls on the webobject, the variable won't change no more since it has no trigger. In that case you would need an extra visual lectora trigger (e.g. button) beside the player to control the Lectora variable. This would be UX wise not wishable or acceptable. Nor that it would in the way that Andrew eventually has intended?
Beside that you also need to think of the question of autoplay or not. In that case you need to think about scenarios, guides and triggers that could initiate on diferent (interactions/) moments.
I am with Math on this one. Best would be to initiate a Lectora content action through the triggering of the Webobject interaction. This can be achieved by running actionscript triggers, I mean Javascript :)... For output from lectora that would work. But on the topic of importing a variable through javascript and triggering an action within Lectora, I do not know for sure.
This would require to add a script to player element that sets and triggers a variable. Then build a script in Lectora to acquire/pass the value of that variable, or when triggered that it sets a lectora variable.
You better know your basic javascript or have a tech guy when you start on this quest.
https://www.learningsolutionsmag.com/articles/1643/tip-lectora-extensions-with-custom-javascript-you-can-do-it
https://community.trivantis.com/forums/topic/how-to-get-variables-from-external-js/
Also it much easier to think of a working UX solution if we know what Andrew eventually wants to achieve by changing the variable? (e.g. when clicked on pause a text box will pop-up telling the user that audio is paused and needs to click ok...... Very oldskool UX ;). )
In any case good luck.
Regards,
Albert
undefined
Discussions have been disabled for this post