HTML5-VR Audio Plugin - version 3.1.0 is ready!

  • Hi

    Version 3.1.1 is ready!

    • A new global volume action: Html5SoundGlobalVolume(Number) - 0.0 - 1.0
    • Now the plugin detects if the browser tab with your project is active, if it is not, then plugin automatically mutes the sound. *thumbup*
    • The Howler core update


    ...
    Version 3.0.0 (build 2017-08-17) is ready! Watch the video:

    https://youtu.be/4XjmMcIenm8

    ...

    In the last few projects, we apply our HTML5-VR Audio Plugin.

    Surround sound not works on Internet Explorer (no Web Audio Api support) - it works on Edge (WIN 10).

    Link to plugin page

    Link to the example

    Link to the VR example


    Note:

    Plugin supports mp3 and ogg files. Both files must have the same name and be in the same location.
    Setting the angle of listening to a range = 360, the sound is played in a completely new characteristics. - NEW

    Documentation - HTML5-VR Audio Plugin ver 2.0 beta1

    Most of the functions of this plugin is similar to the Sound Interface Plugin krpano. We worked hard to get the functions that will be similar to Sound Interface Plugin krpano methods.
    The Sound Interface plugin extends krpano with actions for playing and controlling sounds directly from xml.
    • Plugin allows you to easily add sound objects
    • Works only in HTML5 and krpano version min. 1.19-PR3.
    • It works in browsers that support the Web Audio API.

    Plugin Actions
    The HTML5-VR Audio Plugin add its actions directly to the krpano root.
    That means the actions can be called like normal krpano actions.

    • playHtml5sound(name, audiofile, loop*, volume*, oncomplete*)
      • plays a sound file
      • name - identification name for the sound
      • audiofile - the path and filename of a sound file without extension
      • loop - true/false (default=false)
      • volume - sound volume (0.0 - 1.0, default=1.0)
      • oncomplete - actions that will be called on complete (*optional)
    • playHtml5sound2D(keep,name, audiofile, rate*,volume*,loops*, onload*,onplay*,onpause*,onstop*,onmute*, oncomplete*)
      • plays a sound file
      • keep - true/false
      • name - unique identification name for the sound
      • audiofile - the path and filename of a sound file without extension
      • rate - playback speed (0.5-4.0, default =1.0) (*optional)
      • volume - sound volume (0.0 - 1.0, default=1.0) (*optional)
      • loops - true/false (default=false) (*optional)
      • onload - actions that will be called on sound loaded (*optional)
      • onplay - actions that will be called if the sound start to play (*optional)
      • onpause - actions that will be called if the sound is paused (*optional)
      • onstop - actions that will be called if the sound is stopped (*optional)
      • onmute - actions that will be called if the sound is muted (*optional)
      • oncomplete - actions that will be called on complete (*optional)
    • playHtml5sound3D(keep,name, audiofile, ath, atv, range, rate*,volume*, loops*, onload*,onplay*,onpause*,onstop*,onmute*, oncomplete*)
      • plays a directional 3D sound at a given spherical position
      • keep - true/false
      • name - unique identification name for the sound
      • audiofile - the path and filename of a sound file without extension
      • ath - horizontal sound source position (-180 .. 180)
      • atv - vertical sound source position (-90 .. +90)
      • range - range of the sound (in degrees, 10-360)
      • rate - playback speed (0.5-4.0, default =1.0) (*optional)
      • volume - sound volume (0.0 - 1.0, default=1.0) (*optional)
      • loops - true/false (default=false) (*optional)
      • onload - actions that will be called on sound loaded (*optional)
      • onplay - actions that will be called if the sound start to play (*optional)
      • onpause - actions that will be called if the sound is paused (*optional)
      • onstop - actions that will be called if the sound is stopped (*optional)
      • onmute - actions that will be called if the sound is muted (*optional)
      • oncomplete - actions that will be called on complete (*optional)
    • playHtml5sound3DHS(keep,name, audiofile, hotspotname, range, rate*,volume*, loops*, onload*,onplay*,onpause*,onstop*,onmute*, oncomplete*)
      • plays a directional 3D sound at a hotspot position
      • when the hotspot moves the sound will follow it
      • name - unique identification name for the sound (use "auto" for an automatic id)
      • audiofile - the path and filename of a sound file
      • hotspotname - name of the hotspot
      • range - range of the sound (in degrees, 10-360)
      • rate - playback speed (0.5-4.0, default =1.0) (*optional)
      • volume - sound volume (0.0 - 1.0, default=1.0) (*optional)
      • loops - true/false (default=false) (*optional)
      • onload - actions that will be called on sound loaded (*optional)
      • onplay - actions that will be called if the sound start to play (*optional)
      • onpause - actions that will be called if the sound is paused (*optional)
      • onstop - actions that will be called if the sound is stopped (*optional)
      • onmute - actions that will be called if the sound is muted (*optional)
      • oncomplete - actions that will be called on complete (*optional)
    • Html5Soundvolume(name,value)
      • volume settings
      • name = identification name of the sound
      • value (0.0-1.0)
    • Html5Soundplay(name)
      • resumes a paused sound
      • name = identification name of the sound
    • Html5Soundpause(name)
      • pauses a sound
      • name = identification name of the sound
    • Html5Soundstop(name)
      • stops playing a sound
      • name = identification name of the sound
    • Html5Soundmute(name)
      • mute the sound
      • name = identification name of the sound
    • Html5Soundrate(name,value)
      • playback speed settings
      • name = identification name of the sound
      • value(0.5-4.0)
    • Html5SoundSetSeek(name,value) - NEW

      • set seek time in second
      • name = identification name of the sound
      • value = in seconds
    • Html5SoundGetSeek(name,variable) - NEW

      • get seek time in second
      • name = identification name of the sound
      • variable = the variable where the result will be stored
      Code
      <action name="getseeksound">
        Html5SoundGetSeek(mysoundname, myvar);
        trace('seek in sec: ',get(myvar));
      </action>
    • Html5SoundGlobalmute(variable); - NEW
      • global action to MUTE or UNMUTE for the all sounds:
      • variable = true - mute is ON, false - mute is OFF (Boolean)


    HTML5 and iOS (iPhone / iPad) Notes
    Plugin works fine on iOS, Android.
    A sound can't start to play automatically! An user interaction is needed to start playing the sound, e.g. a touch on the screen by the user.

    WebVR Notes
    Plugin works fine in WebVR mode.
    If you use the function playHtml5sound3DHS, your hotspot must be set: distorted = true.
    Only this kind of hotspots is supported by VR mode.


    More information soon... *cool*


    Piotr & Paweł *thumbup*

  • GREAT!!

    Seems to work ok on mac: Safari, chrome, FF

    when i look a bit down though the sound seems to be not panning nice from right to left but like a jump in panning.
    Not sure when this exactly happens.
    But.. GREAT!

    playback speed (rate) also very interesting!

    Hope Klaus has this all in the update..
    Otherwise i like to buy, but please open source in that case. *w00t*

    *thumbup*

    Tuur *thumbsup*

  • Thanks Guys :)

    We wanted to make a plugin that can be controlled directly from krpano instead of html.

    In addition, it must have at least the same functions as a plugin Klaus. For example.
    Klaus function looks like this:

    Code
    playsound3D(name, audiofile, ath, atv, range*, volume*, loops*, oncomplete*)  (Flash only)


    And our code looks like this:

    Code
    playsound3D(keep, name, audiofile, ath, atv, range, rate*, volume*, loops*, onload*, onplay*, onpause*, onstop*, onmute*, oncomplete*);


    Other functions of our plug-in look the same as in the Sound Interface plugin for flash.

    Plugin great plays audio on the VR mode. Especially the 3D sound makes a great impression. *thumbsup*

    Plugin cost us a lot of work and probably we will share it for a small fee.

    Would you like to see VR mode DEMO?

    Regards

    Piotr i Pawel

  • Hi

    I built a simple example.

    link to HTML5 Sound Plugin VR demo


    xml code of tour.xml what I use is below.

    Best regards *thumbsup*

    Piotr

  • Hello :)

    Taking in care that howler.js can handle sprites of sound, did you considered adding that feature ?

    Hovler has many additional features. If the plugin will be popular we are sure to add them. Sprites of sound also. Although this is a static method for adding sound. In our plugin sound is added dynamically.
    We did not want to give a huge amount of features in the first version. We want to a simple-to-use plugin. In further steps we plan to add new features.


    I guess the plugin will be available soon ?


    Yes. Today or tomorrow we will give all the information.

  • Great!
    Can't wait to test.
    Could be also great add for my moving hotspots *smile*
    *thumbup*


    EDIT: scene and tour skin are encrypted.. so it is not possible to see how to use.!!

    When i read the license file.. So, i can not use this for my clients?

    Tuur *thumbsup*

  • EDIT: scene and tour skin are encrypted.. so it is not possible to see how to use.!!

    Of course it's my mistake - I'm sorry. *cry*
    Demo from the shop should not be encrypted, of course. In a moment I'll send you the files.

    Piotr

  • Hum, after a quick test I must say I'm a bit disappointed:
    If no ogg file then firefox won't play the mp3 file (firefox supports mp3 normally)
    If you try with a stereo sound it looks it only changes volume but doesn't pan the left/right channels.
    Even with very high range (320 for example) sound is audible in a very short fov, like if falloff was calculated from right screen ath to leftscreen ath and not centerscreen , am I wrong ?
    You should also add rangefalloff outofrangevolume like for video plugin to be able to have an ambiant directional sound wich won't mute but only falloff when back.

Participate now!

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