6

Goal: To add youtube like preview feature when user seeks manually using the player seek bar.

enter image description here

From what I understand so far is that I will have to add "I-Frame only playlist" to my stream to enable trick play but I am not able to figure out how I will be using this to show the preview view on the video player?

Other solutions I considered:

  1. AVAssetImageGenerator: It does not work on streams. Explained here. This says if my .m3u8 file contains "I-Frame only playlist", AVAssetImageGenerator will start returning the snapshot, but even if it does, generating thumbnails of a complete 1 hour video upfront is just not optimal.

  2. AVPlayerItemVideoOutput This also seems like a very brut force way to approach the problem as I need thumbnails of almost complete video.

Current player implementation:

I have added AVPlayerLayer as a sublayer to my view controller's view and added custom controls on top of it.

I am thinking of using something like this https://github.com/pbs/iframe-playlist-generator to add the I-Frame playlist.

PS: I am new to this, so if I have made any wrong assumption, please let me know. Also, any links or references to some reading material I can use to dive in deeper are appreciated. Thanks.

0 Answers0