8 Replies
David Anderson
Matthew Bibby

There are some good ideas in this thread.

Another option is to use JavaScript to detect if the learner is using a mobile device. This way we can deliver the optimum experience based on the device they are using.

To do this:

  • Create a text variable in Storyline called device
  • Add an Execute JavaScript trigger to your slide and set it to run when the timeline starts. It should contain this code:
var player = GetPlayer();
var uagent = navigator.userAgent.toLowerCase();
var mobile = false;
var device, i;
var search_strings = ["iphone", "ipod", "ipad", "series60", "symbian",
"android", "windows ce", "windows7phone", "w7p", "blackberry", "palm"];
for (i in search_strings) {
if (uagent.search(search_strings[i]) > -1) mobile = true;
}
if (mobile) {device="Mobile"} else {device="Desktop"}
player.SetVar("device",device);
  • Then you just need to add some logic to your course. So something like:

Here is a demo (please test on both desktop and mobile). And here is the .story file used.