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

    Code
    <plugin name="soundinterface"
     url="soundinterface.js" 
     rootpath="sounds" 
     preload="true" 
     keep="true" />
    
    
     <action name="play_audio"> 
     playsound(jingle,sounds/jingle.mp3,0); 
     </action>

    Videoplayer

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

    Code
    ...videourl,%SWFPATH%/videos/small.mp4
    ...videourl,'%SWFPATH%/videos/small.mp4'
    ...videourl,% BASEDIR%/videos/small.mp4

    Soundinterface

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

  • 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.
    https://krpano.com/plugins/soundinterface/#rootpath

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

    Code
    <plugin name="soundinterface"
     url="soundinterface.js" 
     rootpath="sounds" 
     preload="true" 
     keep="true" />
    
    
     <action name="play_audio"> 
     playsound(jingle,jingle.mp3,0); 
     </action>
  • 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

  • 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

  • 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

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

  • 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

  • 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

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!