Sie sind nicht angemeldet.

1

Freitag, 11. November 2016, 20:57

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!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »BOX« (11. November 2016, 21:30)


2

Sonntag, 13. November 2016, 16:23

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

3

Sonntag, 13. November 2016, 17:16

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?

4

Montag, 14. November 2016, 16:20

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

5

Montag, 14. November 2016, 16:50

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!

6

Montag, 14. November 2016, 17:36

That doesn't work - the browser itself knows where the event is coming from - and calling video play is only allowed in direct consequence of an user event.

7

Dienstag, 15. November 2016, 08:47

That doesn't work - the browser itself knows where the event is coming from - and calling video play is only allowed in direct consequence of an user event.
K thanks, I'll try some other way

8

Mittwoch, 30. November 2016, 09:05

That doesn't work - the browser itself knows where the event is coming from - and calling video play is only allowed in direct consequence of an user event.
K thanks, I'll try some other way
Any chance you have figured out a way to do this ?

I'm trying to use a video as a transition from one pano to the next, but having to press play is really breaking the experience....