OTVThumbnailView

public class OTVThumbnailView : UIView

This class can be used to display I-Frames from a stream, e.g. for display of thumbnails while seeking. The URL provided to the initialiser must point to a HLS playlist with I-Frames, otherwise the hasThumbnails function will return false and the view won’t render thumbnails.

Note

hasThumbnails will return false immediately after initalisation, even for a playlist that has I-Frames. This is because the playlist needs to first be downloaded and checked for I-Frames.
  • Initialises the view with the specified stream URL and optional frame.

    Declaration

    Swift

    @objc
    public init(url: URL, frame: CGRect = .zero)

    Parameters

    url

    the stream URL to receive I-Frames from

    frame

    the frame to create the view with

  • Specifies whether the URL provided to the initaliser points to a HLS playlist with I-Frames or not

    Declaration

    Swift

    @objc
    public func hasThumbnails() -> Bool
  • Specifies which I-Frame the view should render

    Declaration

    Swift

    @objc
    public func setTime(toSeconds seconds: TimeInterval)

    Parameters

    seconds

    The time within the stream for which to render the I-Frame