jQuery Audio Time Duration Change on Slider Click

jQuery Audio Time Duration Change on Slider Click

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:

  1. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <div id="timeline-box"> <input id="seekslider" type="range" min="0" max="100" value="0" step="1"><br> </div> **//jQuery to detect when user changes the timeline with the seekslider $(document).ready(function(){ $("#seekslider").mouseup(function(e){ 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.