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

Monday, September 16th 2019, 10:23pm

Soundinterface Problem!

Hello there.
Inexperienced question, but please help! I cannot play the audio file.

I'm doing the same with the current example.
I stay this:
<! - board ->
<preview url = "preview.jpg" />
<Image>
<cube url = "board_% s.jpg" />
</ Image>
I'm adding a scene instead. When the audio file is running after this insert :(
file attached.

What code is wrong?
I'd appreciate it if you help.

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
<krpano version="1.19" title="Virtual Tour">
	<include url="skin/vtourskin.xml" /> 	<!-- customize skin settings: maps, gyro, webvr, thumbnails, tooltips, layout, design, ... -->	
<skin_settings maps="true"	               maps_type="google"	               maps_bing_api_key=""	               maps_google_api_key=""	               maps_zoombuttons="false"	               gyro="true"	               webvr="true"	               webvr_gyro_keeplookingdirection="false"	               webvr_prev_next_hotspots="true"	               littleplanetintro="false"	               title="true"	               thumbs="true"	               thumbs_width="120" thumbs_height="80" thumbs_padding="10" thumbs_crop="0|40|240|160"	               thumbs_opened="false"	               thumbs_text="false"	               thumbs_dragging="true"	               thumbs_onhoverscrolling="false"	               thumbs_scrollbuttons="false"	               thumbs_scrollindicator="false"	               thumbs_loop="false"	               tooltips_buttons="false"	               tooltips_thumbs="false"	               tooltips_hotspots="false"	               tooltips_mapspots="false"	               deeplinking="false"	               loadscene_flags="MERGE"	               loadscene_blend="OPENBLEND(0.5, 0.0, 0.75, 0.05, linear)"	               loadscene_blend_prev="SLIDEBLEND(0.5, 180, 0.75, linear)"	               loadscene_blend_next="SLIDEBLEND(0.5,   0, 0.75, linear)"	               loadingtext="loading..."	               layout_width="100%"	               layout_maxwidth="814"	               controlbar_width="-24"	               controlbar_height="40"	               controlbar_offset="20"	               controlbar_offset_closed="-40"	               controlbar_overlap.no-fractionalscaling="10"	               controlbar_overlap.fractionalscaling="0"	               design_skin_images="vtourskin.png"	               design_bgcolor="0x2D3E50"	               design_bgalpha="0.8"	               design_bgborder="0"	               design_bgroundedge="1"	               design_bgshadow="0 4 10 0x000000 0.3"	               design_thumbborder_bgborder="3 0xFFFFFF 1.0"	               design_thumbborder_padding="2"	               design_thumbborder_bgroundedge="0"	               design_text_css="color:#FFFFFF; font-family:Arial;"	               design_text_shadow="1"	               />

<!-- load the soundinterface plugin -->	
<plugin name="soundinterface"	
	url.flash="%SWFPATH%/plugins/soundinterface.swf"	
	url.html5="%SWFPATH%/plugins/soundinterface.js"	
	rootpath=""	
	preload="false"	
	keep="true"	
 />	

 <!-- start playing the sound -->	
	<events name="currentpano"	        onnewpano="playsound(bgsnd, 'https://krpano.com/panos/xmas/ding_dong_merrily_on_high.mp3|https://krpano.com/panos/xmas/ding_dong_merrily_on_high.ogg', 0);"	        onremovepano="stopsound(bgsnd);"			keep="true"	        />

	<!-- 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_Hol1" title="Hol1" onstart="" thumburl="panos/Hol1.tiles/thumb.jpg" lat="41.09616667" lng="28.77355556" heading="0.0">

  <view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />

  <preview url="panos/Hol1.tiles/preview.jpg" />

  <image type="CUBE" prealign="0|0.0|0" multires="true" tilesize="512">			<level tiledimagewidth="2048" tiledimageheight="2048">				<cube url="panos/Hol1.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />			</level>			<level tiledimagewidth="1024" tiledimageheight="1024">				<cube url="panos/Hol1.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />			</level>		
</image>

   <plugin name="snd" url="soundonoff.png" 
	align="leftbottom" x="10" y="10" alpha="0.25" 			scale="0.5" 
	onover="tween(alpha,1);" 
	onout="tween(alpha,0.25);"	
	crop="0|0|50|50"	
	onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50); "	
	keep="true"					        /> 

 </scene>
 </krpano>
muhammed has attached the following file:
  • ses.xml (4.39 kB - 4 times downloaded - latest: Sep 18th 2019, 5:21pm)

This post has been edited 7 times, last edit by "muhammed" (Sep 17th 2019, 9:10am)


2

Wednesday, September 18th 2019, 10:00am

Hi,

that events element here:

Source code

1
<events name="currentpano"	
will get removed when loading the first scene.

To avoid that either move that element inside the <scene> or add keep="true" to it.

Best regards,
Klaus

3

Wednesday, September 18th 2019, 10:28pm

Thank you for your interest, Klaus.
I did what he said, but I couldn't get him to work again.

Source code

1
2
3
<events name="currentpano"
...
keep="true" 	        />


I think I'm doing something wrong. I wonder where?

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
<krpano version="1.19" title="Virtual Tour">
	<include url="skin/vtourskin.xml" />
	<!-- load the soundinterface plugin -->	
<plugin name="soundinterface"	
	 url.flash="%SWFPATH%/plugins/soundinterface.swf"	
	 url.html5="%SWFPATH%/plugins/soundinterface.js"	
	 rootpath=""	
	 preload="false"	        	        />					
<!-- start playing the sound -->	
<events name="currentpano"	
	 onnewpano="playsound(bgsnd, 'https://krpano.com/panos/xmas/ding_dong_merrily_on_high.mp3|https://krpano.com/panos/xmas/ding_dong_merrily_on_high.ogg', 0);"	        onremovepano="stopsound(bgsnd);"			
	keep="true" 	        />
	<!-- a button to pause/play the sound -->	
	<plugin name="snd" 
	url="soundonoff.png" 
	align="leftbottom" x="10" y="10" alpha="0.25" 			
	scale="0.5" onover="tween(alpha,1);" 			
	onout="tween(alpha,0.25);"	
	crop="0|0|50|50"	
	onclick="pausesoundtoggle(bgsnd); switch(crop, 0|0|50|50, 0|50|50|50);"			
	keep="true"	
 /> 	 	

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

<!-- startup action - load the first scene -->		
	<scene name="scene_Hol1" title="Hol1" onstart="" thumburl="panos/Hol1.tiles/thumb.jpg" lat="41.09616667" lng="28.77355556" heading="0.0"> 		
	<view hlookat="0.0" vlookat="0.0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" />
		<preview url="panos/Hol1.tiles/preview.jpg" />
		<image type="CUBE" prealign="0|0.0|0" multires="true" tilesize="512">			<level tiledimagewidth="2048" tiledimageheight="2048">				
	<cube url="panos/Hol1.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" />			</level>			<level tiledimagewidth="1024" tiledimageheight="1024">				
	<cube url="panos/Hol1.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" />			</level>		
	</image> 	
	</scene>	
 </krpano>

Similar threads