ADBMediaHeartbeat Class Reference
| Inherits from | NSObject |
| Declared in | ADBMediaHeartbeat.h |
Tasks
-
+ version -
– initWithDelegate:config: -
– trackSessionStart:data: -
– trackPlay -
– trackPause -
– trackComplete -
– trackSessionEnd -
– trackError: -
– trackEvent:mediaObject:data: -
+ createMediaObjectWithName:mediaId:length:streamType: -
+ createMediaObjectWithName:mediaId:length:streamType:mediaType: -
+ createAdBreakObjectWithName:position:startTime: -
+ createAdObjectWithName:adId:position:length: -
+ createChapterObjectWithName:position:length:startTime: -
+ createQoSObjectWithBitrate:startupTime:fps:droppedFrames: -
+ createTimedMetadataObject:
Class Methods
createAdBreakObjectWithName:position:startTime:
Creates an instance of the AdBreak info object
+ (nonnull ADBMediaObject *)createAdBreakObjectWithName:(nonnull NSString *)name position:(double)position startTime:(double)startTimeParameters
- 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.hcreateAdObjectWithName: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)lengthParameters
- 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.hcreateChapterObjectWithName: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)startTimeParameters
- 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.hcreateMediaObjectWithName: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 *)streamTypeParameters
- 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.hcreateMediaObjectWithName: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)mediaTypeParameters
- 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.hcreateQoSObjectWithBitrate:startupTime:fps:droppedFrames:
Creates an instance of the QoS info object
+ (nonnull ADBMediaObject *)createQoSObjectWithBitrate:(double)bitrate startupTime:(double)startupTime fps:(double)fps droppedFrames:(double)droppedFramesParameters
- 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.hcreateTimedMetadataObject:
Creates an instance of the Timed Metadata media object
+ (nonnull ADBMediaObject *)createTimedMetadataObject:(nonnull NSString *)metadataParameters
- metadata
The timed metadata string value
Discussion
Creates an instance of the Timed Metadata media object
Declared In
ADBMediaHeartbeat.hInstance Methods
initWithDelegate:config:
Creates an instance of ADBMediaHeartbeat class with provided delegate
- (nonnull instancetype)initWithDelegate:(nonnull id<ADBMediaHeartbeatDelegate>)delegate config:(nonnull ADBMediaHeartbeatConfig *)configDiscussion
Creates an instance of ADBMediaHeartbeat class with provided delegate
Declared In
ADBMediaHeartbeat.htrackComplete
Method to track media complete.
- (void)trackCompleteDiscussion
Method to track media complete.
Declared In
ADBMediaHeartbeat.htrackError:
Method to track an error in media playback
- (void)trackError:(nonnull NSString *)errorIdParameters
- errorId
A string describing the error
Discussion
Method to track an error in media playback
Declared In
ADBMediaHeartbeat.htrackEvent:mediaObject:data:
Method to track media event.
- (void)trackEvent:(ADBMediaHeartbeatEvent)event mediaObject:(nullable ADBMediaObject *)mediaObject data:(nullable NSDictionary *)dataParameters
- event
- mediaObject
Optional MediaObject
- data
A dictionary pointer containing the context data to be tracked.
Discussion
Method to track media event.
Declared In
ADBMediaHeartbeat.htrackPause
Method to track media pause.
- (void)trackPauseDiscussion
Method to track media pause.
Declared In
ADBMediaHeartbeat.htrackPlay
Method to track media play or resume after a previous pause.
- (void)trackPlayDiscussion
Method to track media play or resume after a previous pause.
Declared In
ADBMediaHeartbeat.htrackSessionEnd
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)trackSessionEndDiscussion
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.htrackSessionStart:data:
Method to track the start of a viewing session.
- (void)trackSessionStart:(nonnull ADBMediaObject *)mediaObject data:(nullable NSDictionary *)dataParameters
- 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