留言板 留言板

返回

pauze on mobile vertical

触发器
pauze on mobile vertical
答复
24-4-24 下午5:32
Hi,

I'm having trouble understanding the 'onlayoutchange' function and think I'm just missing something emoticon
I'm making a lesson which will not be in a LMS but just on its own webpage. As it contains some video, I want to force people using it horizontally. So when it's vertical on mobile/ipad, I want to pauze the lessen/video and show a message "rotate your device for optimal use".

I can't find the created layouts as a node, only onlayoutchange. What I'm looking for is a master with:
onLayoutChange -> if: layout = mobile portrait -> show layer X
OnLayoutChange -> if: layout = default -> hide layer X

thanks in advance
ps, really love the new vimeo tool emoticon
0 (0 票)

RE: pauze on mobile vertical
答复
24-4-24 下午6:02 回复Marcel Ooms。
Hi Marcel,
Glad you like the Vimeo object! Also, great question - knowing which layout is shown is possible, but is sort of hidden.

First of all, to show something like a mask covering the screen, you don't technically need to know which layout is currently visible. You could simply move the objects you want onto the screen when viewing the Phone Portrait layout, and then in the Default layout, move them out of the way (off the screen).

However, to play/pause the video (or to truly SHOW or HIDE objects/layers using actions), you do need to know which layout is visible in the action area. You can use the trigger page.onLayoutChange and page.onLoad, and then in your condition, you ask the event parameter block, which is under the Variable category, and check that against your layout name. See the attached image.
0 (0 票)

RE: pauze on mobile vertical
答复
24-4-25 上午9:14 回复Navdeep Dhillon。
Hi,

This is perfect, I would have never found the 'phone portrait' as event parameter.
The only downside is that I now need to make a list with all the videos in it to use this function (pausing all videos) on a master on the entire course, but I guess this is doable with the 'set video id' block.

Thank you so much for your help emoticon
0 (0 票)

RE: pauze on mobile vertical
答复
24-4-25 下午4:21 回复Marcel Ooms。
Hi Marcel,
You could probably use tags to pause any video. And then, if you only have one video per page, you can tell any Vimeo object tagged to play when it's back in Default layout. Things get a little more complicated if you have multiple videos on the same page (a blanket pause command is fine, but to play you need to know WHICH video to play). Here's a sample action (see image).

Let me if that makes sense. If not, I can record a quick video.
0 (0 票)

RE: pauze on mobile vertical
答复
24-4-29 下午12:36 回复Navdeep Dhillon。
awesome, this is exactly what I was looking for!

I've got another small off topic question, but I can't get the hyperlinks to work in the new SB version on a object (on a smarttext it works fine). And also the popup/frame always opens a new tab on the parent (_new blanc), but that last thing might be because I'm not understanding completely how it works emoticon. I've read the SBmanual on hyperlinks, but it doens't really tell how the different options work

Thanks in advance for all your help and advice! emoticon 
0 (0 票)

RE: pauze on mobile vertical
答复
24-4-29 下午5:21 回复Marcel Ooms。
Hi Marcel,
What are you attaching the hyperlink to? Button, Hotspot, regular Text? See the attached image for the hyperlink settings, you might be doing it differently.

Also, where are you testing this? In Preview, links may be blocked, or always forced into a new window, so you might need to publish the lesson (and possibly host it) to get it to behave properly.

Lastly, what do you want it to do? Replace the current window? Create a popup?

If your situation is more complicated (dynamic link generated via actions?), maybe email us a copy of your lesson and let us know what page to look at (or create a simple case) and we can take a look. We'll post back here with our findings once we have a solution.
0 (0 票)

RE: pauze on mobile vertical
答复
24-10-17 下午4:03 回复Navdeep Dhillon。
Hi,

I've been using this for a lot of my elearnings now and I love that it is possible, but the way it works is a bit different than I expected. But maybe I'm doing something wrong

So most of my elearnings have a horizontal layout (1280x720) and vertical (Phone portrait 405x720). But I've noticed when the elearnings is seen on a screen which has a width smaller than 720, or when it is seen in a iframe smaller than 720, or you zoom in on your browsers till the widow is smaller than the original 720xzoom, it automatically goes to phone, eventhough it is a horizontal windows. 
I think it does:
if 'window width' < lesson width --> show phone layout
While I actually want:
if 'window width' > 'window height' --> show horizontal (no matter what the lesson size, so horizontal screens are always horizontal and vertical screens always vertical)

I was curious why it works like this. I guess it has to do with the 'scale to width and height' setting in the lesson setting, but was wondering if there is a workaround (without making our horizontal lesson smaller or adding more dimensions) for it.

Thanks in advance
0 (0 票)

RE: pauze on mobile vertical
答复
24-10-17 下午5:48 回复Marcel Ooms。
Hi Marcel,
We'll have to look into this and get back to you. It might be that modern browsers have removed some of the indicators that we used to use to force Desktop layouts on Desktops, and now it's just going by size.
0 (0 票)