I am working on a video control slider and not sure why this event is not firing.
jquery:
$(document).on('input', '.volume-bar', function() {
const video = $(this).closest('.video-container').children('video').get(0);
alert($(this).value());
video.volume = $(this).value();
})
html:
<div class="col-md-6 offset-md-3 video-container px-0">
<video id="rogueVideo" width="100%" poster="images/posters/rogue.jpg">
<source src="videos/rogue.mp4" type="video/mp4">
</video>
<div class="video-controls">
<button class="play-pause btn btn-primary btn-sm mr-1" type="button"><i class="fas fa-play fa-fw"></i></button>
<input class="seek-bar w-100 mr-1" type="range" value="0">
<button class="mute btn btn-primary btn-sm mr-1" type="button"><i class="fas fa-volume-off fa-fw"></i></button>
<input class="volume-bar w-25 mr-1" type="range" min="0" max="1" step="0.1" value="1">
<button class="full-screen btn btn-primary btn-sm mr-1" type="button"><i class="fas fa-expand fa-fw"></i></button>
</div>
</div>
it's not getting the event because I never see the alert