I have a series of html5 audio player (dynamica开发者_Go百科lly generated), that I adjust the volume with a jquery slider. The problem I am having is that moving one slider changes the audio output volume for all. It does not change each instances audio setting. I wonder if anyone could help me with this, so that it only effect the audio player it is tied to.
//volume audio
$(document).ready(function () {
    audio = $("#<?php echo $track_id; ?>").get(0);
    audio.volume =<?php echo $trackVolume; ?>;
    $("#volumeAudio<?php echo $track_id; ?>").each(function() {
        $( this ).empty().slider({
            value: <?php echo $trackVolume; ?>,
            orientation: "horizontal",
            range: "min",
            max: 1,
            step: 0.1,
            animate: true,
            slide: function( event, ui ) {
                audio.volume = ui.value;
                $.post( 
                    "processForms/process_presentation.php", { presentationProcessing: 'updateAudioSliderVolume', presentationId: <?php echo $pres_id; ?>, trackID: <?php echo $track_id; ?>, sliderValueVolume: ui.value}
                );
            }
        });
    });
});
Change
audio.volume = ui.value;
To
$("#<?php echo $track_id; ?>").get(0).volume = ui.value;
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论