AVPlayer Buffer Size

I currently have an HLS video stream and I'm using AVPlayer to play streaming content on my iPad.

What I'm trying to accomplish is the ability to return to the beginning of the stream, pause the stream and return to the current current position of the stream. There seems to be a pause live with the DVR for the cable.

I have a couple of questions:

1) Is this possible with AVPlayer ? I played with seekTo and watched loadedTimeRanges , and it seems that the seekTo method really does not have good accuracy when going back 30 seconds to the stream.

2) How to increase the size of the AVPlayer buffer to support, say, a 5-minute sliding window in which you can rewind the stream for up to 5 minutes or pause the stream and play it after a 5-minute pivot window reaches the paused position.

Any direction / guidance on resolving this issue would be appreciated.

Thanks!

+6
source share

Source: https://habr.com/ru/post/971657/


All Articles