track method

Future<void> track(
  1. Event event, {
  2. List<SelfDescribing>? contexts,
  3. MediaPlayerEntity? player,
  4. MediaAdEntity? ad,
  5. MediaAdBreakEntity? adBreak,
})

Tracks a media player event along with the media entities (e.g., player, session, ad).

Implementation

Future<void> track(Event event,
    {List<SelfDescribing>? contexts,
    MediaPlayerEntity? player,
    MediaAdEntity? ad,
    MediaAdBreakEntity? adBreak}) async {
  await Snowplow.trackMediaEvent(
      tracker: tracker,
      id: id,
      event: event,
      contexts: contexts,
      player: player,
      ad: ad,
      adBreak: adBreak);
}