You are not logged in.

1

Thursday, July 7th 2016, 6:18pm

Problem with a video hotspot in VR on mobile!

Hello everyone

I'm using krpano for about a month now and I've created a more complex tour for an upcoming project. Now it seems that I've reached my limits, so I need your help.
To get an impression of what I'm talking about, here are my tour and my xml-code .

I have created a video hotspot of a coworker which you can start and pause by clicking the info-button next to him. It works great on my PC (in Chrome), even in WebVR, but as soon as I switch to my mobile devices (Android), the video just doesn't start playing.

I hope you guys can help me, I hope it's just a rookie mistake.

Best wishes
Fabian

PS: I know the code isn't really clean, but I'm fairly new to coding. Any mistakes or improvements are highly recommended ;-)

2

Saturday, January 7th 2017, 3:47am

I'm also facing the same issue... anyone have a suggestion so you don't have to touch the screen to start the video playing?

Neil

3

Saturday, January 7th 2017, 6:29pm

Hi,

the touch to enter the VR mode could be used to play (and directly pause) the video at the beginning. Resuming later a paused video is possible without user-touch. The krpano 'webvr' example works that way.

Best regards,
Klaus

4

Thursday, January 12th 2017, 8:55pm

Hi~

Any code hints on what needs to be changed for this fix to work with hotspots?

The video does play where and when it is supposed to so almost there~

Thanks in advance

5

Monday, January 16th 2017, 1:18pm

Hi~

Any code hints on what needs to be changed for this fix to work with hotspots?

The video does play where and when it is supposed to so almost there~

Thanks in advance
I'd like to know how to do this as well. Please advise. Thank you in advance everybody.

6

Monday, January 16th 2017, 10:08pm

I'm just about there:

replace all the plugin sytax with the hotspot syntax and in the actions use: hotspot[videospot] instead of plugin[video]

https://krpano.com/plugins/videoplayer/


That should get you 90% there. I still have an issue im trying work out though~

Thanks to Klause again on this one~

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Monday, January 30th 2017, 1:48pm

Hi,

this should work.

- place this in your webvr.xml
change the onclick of the layer: webvr_enterbutton to:
onclick="video_auto_start();webvr.enterVR();"

- make sure this is somewhere:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
	<events name="video_events" devices="mobile.or.tablet" keep="true"
	        onmousedown="video_auto_start();"
	        onremovepano="if(xml.scene != video_scene, hotspot[video].seek(0); hotspot[video].pause(); );"
	        />
	
			
	<action name="video_auto_start">
		if(video_auto_start !== true,
			if(hotspot[video].ispaused,
				hotspot[video].play();
				delayedcall(0.1, hotspot[video].pause() );
				set(events[video_events].onmousedown, null);
				set(video_auto_start, true);
			  );
		  );
	</action>


- This could be the onclick of your video hotspot:
onclick="if(hotspot[video].ispaused, hotspot[video].play();, hotspot[video].pause());"

Hope it helps!
Tuur *thumbsup*

8

Sunday, March 12th 2017, 12:56pm

Hi folks.

I´ve tried to implement this in my tour.
But unfourtanetly it does not work for me.

Does this work for all the video-hotspots in the entire tour?
Or does the video has to be in the pano where you start the webvr ?

I start the webvr for example in pano1 and then move through the tour to pano5 with the distorted video-hotspot.
There I´ve made play and pause buttons to start and stop the video.

But altough your code is in the right position (i think) the video won´t start.

Here is the link to my tour: http://data.kuck.info/stanton/tour.html
It´s about the fith pano in the row with an organplayer.

Any ideas ?

Thanks for your help...
Best regards ...
Christian

This post has been edited 1 times, last edit by "q-ki" (Mar 19th 2017, 12:53pm)