Trying to detect 360 Mobile Responsive player to display a specific slide

Does anyone have any ideas on how to detect that a Storyline 360 course has chosen to use the Mobile player and change a variable that triggers a layer?

Our courses begin with a static start screen that displays some visual info to help those who may not be familiar with using the player controls. Learners just click Next to get started. 

We are now starting to work with Storyline 360 and we'd like that screen to change to reflect the mobile player when learners are viewing via the mobile player (through LMS app, not AMP). This way they get info on using the Mobile player and not the Desktop player. I already have screen created that has "desktop" and "mobile" layers that can be triggered to display via a variable.  

I'm assuming there's a JavaScript approach for this since Storyline has to trigger the usage of the mobile player, I'm just not knowledgeable enough about JavaScript get it the rest of the way there. 

9 Replies
Alexandros Anoyatis

What does the LMS app show in the address bar (if there is one)?

If there's anything resembling "story_html5.html" in the output, then you should easily be able to check for that - see http://stackoverflow.com/questions/1034621/get-current-url-in-web-browser on how to do that.

If not, then - in theory - there should be a way to check whether a DIV (one related to the responsive player) is empty or not, again using JavaScript.

Hope this helps,
Alex


Edit: Actually, scrap that first solution - not applicable to 360 at all. But you should be able to identify a DIV out of the responsive player.

Alexandros Anoyatis

Most likely it's the story_html5 file that you should focus on, as that would be the page loaded when you're "allowed" to make any sort of check (i.e. story.html will decide what to redirect to, but until that redirect happens, no user defined JS is loaded).

Are you referring to the line below?

<script>window.isMobile.any&&document.body.classList.add('is-mobile')</script>