HeartbeatService

public protocol HeartbeatService

The Heartbeat Service contract

  • Uniqueue identifier of the content

    Declaration

    Swift

    var contentId: String { get }
  • Uniqueue identifier of the device

    Declaration

    Swift

    var deviceId: String { get }
  • API to update heartbeat. Returns error when the request is failed.

    Default Implementation

    API to update heartbeat. Returns error when the request is failed.

    Declaration

    Swift

    func heartbeat(token: String,
                   offset: TimeInterval?,
                   primaryId: String?,
                   catalogType: String?,
                   headers: Headers?, completion: @escaping (Result<HeartbeatResponse?, Error>) -> Void)

    Parameters

    token

    Latest heartbeat token to be sent.

    offset

    Content offset i.e. playhead current time in milliseconds.

    primaryId

    The unique identifier of the primary content to which the selected content (i.e. secondary angle content) to play is associated with. This is applicable only for multi-camera enabled content.

    catalogType

    The value of the Catalog Type of content.

    headers

    Headers if any to be added to heartbeat requests

    completion

    The handle to invoke on request completion.