Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

PelicanMedia

Anfänger

  • »PelicanMedia« ist der Autor dieses Themas

Beiträge: 10

Wohnort: Colchester, Essex, UK

  • Nachricht senden

1

Donnerstag, 31. August 2023, 20:28

Button to load end of video on previous scene

Hi,

I have a small video tour that shows hotspots and layers when the video has been completed.
I have a 'back' button, that currently restarts the current scene, but I'd like it to actually go to the end of the previous scene, and to show the hotspot and layers.

Could anyone give me some ideas on how to do this? I know there is the seek() option, but i'm not sure how to impliment it into my 'onclick=' function.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<scene name="videoScene2" blend="BLEND(0.5)" onstart="set(view.hlookat, -30);">

		<!-- GYRO BUTTON -->
		<layer name="gyrobutton" style="gyro_fixed" />

		<view fovtype="DFOV" fov="100" fovmin="100" fovmax="100" distortion="0.0" />

		<!-- include the videoplayer plugin -->
		<plugin name="video"
			url="%VIEWER%/plugins/videoplayer.js"
			videourl="01-02.mp4"
			panovideo="true"
			pausedonstart="false"
			loop="false"
			volume="0"
			muted="true"
			playsinline="true"
			onvideocomplete="delayedcall(1,
							set(hotspot[hotspot1].visible, true);
							set(layer[back].visible, true);
							)"
			preload="true"
			debugmode="false"
			/>

		<!-- use the videoplayer plugin as panoramic image source -->
		<image>
			<sphere url="plugin:video" keep="true" />
		</image>

		<hotspot name="hotspot1" style="hotspot_white" ath="-30" atv="0" onclick="looktohotspot(get(name), 100, tween(easeOutQuad, 1.0)); loadscene(videoScene3,NULL,KEEPLOOKAT,BLEND(0.5));" visible="false"/>
		
		<layer name="back" url="skin/img/back-button.png" align="rightbottom" x="10" y="10" zorder="2" scale.normal="0.4" scale.mobile="0.3" onclick="loadscene(get(scene[get(xml.scene)].name)));" visible="false" />

	</scene>

	<scene name="videoScene3" blend="BLEND(0.5)" onstart="set(view.hlookat, -30);">

		<!-- GYRO BUTTON -->
		<layer name="gyrobutton" style="gyro_fixed" />

		<view fovtype="DFOV" fov="100" fovmin="100" fovmax="100" distortion="0.0" />

		<!-- include the videoplayer plugin -->
		<plugin name="video"
			url="%VIEWER%/plugins/videoplayer.js"
			videourl="02-03.mp4"
			panovideo="true"
			pausedonstart="false"
			loop="false"
			volume="0"
			muted="true"
			playsinline="true"
			onvideocomplete="delayedcall(1,
							set(layer[back].visible, true);
							)"
			preload="true"
			debugmode="false"
			/>

		<!-- use the videoplayer plugin as panoramic image source -->
		<image>
			<sphere url="plugin:video" keep="true" />
		</image>

		<layer name="back" url="skin/img/back-button.png" align="rightbottom" x="10" y="10" zorder="2" scale.normal="0.4" scale.mobile="0.3" onclick="loadscene(get(scene[get(xml.scene)].name)));" visible="false" />

	</scene>