SVSAVPlayerPlayHeadAdapter

Objective-C

@interface SVSAVPlayerPlayHeadAdapter : NSObject <SVSContentPlayerPlayHead>

Swift

class SVSAVPlayerPlayHeadAdapter : NSObject

This class is a convenience adapter that implements the SVSContentPlayerPlayHead protocol for AVPlayer instances. Use it if your content player is an instance of AVPlayer.

Playhead initialization

  • Initialize an instance of SVSAVPlayerPlayHeadAdapter.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithAVPlayer:(nonnull AVPlayer *)player
                      unknownContentDuration:(BOOL)unknownContentDuration;

    Swift

    init(avPlayer player: AVPlayer, unknownContentDuration: Bool)

    Parameters

    player

    the AVPlayer instance used to play your content.

    unknownContentDuration

    Indicates whether or not the content is a live a feed, meaning its duration is unknown / infinite.

    Return Value

    An initialized instance of SVSAVPlayerPlayHeadAdapter.