I am working on a website that has two versions: desktop and phone.
I’m embedding videos with JWplayer and when using Javascript instead of iFrame, it doesn’t work. The space where the video is supposed to be is literally empty.
The obvious solution would be sticking to iFrames, which works OK for the desktop version. But in the phone version (width=375) the clickable elements don’t work correctly. It’s as if the layout is in a different position (inaccessible) than what it shows on the screen. You have to click at the top left corner of the video to start it, whereas the big play button is at the center.
Something interesting is that whenever I test the phone version in my computer, everything works OK. When I deploy it and try it on phones is when problems arise.
So my questions are:
- Why does the JS embed not show?
- Why are the control elements displaced? Code is the same for both desktop and phone versions, and the phone version works as expected when testing it with the computer.