Range slider dynamic not set on milisecond

Hello,

I have used range slider functionality as per V2

when i was used static simple value assign then it’s proper working on my page but dynamic assign value then not working my range slider.

we have use range slider for video.

Ex:

//vl assign dynamic value (1 to 100)
var vl;
app.range.setValue(’.range-slider’, vl );

Means that app can’t find or there is a more than one range sliders. Use explicit setValue method on range slider instance

I have assign static value in script then proper working

Ex:
//Its working
app.range.setValue(’.range-slider’, 40 );

when dynamic assign value in script then not working
//vl assign dynamic value (1 to 100) - not working
var vl;
app.range.setValue(’.range-slider’, vl );

There is no difference if you pass there correct value

app.range.setValue(’.range-slider’, 40 );

//same as

var vl = 40;
app.range.setValue(’.range-slider’, vl );

I have used custom video player with slider but when update video time on slider then not working my player

when my video play then update time function worked. (seektimeupdate)

//Its working below code on page.
var i = 1;

setInterval(function(){

	i++;
	app.range.setValue('.range-slider', i);

},20);

//not working on my videoplayer update time

return {

methods: {

            seektimeupdate: function(){
                var self = this;
	    var nt = vid.currentTime * (100 / vid.duration);
               //not working slider
                app.range.setValue('.range-slider', parseInt(nt));
           },

           intializePlayer: function(){ 
                 var self = this;
                 vid = document.getElementById("videoplayer");
                 seekslider = document.getElementById("seekslider");
                vid.addEventListener("timeupdate",self.seektimeupdate,false);
           }
 }

}

Apparently something wrong in your nt variable, do console.log(nt)

Ok, “nt” variable value dynamic proper working, when i have put range slider code then my video not working

Example:
var nt;

return {

methods: {

        seektimeupdate: function(){
           var self = this;
       nt = vid.currentTime * (100 / vid.duration);
           //dynamic value proper get but range value not set
           console.log(parseInt(nt));
           //not working slider
           app.range.setValue('.range-slider', parseInt(nt));
       },

       intializePlayer: function(){ 
             var self = this;
             vid = document.getElementById("videoplayer");
             seekslider = document.getElementById("seekslider");
            vid.addEventListener("timeupdate",self.seektimeupdate,false);
       }

}

}

Please provide a live example or JSFiddle with the issue, i can’t understand, issue somewhere in your code

Please check live example for not set our range value

https://jsfiddle.net/subhash8108/bvwbx1ux/27/

Sorry, but your JSFiddle doesn’t have anything related to F7. JSFiddle must demonstrate the issue with F7

Hi, It’s working auto slider smoothly.

one problem in slider, when set slide value then change event function call automatically so i have not set manually change value in slide.

Please help me

Thanks @nolimits4web

Its working dynamic slider :slight_smile: