Hi ...
Thank you so much for looking at my problem.
What I want is exactly your new example:
http://www.virtualtuur.com/krpano/audio/scene2/tour.html (the music goes from pano two to three without stopping).
What misery ... I can't do that for my virtual visit. This one comprises 26 panos so I made a virtual visit with three panos to better understand.
This is my tour.xml
|
Source code
|
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
<krpano version="1.19" title="Virtual Tour">
<include url="skin/vtourskin.xml" />
<include url="audioplayer/audioplayer.xml" />
<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->
<!-- startup action - load the first scene -->
<action name="startup" autorun="onstart">
if(startscene === null OR !scene[get(startscene)], copy(startscene,scene[0].name); );
loadscene(get(startscene), null, MERGE);
if(startactions !== null, startactions() );
</action>
<scene name="scene_Atelier" title="Atelier" audio="gamma.mp3" onstart="" havevrimage="true" thumburl="panos/Atelier.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/Atelier.tiles/preview.jpg" />
<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
<level tiledimagewidth="4160" tiledimageheight="4160">
<cube url="panos/Atelier.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="2112" tiledimageheight="2112">
<cube url="panos/Atelier.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1024" tiledimageheight="1024">
<cube url="panos/Atelier.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
</level>
</image>
<image if="webvr.isenabled">
<cube url="panos/Atelier.tiles/vr/pano_%s.jpg" />
</image>
<!-- place your scene hotspots here -->
</scene>
<scene name="scene_Cellule_18" title="Cellule 18" audio="oligouttes.mp3" onstart="" havevrimage="true" thumburl="panos/Cellule_18.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/Cellule_18.tiles/preview.jpg" />
<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
<level tiledimagewidth="4160" tiledimageheight="4160">
<cube url="panos/Cellule_18.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="2112" tiledimageheight="2112">
<cube url="panos/Cellule_18.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1024" tiledimageheight="1024">
<cube url="panos/Cellule_18.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
</level>
</image>
<image if="webvr.isenabled">
<cube url="panos/Cellule_18.tiles/vr/pano_%s.jpg" />
</image>
<!-- place your scene hotspots here -->
</scene>
<scene name="scene_Cellule_21" title="Cellule 21" audio="oligouttes.mp3" onstart="" havevrimage="true" thumburl="panos/Cellule_21.tiles/thumb.jpg" lat="" lng="" heading="">
<view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
<preview url="panos/Cellule_21.tiles/preview.jpg" />
<image type="CUBE" multires="true" tilesize="512" if="!webvr.isenabled">
<level tiledimagewidth="4160" tiledimageheight="4160">
<cube url="panos/Cellule_21.tiles/%s/l3/%0v/l3_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="2112" tiledimageheight="2112">
<cube url="panos/Cellule_21.tiles/%s/l2/%0v/l2_%s_%0v_%0h.jpg" />
</level>
<level tiledimagewidth="1024" tiledimageheight="1024">
<cube url="panos/Cellule_21.tiles/%s/l1/%0v/l1_%s_%0v_%0h.jpg" />
</level>
</image>
<image if="webvr.isenabled">
<cube url="panos/Cellule_21.tiles/vr/pano_%s.jpg" />
</image>
<!-- place your scene hotspots here -->
</scene>
</krpano>
|
In your third scene you did not write audio = "song title.mp3"? I tried with or without and the result is the same ?
I then created a folder and in it I put a folder with my music and a file audioplayer.xml
With this one I have no music!!!
|
Source code
|
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
|
<krpano>
<plugin name="soundinterface"
keep="true"
url="../plugins/soundinterface.js"
preload="true"
rootpath=""
volume="1.0"
mute="false"
/>
<events name="audio" keep="true" onnewscene="PlayAudio" />
<action name="PlayAudio">
if(scene[get(xml.scene)].name == scene_Atelier,
set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
playsound(sound1,get(_audio));
);
if(scene[get(xml.scene)].name == scene_Cellule_18,
if((_audio == null) OR (_audio == 'audioplayer/audio/gamma.mp3'),
set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
playsound(sound1,get(_audio));
);
);
ifnot((scene[get(xml.scene)].name == scene_Atelier) OR (scene[get(xml.scene)].name == scene_Cellule_18),
if((_audio == null) OR (_audio == 'audioplayer/audio/gamma.mp3'),
set(_audio, calc:'audioplayer/audio/' + scene[scene_Cellule_18].audio);
playsound(sound1,get(_audio));
);
);
</action>
</krpano>
|
And with this one, I have music but
It starts again with each new pano
|
Source code
|
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
|
<krpano>
<plugin name="soundinterface"
keep="true"
url="../plugins/soundinterface.js"
preload="true"
rootpath=""
volume="1.0"
mute="false"
/>
<events name="audio" keep="true" onnewscene="PlayAudio" />
<action name="PlayAudio">
set(_audio, calc:'audioplayer/audio/' + scene[get(xml.scene)].audio);
if(scene[get(xml.scene)].audio,
playsound(sound1,get(_audio));
,
stopsound(sound1);
);
</action>
</krpano>
|
I must be really bad to fail to reproduce your codes

.
Thanks in advance for telling me where the problem comes from.
Best regards
JP