Hi there,
I have a custom button, which I gave some functions using Wix-Code. It hides a strip and starts playing the video that is beneath the strip by using the „play“ function.
You can check out the functionality here: https://www.peterschier.com/home-test
Now, my problem. Everything works fine in Windows 10 – the overlapping strip hides and the video starts to play. But the play function does not work on mobile devices at all - it starts somehow loading the video, but the video does not play.
Is there a way how to get this running, like it works in Windows also on all other devices and browsers by using a different code?
My code, that works in Windows looks like this:
let fadeOptions = { "duration": 500 }; export function iconButton1_click(event) { $w("#videoPlayer1").play(); $w("#columnStrip4").hide("fade", fadeOptions); }
Hope someone can help
Thanks
Peter
Hi Peter. Did you have any luck fixing this ridiculous issue? My site is also suffering from it despite trying numerous methods I've been unable to remedy it.
For something to work on a certain device only, like Mobile devices only, then you need to be using the Wix Window API and the formFactor function.
https://www.wix.com/corvid/reference/wix-window.html#formFactor
You can see examples here.
https://support.wix.com/en/article/corvid-writing-code-that-only-runs-on-mobile-devices
https://support.wix.com/en/article/corvid-tutorial-displaying-elements-in-mobile-only