thexerteproject / xerteonlinetoolkits

Xerte Online Toolkits
www.xerte.org.uk
Apache License 2.0
62 stars 61 forks source link

add event sequence options to hotspot connector so can trigger audio then jump to page #1284

Open ronm123 opened 5 months ago

ronm123 commented 5 months ago

Question on forums and my example with custom code https://xerte.org.uk/index.php/en/forum/developers/3279-creating-a-hotspot-to-play-sound-and-then-move-to-another-page

If you add both a sound and a destination page option the current code only plays the sound. The OP wanted a sound to play e.g. key and door opening and then jump to the destination e.g. for escape room.

At the moment if you add a Text option for the hotspot as well as a destination page then again only one of them works e.g. the text window displays but the page doesn't navigate to the destination when you close that window. I could foresee a scenario where you might want the sound to play, then the pop-up and then when the pop-up is closed navigate to the destination e.g. an option to sequence the resulting actions.

FayCross commented 5 months ago

At the moment you can add many optional properties to a hotspot but only one of these will be used. In priority order, these are: video, audio, image, text, iframe, new window, external destination page and finally destination (internal page).

I think for most of those, if you wanted to have some content shown and then move to a destination page afterwards the best thing to do would be to use the text option, add the content there (even if video etc. as you could add embed code) and then add a link at bottom of text that took you to destination page. Not sure from user experience point of view it would be great to move page when you click close button as that seems counterintuitive. The only one that couldn't be set up like that would be sound - so auto playing sound when hotspot clicked and then moving to destination page/showing extra content after audio finished. Adding new functionality to page to allow this for audio wouldn't be too hard.