FLHeartbeatFactory

public enum FLHeartbeatFactory

The factory class for module FLHeartbeat. This class has methods to create types exposed by this module.

  • API to construct HeartbeatConfiguration conformed value type reference

    Declaration

    Swift

    public static func heartbeatConfiguration(heartbeatEndPointUrl: String,
                                              streamConcurrencyEndPointUrl: String? = nil,
                                              multiStreamMode: Bool = false,
                                              syncInterval: TimeInterval = 60000,
                                              maxAllowedFailures: UInt = 2,
                                              maxAllowedRetries: Int = 2,
                                              retryDelayInSec: Double = 1,
                                              recordBookmark: Bool = false,
                                              playbackStopOnPlaybackEnd: Bool = true,
                                              trackViewerCount: Bool? = false) -> HeartbeatConfiguration

    Parameters

    heartbeatEndPointUrl

    The server url for heartbeat service

    streamConcurrencyEndPointUrl

    The server url for stream concurrency service

    multiStreamMode

    The current device is currently streaming multiple videos using multiple player instances

    syncInterval

    The time interval used to periodically update stream state of the currently playing content. Default value is 60000ms

    maxAllowedFailures

    The maximum number of failed heartbeat check attempts. Default value is 2

    maxAllowedRetries

    The no of retires allowed for network failure. Default value is 2 seconds

    retryDelayInSec

    Delay between failure and retry attempt. Default value is 1 second

    recordBookmark

    Specifies whether to use the heartbeat service to record bookmarks/resume points for VOD content. Default value is false.

    playbackStopOnPlaybackEnd

    Specifies whether to use the heartbeat to stop playbackon event / program end

    trackViewerCount

    The flag indicates whether to track the viewers count or not, for the content to play. Default value is false.

  • API to construct StreamConcurrencyService conformed reference type instance.

    Declaration

    Swift

    public static func streamConcurrencyService(endPoint: String, httpClient: HTTPClient = FLFoundationFactory.httpClient(), authorizer: PlatformAuthorizer) -> StreamConcurrencyService

    Parameters

    endPoint

    The server url for stream concurrency service

    httpClient

    The HTTPClient for performing URL load requests

    authorizer

    PlatformAuthorizer for creating authorized network request.Check PlatformAuthorizerfor further details

  • API to construct HeartbeatService conformed reference type instance.

    Declaration

    Swift

    public static func heartbeatService(contentId: String, deviceId: String, endPoint: String, httpClient: HTTPClient = FLFoundationFactory.httpClient(), authorizer: PlatformAuthorizer) -> HeartbeatService

    Parameters

    contentId

    Unique identifier of the associated content

    deviceId

    Unique identifier of device playing the stream

    endPoint

    The server url for heartbeat service

    httpClient

    The HTTPClient for performing URL load requests

    authorizer

    PlatformAuthorizer for creating authorized network request.Check PlatformAuthorizerfor further details

  • API to construct HeartbeatManager conformed reference type instance.

    Declaration

    Swift

    public static func heartbeatManager(configuration: HeartbeatConfiguration,
                                        deviceId: String,
                                        contentId: String,
                                        catalogType: String? = nil,
                                        primaryId: String? = nil,
                                        heartbeatToken: String,
                                        authorizer: PlatformAuthorizer,
                                        heartbeatService: HeartbeatService? = nil,
                                        streamConcurrencyService: StreamConcurrencyService? = nil,
                                        heartbeatHeaders: Headers? = nil,
                                        liveStartTime: String? = nil,
                                        liveEndTime: String? = nil,
                                        liveEventType: String? = nil,
                                        live360StartTime: String? = nil,
                                        live360EndTime: String? = nil,
                                        pgmStartTime: String? = nil,
                                        pgmEndTime: String? = nil,
                                        httpClient: HTTPClient = FLFoundationFactory.httpClient()) -> HeartbeatManager

    Parameters

    configuration

    The configuration for the heartbeat manager. Check HeartbeatConfiguration for further details.

    deviceId

    The unique identifier of the device playing the stream

    contentId

    The unique identifier of the stream

    catalogType

    The value of the Catalog Type of content

    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.

    heartbeatToken

    The X-Heartbeat token.

    authorizer

    PlatformAuthorizer for creating authorized network request.Check PlatformAuthorizerfor further details

    heartbeatService

    Heartbeat Service

    streamConcurrencyService

    StreamConcurrency Service

    heartbeatHeaders

    Headers if any to be added to heartbeat requests

    liveStartTime

    Live event / program start time

    liveEndTime

    Live event / program end time

    liveEventType

    Live event / program type as provided by the server.

    pgmStartTime

    live playback program start time

    pgmEndTime

    live playback program end time

    httpClient

    The HTTPClient for performing URL load requests