Player

@objc
public protocol Player

Playback analytics related to the player

  • Returns the total amount of buffered content, in seconds.

    Declaration

    Swift

    func bufferedDuration() -> Double

    Return Value

    the total amount of buffered content, in seconds

  • Returns an array of resoloutions available in the playlist

    Note

    This function will make a seperate request for the Master playlist to return all the availableresoloutions. This request is only done once you call this function and only on the first time you call it for that contnet. Every subsiquent call on the same content does not requst the playlist again.

    Declaration

    Swift

    func availableResoloutions() -> [CGSize]?

    Return Value

    an array of resoloutions available in the playlist, or nil if unknown

  • Returns the resoloution of the content being played

    Declaration

    Swift

    func selectedResoloution() -> CGSize

    Return Value

    the Resoloution of the content being played as a CGSzie e.g CGSize(width: 1920, height: 1080) or CGSizeZero if Uknown or Audio only.

  • Returns the accumulated duration, in seconds, until the player item is ready to play.

    Declaration

    Swift

    func startUpTime() -> Double

    Return Value

    the accumulated duration, in seconds, until the player item is ready to play or -1 if uknown

  • Returns the total number of playback stalls encountered.

    Declaration

    Swift

    func numberOfStalls() -> Int

    Return Value

    total number of playback stalls encountered.

  • Returns the playback type can be live, VOD, or from a file. If nil is returned the playback type is unknown.

    Declaration

    Swift

    func playbackType() -> String?

    Return Value

    the playback type can be live, VOD, or from a file. If nil is returned the playback type is unknown.

  • Returns the date and time at which playback began for this event.

    Declaration

    Swift

    func playbackStartDate() -> Date?

    Return Value

    the date and time at which playback began for this event.

  • Returns the offset, in seconds, in the playlist where the last uninterrupted period of playback began.

    Declaration

    Swift

    func playbackStartOffset() -> TimeInterval

    Return Value

    the offset, in seconds, in the playlist where the last uninterrupted period of playback began.