updateMediaTracking static method

Future<void> updateMediaTracking({
  1. required String tracker,
  2. required String id,
  3. MediaPlayerEntity? player,
  4. MediaAdEntity? ad,
  5. MediaAdBreakEntity? adBreak,
})

Updates stored attributes of the media player such as the current playback. Use this function to continually update the player attributes so that they can be sent in the background ping events.

Implementation

static Future<void> updateMediaTracking({
  required String tracker,
  required String id,
  MediaPlayerEntity? player,
  MediaAdEntity? ad,
  MediaAdBreakEntity? adBreak,
}) async {
  await _channel.invokeMethod('updateMediaTracking', {
    'tracker': tracker,
    'mediaTrackingId': id,
    'player': player?.toMap(),
    'ad': ad?.toMap(),
    'adBreak': adBreak?.toMap(),
  });
}