You are not logged in.

1

Wednesday, October 26th 2011, 5:54pm

Massive Problems with soundinterface.js and videoplayer.js - I NEED HELP!

Hi there,

I´m almost driving crazy here with the html5-soundinterface and videoplayer. During the last three days I tried to find the correct (path)code to implement sound and video into my html5-tours, but I keep getting these messages:

ERROR: soundinterface - loading of sounds/jingle.mp3 failed!
ERROR: videos/video.mp4 - loading video failed!


The weirdest thing is that it sometimes work and other times not *wacko* If it works it just takes a slight change somewhere in the XML-Code at any place and I get above error-messages

Here´s the code I use:
Soundinterface

Source code

1
2
3
4
5
6
7
8
9
<plugin name="soundinterface"
 url="soundinterface.js" 
 rootpath="sounds" 
 preload="true" 
 keep="true" />

 <action name="play_audio"> 
 playsound(jingle,sounds/jingle.mp3,0); 
 </action>


Videoplayer

Source code

1
2
3
4
5
6
7
8
9
10
<hotspot name="video" style="hotspot" ath="100" atv="0" onclick="action(play_video)"/>	
		
		<action name="play_video">
				addplugin(video);
				set(plugin[video].url,videoplayer.js);
				set(plugin[video].videourl,videos/small.mp4);
				set(plugin[video].align,center);
				set(plugin[video].loop,false);
				set(plugin[video].onvideocomplete,removeplugin(video));
		</action>

I did try really every possibilty to set the correct path, but I keep getting the error-messages.

Here´s what I tried so far:

Videoplayer

Source code

1
2
3
...videourl,%SWFPATH%/videos/small.mp4
...videourl,'%SWFPATH%/videos/small.mp4'
...videourl,% BASEDIR%/videos/small.mp4


Soundinterface

Source code

1
2
3
4
5
6
7
... rootpath="sounds"
... rootpath="%SWFPATH%/sounds"
... rootpath="%SWFPATH%/sounds/"
playsound(jingle,jingle.mp3,0); 
playsound(jingle,sounds/jingle.mp3,0); 
playsound(jingle,%SWFPATH%/sounds/jingle.mp3,0); 
playsound(jingle,% BASEDIR%/sounds/jingle.mp3,0);


And the million dollar question is: What the heck is wrong with these plugins *confused* The Flash-versions never made any problems if the path is correct. I tried all last versions without any luck. Sometimes it works, sometimes not. And I just can´t figure out a system behind the working ones.

Desparet regards
Nupsi

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

2

Wednesday, October 26th 2011, 7:30pm

Well if your root path is set you don't need to add anything in your other path. Or you can keep rootpath empty and set your path in the function.. Do both and you get the expected result.

Try to check the documentation here.
http://krpano.com/plugins/soundinterface/#rootpath

Doing path work trial and error can lead to serious frustrations.

Source code

1
2
3
4
5
6
7
8
9
<plugin name="soundinterface"
 url="soundinterface.js" 
 rootpath="sounds" 
 preload="true" 
 keep="true" />

 <action name="play_audio"> 
 playsound(jingle,jingle.mp3,0); 
 </action>
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Wednesday, October 26th 2011, 8:24pm

Thanks for your reply, sachagriffin!
I did try it that way several times, without success. The error-message just keeps coming. Curios thing is that if I set the rootpath to "sounds" the error-message keeps looking like this:
ERROR: soundinterface - loading of jingle.mp3 failed!

but I guess it should look like this:
ERROR: soundinterface - loading of sounds/jingle.mp3 failed!

because the path to the "jingle.mp3" has been set to "sounds/jingle.mp3" with the rootpath-tag?!? I just don´t get where or what the problem is. I tried different mp3-files which all worked fine in the flash-version without any luck.

Best regards
Nupsi

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

4

Wednesday, October 26th 2011, 8:58pm

Just remove rootpath all together and try

playsound(jingle,%SWFPATH%/sounds/jingle.mp3,0);

You hasn't detailed your structure, so Im just doing trial and error now.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Wednesday, October 26th 2011, 10:45pm

hehehe...and I'm really thankful for your help! But like I said, I tried every known variety of rootpath, swfpath, ../, basedir etc.
The flash-version uses the same XML with the exact same path-settings and works just perfect.
Are there maybe any known restrictions to what format/bitrate a mp3-file and/or video must have to work with the html5-version of krpano?

Thanks and best regards
Nupsi

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

6

Wednesday, October 26th 2011, 10:56pm

Perhaps, show a link to your tour, PM me the zip of the project, or link to the mp3.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

7

Thursday, October 27th 2011, 9:59am

I´ve attached the tour as a zip-file, including the hierachy, XML, html and swf-file. The pano itself, the mp3-file and the video were far to big. Sizelimit here is 300kb. But the preview.jpg is included and you can put any mp3-file inside the "sounds"-folder, it won´t work. I tried about 20 mp3-files without success. Oh....the krpano.js is´nt included, for obvious reasons *g* Just put yours there and rename it to "tour.js". The version I used last was 1.0.8.14 build 2011-10-11.

Thanks a lot and best regards
Nupsi

nosound.zip

Posts: 1,857

Occupation: Virtual Tours - Photography - Krpano developer

  • Send private message

8

Friday, October 28th 2011, 4:48pm

I didn't find squat wrong with your code..
Uploaded an mp3 into sounds, replaced your jingle with mine and it played first time in flash and ipad.
http://www.seeit360.com/nosound/tour.html
So it must be in your source files.. OR .htaccess is prevent access to the mp3 or something else.
See if you can play the mp3 in the browser.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

9

Friday, October 28th 2011, 10:10pm

Hey Sacha,

this helps a lot! At least I know there has to be something wrong with either my files or, what I guess, my krpanoiphone.js. I'll download a fresh copy tomorrow and hopefully that will solve the problem.

Thanks again for you help and best regards!
Nupsi

10

Thursday, November 3rd 2011, 3:27pm

Hey again,

it seems that the krpanoiphone.js was´nt the problem, but the htaccess. Somehow I can´t get streaming-formats like mp3 or mp4 to work with krpanoiphone when they´re placed in password protected folders. Curios thing is that the flash-version streams those formats just perfect from within the same folders *confused* Strange....really strange *wacko*

But thanks a lot for your help, Sacha! It probably would have take me a lot more time (and strokes) to solve this problem without your help and your online-example!

Best regards
Nupsi

Similar threads