Skip to main content
Skip table of contents

Enabling I-Frame thumbnail previews

Like WebVTT thumbnails, I-Frame thumbnails also show previews of the stream using the time slider/progress bar.

Prerequisites

A test stream with #EXT-X-I-FRAME-STREAM-INF playlists included. The thumbnails example code project provides an example stream.

Process

To present I-Frame thumbnails to your user, you must create an instance of OTVThumbnailView, passing it the stream URL that your OTVAVPlayer is (or will be) playing.

OTVThumbnailView is only intended for use with streams that have #EXT-X-I-FRAME-STREAM-INF playlists as these define where the I-Frames are in the stream. Immediately after initialisation, the function will always return false. If #EXT-X-I-FRAME-STREAM-INF playlists are present, the OTVThumbnailView will report true from its hasThumbnails() function once it has determined that they are present (which is an asynchronous operation).

Presenting the thumbnail to the user

The thumbnail needs to be updated in the timeSliderDidChange function, which in the case of I-Frame thumbnails means calling the thumbnail view’s setTime(toSeconds:) function.

You cannot create an OTVThumbnailView in storyboard or interface builder as it needs to be initialised with a stream URL.

DRM considerations

If the stream you are using with OTVThumbnailView is encrypted, you will need to have set up a license delegate with the SDK in the same way as for playback of the encrypted stream.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.