Inherits from NSObject
Declared in ADBMediaHeartbeat.h

Class Methods

createAdBreakObjectWithName:position:startTime:

Creates an instance of the AdBreak info object

+ (nonnull ADBMediaObject *)createAdBreakObjectWithName:(nonnull NSString *)name position:(double)position startTime:(double)startTime

Parameters

name

The name of the ad break

position

The position of the ad break in the content starting with 1

startTime

The start time of the ad break relative to the main media

Discussion

Creates an instance of the AdBreak info object

Declared In

ADBMediaHeartbeat.h

createAdObjectWithName:adId:position:length:

Creates an instance of the Ad info object

+ (nonnull ADBMediaObject *)createAdObjectWithName:(nonnull NSString *)name adId:(nonnull NSString *)adId position:(double)position length:(double)length

Parameters

name

The name of the ad

adId

The unique id for the ad

position

The start position of the ad

length

The length of the ad in seconds

Discussion

Creates an instance of the Ad info object

Declared In

ADBMediaHeartbeat.h

createChapterObjectWithName:position:length:startTime:

Creates an instance of the Chapter info object

+ (nonnull ADBMediaObject *)createChapterObjectWithName:(nonnull NSString *)name position:(double)position length:(double)length startTime:(double)startTime

Parameters

name

The name of the chapter

position

The position of the chapter

length

The length of the chapter in seconds

startTime

The start of the chapter relative to the main media

Discussion

Creates an instance of the Chapter info object

Declared In

ADBMediaHeartbeat.h

createMediaObjectWithName:mediaId:length:streamType:

Creates an instance of the media info object for tracking video content. (Deprecated: Use createMediaObjectWithName:mediaId:length:streamType:mediaType: instead.)

+ (nonnull ADBMediaObject *)createMediaObjectWithName:(nonnull NSString *)name mediaId:(nonnull NSString *)mediaId length:(double)length streamType:(nonnull NSString *)streamType

Parameters

name

The name of the media

mediaId

The unqiue identifier for the media

length

The length of the media in seconds

streamType

The stream type as a string. Use the pre-defined constants for vod, live, and linear content

Discussion

Creates an instance of the media info object for tracking video content.

Declared In

ADBMediaHeartbeat.h

createMediaObjectWithName:mediaId:length:streamType:mediaType:

Creates an instance of the media info object

+ (nonnull ADBMediaObject *)createMediaObjectWithName:(nonnull NSString *)name mediaId:(nonnull NSString *)mediaId length:(double)length streamType:(nonnull NSString *)streamType mediaType:(ADBMediaType)mediaType

Parameters

name

The name of the media

mediaId

The unqiue identifier for the media

length

The length of the media in seconds

streamType

The stream type as a string. Use the pre-defined constants for vod, live, linear, aod, audiobook and podcast content

mediaType

The media type.

Discussion

Creates an instance of the media info object

Declared In

ADBMediaHeartbeat.h

createQoSObjectWithBitrate:startupTime:fps:droppedFrames:

Creates an instance of the QoS info object

+ (nonnull ADBMediaObject *)createQoSObjectWithBitrate:(double)bitrate startupTime:(double)startupTime fps:(double)fps droppedFrames:(double)droppedFrames

Parameters

bitrate

The bitrate of media in bits per second

startupTime

The start up time of media in seconds

fps

The current frames per second information

droppedFrames

The number of dropped frames so far

Discussion

Creates an instance of the QoS info object

Declared In

ADBMediaHeartbeat.h

createTimedMetadataObject:

Creates an instance of the Timed Metadata media object

+ (nonnull ADBMediaObject *)createTimedMetadataObject:(nonnull NSString *)metadata

Parameters

metadata

The timed metadata string value

Discussion

Creates an instance of the Timed Metadata media object

Declared In

ADBMediaHeartbeat.h

version

Gets the version.

+ (nonnull NSString *)version

Return Value

a string pointer containing the version value.

Declared In

ADBMediaHeartbeat.h

Instance Methods

initWithDelegate:config:

Creates an instance of ADBMediaHeartbeat class with provided delegate

- (nonnull instancetype)initWithDelegate:(nonnull id<ADBMediaHeartbeatDelegate>)delegate config:(nonnull ADBMediaHeartbeatConfig *)config

Parameters

delegate

ADBMediaHeartbeatDelegate instance

config

ADBMediaHeartbeatConfig instance

Discussion

Creates an instance of ADBMediaHeartbeat class with provided delegate

Declared In

ADBMediaHeartbeat.h

trackComplete

Method to track media complete.

- (void)trackComplete

Discussion

Method to track media complete.

Declared In

ADBMediaHeartbeat.h

trackError:

Method to track an error in media playback

- (void)trackError:(nonnull NSString *)errorId

Parameters

errorId

A string describing the error

Discussion

Method to track an error in media playback

Declared In

ADBMediaHeartbeat.h

trackEvent:mediaObject:data:

Method to track media event.

- (void)trackEvent:(ADBMediaHeartbeatEvent)event mediaObject:(nullable ADBMediaObject *)mediaObject data:(nullable NSDictionary *)data

Parameters

event

ADBMediaHeartbeatEvent type

mediaObject

Optional MediaObject

data

A dictionary pointer containing the context data to be tracked.

Discussion

Method to track media event.

Declared In

ADBMediaHeartbeat.h

trackPause

Method to track media pause.

- (void)trackPause

Discussion

Method to track media pause.

Declared In

ADBMediaHeartbeat.h

trackPlay

Method to track media play or resume after a previous pause.

- (void)trackPlay

Discussion

Method to track media play or resume after a previous pause.

Declared In

ADBMediaHeartbeat.h

trackSessionEnd

Method to track the end of a viewing session. This method must be called even if the user does not view the media to completion.

- (void)trackSessionEnd

Discussion

Method to track the end of a viewing session. This method must be called even if the user does not view the media to completion.

Declared In

ADBMediaHeartbeat.h

trackSessionStart:data:

Method to track the start of a viewing session.

- (void)trackSessionStart:(nonnull ADBMediaObject *)mediaObject data:(nullable NSDictionary *)data

Parameters

mediaObject

An ADBMediaObject instance created using createMediaObjectWithName method

data

A dictionary pointer containing the context data to be tracked.

Discussion

Method to track the start of a viewing session.

Declared In

ADBMediaHeartbeat.h