i'm implementing video player in i've taken uislider track progress of movie. mean thumb of slider should @ max value when movie finishes.
i'm not able achieve this. movie finishes before thumb reaches @ end. please me understand issue?
this code i've written:
//i'm setting min, max values of uislider , calculating current value progressbar.minimumvalue = 0.0; progressbar.maximumvalue = (float)movie.duration; progressbar.value = ((float)movie.currentplaybacktime/(float)movie.duration) * progressbar.frame.size.width;
just use progressbar.value = (float)movie.currentplaybacktime;
instead of progressbar.value = ((float)movie.currentplaybacktime/(float)movie.duration) * progressbar.frame.size.width;
Comments
Post a Comment