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.
Constant name | Description |
---|---|
MediaHeartbeat.Event.SeekStart |
Constant for tracking Seek Start event. |
MediaHeartbeat.Event.SeekComplete |
Constant for tracking Seek Complete event. |
Listen for the playback seeking events from the media player, and on seek start event notification, track seeking using the SeekStart
event:
public void onSeekStart(Observable observable, Object data) {
_heartbeat.trackEvent(MediaHeartbeat.Event.SeekStart, null, null);
}
On seek complete notification from the media player, track the end of seeking using the SeekComplete
event:
public void onSeekComplete(Observable observable, Object data) {
_heartbeat.trackEvent(MediaHeartbeat.Event.SeekComplete, null, null);
}
See the tracking scenario VOD playback with seeking in the main content for more information.