Track seeking on iOS
Last update: November 11, 2022
- Topics:
- Media Analytics
CREATED FOR:
- User
- Admin
- Developer
The following instructions provide guidance for implementation across all 2.x SDKs.
If you are implementing a 1.x version of the SDK, you can download the 1.x Developers Guides here: Download SDKs.
Seek tracking constants
Constant name | Description |
---|---|
ADBMediaHeartbeatEventSeekStart | Constant for tracking Seek Start event. |
ADBMediaHeartbeatEventSeekComplete | Constant for tracking Seek Complete event. |
Implement seeking
-
Listen for the playback seeking events from the media player, and on seek start event notification, track seeking using the
SeekStart
event:- (void)onSeekStart:(NSNotification *)notification { [_mediaHeartbeat trackEvent:ADBMediaHeartbeatEventSeekStart mediaObject:nil data:nil]; }
-
On seek complete notification from the media player, track the end of seeking using the
SeekComplete
event:- (void)onSeekComplete:(NSNotification *)notification { [_mediaHeartbeat trackEvent:ADBMediaHeartbeatEventSeekComplete mediaObject:nil data:nil]; }
See the tracking scenario VOD playback with seeking in the main content for more information.
recommendation-more-help
c8eee520-cef5-4f8c-a38a-d4952cfae4eb