AVPlayer Progress slider change with user dragging it

avplayer, ios

Solution

-(IBAction) valueChangeSliderTimer:(id)sender{
    [avplayer pause];
    isPlaying = FALSE;
    [btnPauseAndPlay setTitle:@"Play" forState:UIControlStateNormal];

    float timeInSecond = sliderTimer.value;

    timeInSecond *= 1000;
    CMTime cmTime = CMTimeMake(timeInSecond, 1000);

    [avplayer seekToTime:cmTime toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero];
}

Edited Code .

And try this link as well : Try this link

Problem

I am using AVPlayer, and its working good. I put slider and it is progression according to player duration. But i want if user drags slider then play time changes accordingly. i.e. Song forwards or backwards according to slider position. I have tried ``` -(IBAction)sliderChange:(id)sender{ [player pause]; CMTime t = CMTimeMake(slider.value,1); [player seekToTime:t]; [player play]; } ``` But it again takes slider to starting point. Any help would be much appreciated. EDIT (WORKING WITH BELOW LINK) AVPlayer Video SeekToTime

Original source

Related problems