Try to search your question here, if you can't find : Ask Any Question Now ?

jQuery Audio Time Duration Change on Slider Click

HomeCategory: stackoverflowjQuery Audio Time Duration Change on Slider Click
Avatarjulie asked 3 months ago

I noticed that the following code runs fine on desktop & laptops, but not on my Android mobile or other mobile devices, to change the duration of the song when user clicks on the slider:

<script src=""></script>

    <div id="timeline-box">
    <input id="seekslider" type="range" min="0" max="100" value="0" step="1"><br>           

    **//jQuery to detect when user changes the timeline with the seekslider
                var leftOffset = e.pageX - $(this).offset().left;
                var songPercents = leftOffset / $('#seekslider').width();
                audio.currentTime = songPercents * audio.duration;

I’d appreciate it if someone could help me solve this issue with the duration change when clicking the slider in either jQuery or Javascript.

1 Answers
Best Answer
AvatarArben answered 3 months ago
Your Answer

0 + 0 =

Popular Tags

WP Facebook Auto Publish Powered By :