Trying to detect 360 Mobile Responsive player to display a specific slide
Jan 27, 2017
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
Originally posted this in the Building Better courses Discussion but moved to this area where it looks like it might get a better response.
Great question Scott - I made this observation during the beta testing how would we design help/navigation for the different players - I am subscribing to follow the answers you get.
Great Wendy. I had assumed that others must have had the same idea. I'm sure that if there's not a fix we can use now, that one will be available in the future.
Thanks,
--Scott
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.
Thanks Alex. I think where I'm mostly stuck is my own JavaScript limitations 9very mdch a novice). I have actually identified JavaScript in the story.html and story_html5 files that the decision is being made on whether to show the mobile player, but can't sort out what to do with it.
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>
Yes. There's that line and the variety of script around associated with it that seems to be triggering the use of the mobile player.
--Scott
Has anybody found a solution to this? I'm currently in the same boat. I'm trying to trigger a certain layer in Storyline only when viewed on a mobile device. We are using the latest version of Storyline 3. We do not have 360. Any help would be greatly appreciated.
I just replied to you in the other thread. Let me know if you need some help with this.
This discussion is closed. You can start a new discussion or contact Articulate Support.