Sound unsupported on HTML5?

  • Hi,

    right, there is currently no support for sound,

    all Flash plugins (all files with .swf) are not supported in HTML5,
    so too the soundinterface.swf plugin,

    I'm working on a build-in soundinterface support for the krpanoJS viewer,
    but it will not be able to support the full functionally as the Flash plugin
    due the technically/principal HTML5 limitations,

    best regards,
    Klaus

  • Hi,

    right, there is currently no support for sound,

    all Flash plugins (all files with .swf) are not supported in HTML5,
    so too the soundinterface.swf plugin,

    I'm working on a build-in soundinterface support for the krpanoJS viewer,
    but it will not be able to support the full functionally as the Flash plugin
    due the technically/principal HTML5 limitations,

    best regards,
    Klaus

    No problem, it is solved. I now have full sound support on iPad with background sound loading automatically and with control button for start and stop.
    '
    Hans

  • Well my workaround is very simple.
    Just old simple webpage stuff.
    I made an iframe on the html outside the body just 1x1 pixel is fine.
    I put an empty html page in it for the start and on the intro and on the thumbnails i put alink directly to the mp3 file.

    Here is a demo. There is one small thing. The sound appears in the history as untitled page. However there is no problem using backbutton , it ignores it.
    http://www.panoramas.dk/panorama/krpano/fireworks/

    Unfortunately I just discovered that it does not work on Android.
    Doing some searches on sound in Android I also found that the HTML5 webpage sound does not work either.

    However flash sound on my FPP panoramas work perfect.

    Hans

  • Hi Hans,

    I have tested it on my iphone and the sound is played on the quicktime player (in fullscreen mode).
    And when I click the done button, the safari browser takes me the previous html page.
    Have you tested it also on the iphone?

    Best Regards,
    Hyung

  • Hi Hans,

    I have tested it on my iphone and the sound is played on the quicktime player (in fullscreen mode).
    And when I click the done button, the safari browser takes me the previous html page.
    Have you tested it also on the iphone?

    Best Regards,
    Hyung

    What iPhone?
    Ayrton has tested it on his iPhone 3 not with latest system and it did not work.

    How do you see it is played with quicktime? does the quicktime player load on top of the pano?

    Hans

  • Hi Hans,

    I have tested on 3GS (iOS 3.X) and 3GS (iOS 4.X) and the both give
    the same result. Refer to the following image:


    The quicktime player shows on top of the panorama. And when I click the "Done" button,
    not only quicktime player terminates, but the browser takes me to the previous html page.
    (which I don't understand why)


    I haven't tested on iphone 4 or 3g.

    Did you use the "audio" tag? As far as I know, there is an audio tag in HTML5 and you
    can control it via Javascript. I will post it when I find it.

    Best Regards,
    Hyung

  • Thanks for testing.
    I do not understand why iPhone behave differently than the iPad. I thought the Safari browser used was the same. Apparently iPad can autoplay an mp3 in an iFrame just like on standard desktop browsers. The big problem is actually autostart in a webpage. This is easy done for desktops but does not work for HTML5, I do not think it will work with the special HTML5 embed either. Apparently linking directly to the mp3 autostarts it but iPhone pops it up instead of playing it in the iFrame. I just made a test and embedded it in a webpage as QT sound with autostatart, This work perfect on desktops but it fails on the iPad.

    You can test it here, http://panoramas.dk/panorama/krpano/fireworks/index1.html

    Hans

  • Here is one more test. This page opens the sound as a webpage with HTML5 sound
    http://panoramas.dk/panorama/krpano/fireworks/index3.html

    The sound is an mp3 embedded like here
    http://html5doctor.com/native-audio-in-the-browser/

    I added the autoplay="true" and this works perfect in Safari HTML5 but on my iPad it does not start.

    This is the BIG problem.
    Note that Firefox does not yet support this tag for mp3.

    Hans

  • Hi,

    regarding to this topic - I have just released the first version of the soundinterface plugin for the krpanoJS viewer:

    get it here:
    https://krpano.com/download/beta/#2010-12-08

    the available soundinterface functions:

    • playsound(id, soundfile, loops*, oncomplete*);
    • pausesound(id);
    • resumesound(id);
    • pausesoundtoggle(id);
    • stopsound(id);
    • stopallsounds(id);


    how to include it:

    Code
    <plugin name="soundinterface"
            url="soundinterface.swf"
            alturl="soundinterface.js"
            keep="true"
            onloaded=""
            />

    notes:

    • this is a pre-release, subjects and features may change until the final version!
      this version is not feature complete!
    • the preload="true" setting is currently not supported in the krpanoJS viewer, that means the soundinterface functions become available first after the onloaded event of the plugin
    • on the iPhone and iPad it's only possible to play only ONE sound, a second playsound() call will stop automatically the first sound
    • on the iPhone and iPad a sound can only start playing after a touch of the user, when the playsound() call happens in an onclick, ondown, onup event it will start automatically but with it happens out of an user event the sound will be pending until the first touch on the screen, but then the sound will start automatically


    best regards,
    Klaus

  • So you are supposed to use the old soundinterface.swf?

    I just included the basic code like this
    <plugin name="soundinterface"
    url="plugins/soundinterface.swf"
    alturl="soundinterface.js"

    keep="true"
    onloaded=""
    />

    All the 3 new js files are at the rooth.

    I got an error both in Safari/ipad and on a real iPad which says it can not find soundinterface.js
    secondary I get an error claiming that view.mfov, is unsupported. Worked fine on all test before and it does not show when I remove the soundinterface codes.

    Hans
    I

  • This works in Safari flash and plays the sound
    <plugin name="soundinterface"
    url="plugins/soundinterface.swf"
    alturl="soundinterface.js"
    keep="true"
    onloaded="playsound(sound1,sounds/sound1.mp3,loops);"


    />

    but gives me the same parsing error on iPad.

    Hans

  • Hi,

    So you are supposed to use the old soundinterface.swf?

    how do you mean that?

    in the krpano Flash viewer the normal soundinterface.swf will be used (url),
    and in krpano Javascript/HTML5 viewer the new soundinterface.js will be used (alturl),


    All the 3 new js files are at the rooth.

    I got an error both in Safari/ipad and on a real iPad which says it can not find soundinterface.js

    are you using the right krpanoiphone.js?
    note when you have used the droplets before to build the pano or tour then
    the krpanoiphone.js was probably embedded already in a .js file,

    to find out if you are using the right krpano viewer and version,
    press the 'O' key in the viewer (Flash and HTML5),

    secondary I get an error claiming that view.mfov, is unsupported. Worked fine on all test before and it does not show when I remove the soundinterface codes.

    you get that error in the flash viewer, or?
    just as note - there is no "view.mfov" variable, maybe you mean fovtype="MFOV"...?


    onloaded="playsound(sound1,sounds/sound1.mp3,loops);"

    one more note - the "loops" is wrong, put there either a number of loops (0=unlimted looping, 1=for playing once) or remove the setting if you don't want the sound to be loop,

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!