FLHeartbeatFactory
public enum FLHeartbeatFactory
The factory class for module FLHeartbeat.
This class has methods to create types exposed by this module.
-
heartbeatConfiguration(heartbeatEndPointUrl:streamConcurrencyEndPointUrl: multiStreamMode: syncInterval: maxAllowedFailures: maxAllowedRetries: retryDelayInSec: recordBookmark: playbackStopOnPlaybackEnd: trackViewerCount: ) API to construct
HeartbeatConfigurationconformed value type referenceDeclaration
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) -> HeartbeatConfigurationParameters
heartbeatEndPointUrlThe server url for heartbeat service
streamConcurrencyEndPointUrlThe server url for stream concurrency service
multiStreamModeThe current device is currently streaming multiple videos using multiple player instances
syncIntervalThe time interval used to periodically update stream state of the currently playing content. Default value is 60000ms
maxAllowedFailuresThe maximum number of failed heartbeat check attempts. Default value is 2
maxAllowedRetriesThe no of retires allowed for network failure. Default value is 2 seconds
retryDelayInSecDelay between failure and retry attempt. Default value is 1 second
recordBookmarkSpecifies whether to use the heartbeat service to record bookmarks/resume points for VOD content. Default value is false.
playbackStopOnPlaybackEndSpecifies whether to use the heartbeat to stop playbackon event / program end
trackViewerCountThe flag indicates whether to track the viewers count or not, for the content to play. Default value is false.
-
API to construct
StreamConcurrencyServiceconformed reference type instance.Declaration
Swift
public static func streamConcurrencyService(endPoint: String, httpClient: HTTPClient = FLFoundationFactory.httpClient(), authorizer: PlatformAuthorizer) -> StreamConcurrencyServiceParameters
endPointThe server url for stream concurrency service
httpClientThe
HTTPClientfor performing URL load requestsauthorizerPlatformAuthorizer for creating authorized network request.Check
PlatformAuthorizerfor further details -
API to construct
HeartbeatServiceconformed reference type instance.Declaration
Swift
public static func heartbeatService(contentId: String, deviceId: String, endPoint: String, httpClient: HTTPClient = FLFoundationFactory.httpClient(), authorizer: PlatformAuthorizer) -> HeartbeatServiceParameters
contentIdUnique identifier of the associated content
deviceIdUnique identifier of device playing the stream
endPointThe server url for heartbeat service
httpClientThe
HTTPClientfor performing URL load requestsauthorizerPlatformAuthorizer for creating authorized network request.Check
PlatformAuthorizerfor further details -
heartbeatManager(configuration:deviceId: contentId: catalogType: primaryId: heartbeatToken: authorizer: heartbeatService: streamConcurrencyService: heartbeatHeaders: liveStartTime: liveEndTime: liveEventType: live360StartTime: live360EndTime: pgmStartTime: pgmEndTime: httpClient: ) API to construct
HeartbeatManagerconformed 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()) -> HeartbeatManagerParameters
configurationThe configuration for the heartbeat manager. Check
HeartbeatConfigurationfor further details.deviceIdThe unique identifier of the device playing the stream
contentIdThe unique identifier of the stream
catalogTypeThe value of the Catalog Type of content
primaryIdThe 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.
heartbeatTokenThe X-Heartbeat token.
authorizerPlatformAuthorizer for creating authorized network request.Check
PlatformAuthorizerfor further detailsheartbeatServiceHeartbeat Service
streamConcurrencyServiceStreamConcurrency Service
heartbeatHeadersHeaders if any to be added to heartbeat requests
liveStartTimeLive event / program start time
liveEndTimeLive event / program end time
liveEventTypeLive event / program type as provided by the server.
pgmStartTimelive playback program start time
pgmEndTimelive playback program end time
httpClientThe
HTTPClientfor performing URL load requests