I
I
Itvanya2016-03-16 04:31:48
css
Itvanya, 2016-03-16 04:31:48

Is it possible to replace input[type=range] with a full featured slider slider for Web Player?

Guys, hello :) We are writing a video-audio player here and would not like to load extra scripts. Is it possible today, using input[type=range], to create a slider-slider with an indication of viewed and downloaded without adding extra libs? Or is it not worth it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrzej Wielski, 2016-03-16
@Itvanya

Can.
When the video is on, programmatically change the value for the indication of the viewed.
Loaded indication can be implemented using a background image, and then changing the background-size

var percent = 35;
var h = $('.ползунок').height();
var h = h * percent / 100;
$('.ползунок').css('background-size', '100% ' + percent + 'px');

But ask yourself - do you need it? :)
Isn't it easier to make everything divs by setting the necessary classes and styles, and screwing a few events to the "slider" element?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question