User Tag List

Results 1 to 3 of 3

Thread: How can I Change the volume in Javascript?

  1. #1
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Dk
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can I Change the volume in Javascript?

    I use html5playsexternalaudio

    How can I Change the volume in Javascript?

    This link is the homepage Sounmanager2
    http://www.schillmania.com/projects/soundmanager2/doc/

    It says Example: soundManager.setVolume('mySound',50);


    function playAudio(snd) {

    soundManager.play('mysound',{
    url: 'audio/'+snd+'.wav'

    });

    }

  2. #2
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Dk
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found something here, I can change volume inside html code!

    soundManager.createSound({
    url: '/path/to/some.mp3',
    autoPlay: true,
    pan: -75,
    volume: 50
    });

    How Can I get a slider who control id: 'mysound'????

    <input id="volumeslider" type="range" min="0" max="100" value="100" step="1">
    volumeslider = document.getElementById("volumeslider");
    function setvolume(){
    mysound = volumeslider.value / 100;
    }

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    warlords's Avatar
    Join Date
    Oct 2011
    Location
    Dk
    Posts
    352
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use SoundManager 2.js (javascript)

    How can I get the volume of soundManager.setVolume('mySound') with a slider?



    <input id="volumeslider" type="range" min="0" max="100" value="100" step="1">

    var audio volumeslider;
    function initAudioPlayer(){
    audio = new Audio();
    // Set object references
    volumeslider = document.getElementById("volumeslider");
    // Add Event Handling
    volumeslider.addEventListener("mousemove", setvolume);
    // Functions
    function setvolume(){
    audio.volume = volumeslider.value / 100;
    soundManager.setVolume('mySound',volumeslider.valu e / 100);
    }
    }
    window.addEventListener("load", initAudioPlayer);
    </script>

Similar Threads

  1. can you change the computer's volume
    By Tebi1234 in forum Fusion 2.5
    Replies: 0
    Last Post: 10th December 2016, 10:18 PM
  2. How do I change the volume of samples?
    By Simflare in forum Fusion 2.5
    Replies: 4
    Last Post: 20th March 2014, 02:07 PM
  3. Change SFX/Music Volume
    By Solgryn in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 20th October 2013, 06:17 PM
  4. Anyway to Adjust or Change Volume with mci object?
    By path in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 13th November 2012, 05:33 AM
  5. Volume keys should change multimedia volume
    By qenio in forum Android Export Module Version 2.0
    Replies: 2
    Last Post: 14th October 2012, 09:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •