iOS iFramed video pano autostart touchworkarounds doesn't work

  • To my understanding the touchworkarounds works to pass any screen touch to the videoplayer to begin playing on iOS.

    The ad I'm developing opens a pano in an iFrame when the user touches the screen, but this touch doesn't pass to the pano's iFrame to trigger the touchworkaround.

    Not being able to see the source code of touchworkaround makes it very difficult to develop a workaround for the iFrame receiving this touch event.

    I think the best way would be to eith pass the touch to the iFrame element itself or to pass and receive the event through the JS postMessage/addEventListener('message') methods.

    Thanks!

    Edited once, last by BOX (November 11, 2016 at 9:30 PM).

  • Hi,

    forwarding or synthesizing an event doesn't work - only REAL users events would work.
    That's are core (security-)limitations of mobile devices and they are designed to be not bypass-able.

    Best regards,
    Klaus

    I thought that the workaround was to pass the touch event to the video element so that the video will play no matter where they click if set to auto play on iOS. Seems that your saying that passing events isn't possible and this workaround functions in a different way. Perhaps the only possible way would be to get the iFrame under the initial touch somehow. Thoughts?

  • Hi,

    the workaround itself is basically simple:
    - the viewer wait for touch events anywhere on the page (capture-phase 'touchstart/touchend' event listeners on the document)
    - and when getting them, the viewer tries to start playing the video,
    - when staring to play had worked, then these event listeners will be removed.
    That's it...

    Best regards,
    Klaus

  • Hi,

    the workaround itself is basically simple:
    - the viewer wait for touch events anywhere on the page (capture-phase 'touchstart/touchend' event listeners on the document)
    - and when getting them, the viewer tries to start playing the video,
    - when staring to play had worked, then these event listeners will be removed.
    That's it...

    Best regards,
    Klaus

    I see. Most likely document.click -> iframeContentWindow.postMessage -> iFrameContentWindow.events.message -> krpano.call.plugin.video.play won't work because of security reason? Or is it worth a try? Or shall I try something more experimental like document.touchstart -> (move iFrame under touch) -> iFrame document receives touchend event?

    Thanks!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!