You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, November 11th 2016, 8:57pm

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!

This post has been edited 1 times, last edit by "BOX" (Nov 11th 2016, 9:30pm)


2

Sunday, November 13th 2016, 4:23pm

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

Sunday, November 13th 2016, 5:16pm

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

Monday, November 14th 2016, 4:20pm

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

Monday, November 14th 2016, 4:50pm

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

Monday, November 14th 2016, 5:36pm

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

Tuesday, November 15th 2016, 8:47am

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

Wednesday, November 30th 2016, 9:05am

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....