Questions tagged [seektotime]

19 questions
7
votes
1 answer

SeekToTime in AVPlayer stops playing streaming audio, when forward

I am streaming audio by using AVPlayer. It is working well. But Now i need to make a slider to move audio forward and backward, like typical music player. I used the function seekToTime which works great with local audio file. But when i stream song…
Ankush
  • 2,405
  • 3
  • 22
  • 45
6
votes
0 answers

ExoPlayer seekto function does not seek to the specified point but starts from 0

I'm working on ExoPlayer 2.6.0 for a Radio streaming app. Radio is playing is fine, but when i try to add seekTo for +/-30 seconds it always starts the streaming from 0. In the debug mode, player seeks to +30 seconds but as soon as…
Harry .Naeem
  • 1,245
  • 3
  • 20
  • 33
5
votes
2 answers

Android SDK MediaPlayer doesn't seek correctly

I have a mp3 file and my application must seek to some selected time of that mp3 file then start playing from there. I convert my string time by this method to int value private static int convert(String time) { int quoteInd =…
golkarm
  • 1,021
  • 1
  • 11
  • 22
5
votes
1 answer

AVPlayer seekToTime download an insane amount of media segment files consuming a lot of data

I'm working in an app where I'm able to play a HLS m3u8 playlist of a streaming radio (audio only) without any problem using an instance of AVPlayer. Using Charles I can see how the playlist is updated properly in a normal pace (each 9-10 seconds,…
Daniel
  • 683
  • 1
  • 9
  • 20
4
votes
0 answers

iOS AVPlayer flash a frame when seek a paused video

AVPlayer is paused at 10.0 seconds, then after a while, call seekToTime:CMTimeMakeWithSeconds(15.0, 1000) toleranceBefore:kCMTimeZero toleranceAfter:kCMTimeZero, the screen first show a frame at about 10.02 and then show the frame 15.0, it should…
philip
  • 103
  • 2
  • 8
4
votes
1 answer

VideoView SeekTo working smoothly or delay on different devices - Android

I'm developing a function that I click next button then the pause video will seekto next part and start.For example when video.getCurrentPosition is 8000, I click button to make video seekto(10000),because the video show same content between 8000…
Charles
  • 41
  • 2
3
votes
2 answers

AVPlayer seekToTime:toleranceBefore:toleranceAfter hangs Intermittently

I am calling AVPlayer seekToTime:toleranceBefore:toleranceAfter which hangs intermittently, doesn't get complete (completion block not even called). I looked at other stackoverflow but no success. [AVPlayer seekToTime:CMTimeMakeWithSeconds (19,1)…
Surendra Kumar
  • 237
  • 2
  • 9
2
votes
3 answers

AVPlayer Seek not accurate even with toleranceBefore: kCMTimeZero

We have an app which plays a long mp3 file (1 hour long). We want to be able to play from set points within the file. But, when we do it, it is inaccurate by up to 10 seconds. Here's the code: let trackStart =…
Ian C
  • 23
  • 6
2
votes
0 answers

AVPlayer smooth seekToTime

Is where a way to smoothly seek playback to some position? In other words, imagine that some track playing at 0:53 and I need it to play at 0:58 after 2 seconds. So I need it to smoothly increase rate (like using easing functions in animation) and…
Artem Shmatkov
  • 1,434
  • 5
  • 22
  • 41
2
votes
0 answers

How to play video at exact seek time?

I was working on a video player of an app and I ran into a problem. I need a video's playing cycle locked into a specified time interval. For instance, I need a video loop to play from 00:04 to 00:08. My dilemma is, the video only has keyframes at…
RanceA
  • 51
  • 5
2
votes
3 answers

SeekToTime working smoothly just for forwards, freezy on backwards

I know there is a bunch of posts, but none of them helped. I have videos with different FPS(if it matter somehow) over my device. I'm calculating the exact CMTime (if we translate them to seconds they'll be 10.33333,10.4444 etc'). I'm seeking using…
Roi Mulia
  • 5,626
  • 11
  • 54
  • 105
2
votes
1 answer

AVPlayer seekToTime spinning pizza

I have a simple AVPlayer-based OS X app that plays local media. It has a skip forward and backward feature, based on -seekToTime:. On some media, there is an annoying 3-7 second delay in getting the media to continue playing (especially going…
MDF
  • 109
  • 7
1
vote
1 answer

seekToTime is not working for Live assets in iOS 9

SeekToTime method is not working in iOS 9 while playing live videos. Even after seek, video is not playing from seeked position. In previous iOS versions it works fine. Following is the code... -(void)loadVideo{ [player pause]; player = nil; asset…
Raj kumar S.L
  • 101
  • 1
  • 5
1
vote
0 answers

Android Internal Storage Video play using VideoView, Can't use seekTo(int)

I have stored some video files in android internal private storage and I loaded those videos using android VideoView. And then I tried to open last position of the video with onResume(). I got the last position of the video using…
1
vote
1 answer

avplayer finishing song on seekToTime

I'm trying to have avPlayer restart the current song when the skip back button is selected if it's after about 5 seconds into the song, and jump to times according to where the slider is moved to. Here's my code for these functions: @IBAction func…
Nick
  • 155
  • 1
  • 2
  • 14
1
2