Rich Media

 

Foreword

AT Internet’s SDK allows you to tag videos and audio media played by the user during app usage.

 

Get off to a good start

Once your tag has been initialised, you can begin tagging your videos and audio media.

To use SDK class and methods, add ATInternet namespace to your Page.

 

Tagging

Rich Media tagging is not accounted for in the Dispatch mechanism!

The tracker makes available a MediaPlayers object. This object exposes the following methods:

  • Add: Enables the addition of a new player and returns a MediaPlayer object
  • Remove: Delete a player
  • RemoveAll: Delete all players

When a player is deleted, if media is currently being played, a hit will be automatically sent in order to stop measurement.

Once a player is instantiated, it is possible to tag videos and audio media.

All objects listed below expose the following methods:

  • SendPlay: Sends a media play hit with a refresh hit sent automatically every 5 seconds
  • SendPlay with refresh period: Same as above, except it is possible to specify the refresh period (the specified parameter cannot be less than 5, which is the minimum period EXCEPT if the parameter is set to 0, in which case refreshing is not enabled!)
  • SendPause: Sends a hit when media has been paused
  • SendStop: Sends a hit when media playback has been stopped completely
  • SendMove : Sends a hit when the player’s play cursor has been moved
 

Video

The MediaPlayer object makes a Videos object available. This object exposes the following methods:

  • Add: Enables the addition of a video to the player and returns a Video object
  • Remove: Deletes a video
  • RemoveAll: Deletes all videos
 

Tagging examples

  1. Tagging a video play with refresh period by default
  2. Tagging a video play with refresh (refresh period cannot be less than 5 seconds)
  3. Tagging a video ‘pause’
  4. Tagging a video ‘stop’
  5. Tagging cursor movement on the video
 

LiveVideo

The MediaPlayer object makes a LiveVideos object available. This object exposes the following methods:

  • Add: Enables the addition of a live video to the player and returns a LiveVideo object
  • Remove: Deletes a live video
  • RemoveAll: Deletes all live videos
 

Tagging examples

  1. Tagging a live video play without refresh
  2. Tagging a live video play with refresh (refresh period cannot be less than 5 seconds)
  3. Tagging a live video ‘pause’
  4. Tagging a live video ‘stop’
  5. Tagging cursor movement on a live video
 

Audio

The MediaPlayer object makes an Audios object available. This object exposes the following methods:

  • add: Enables the addition of audio media to the player and returns an Audio object.
  • remove: Deletes an audio media
  • removeAll: Deletes all audio media
 

Tagging examples

  1. Tagging audio media play without refresh
  2. Tagging audio media play with refresh (refresh period cannot be less than 5 seconds)
  3. Tagging an audio media ‘pause’
  4. Tagging an audio media ‘stop’
  5. Tagging cursor movement on audio media
 

LiveAudio

The MediaPlayer object makes a LiveAudios object available. This object exposes the following methods:

  • Add: Enables the addition of live audio media to the player and returns a LiveAudio object.
  • Remove: Deletes a live audio media
  • RemoveAll: Deletes all live audio media
 

Tagging examples

  1. Tagging a live audio media play without refresh
  2. Tagging a live audio media play with refresh (refresh period cannot be less than 5 seconds)
  3. Tagging a live audio media ‘pause’
  4. Tagging a live audio media ‘stop’
  5. Tagging cursor movement on live audio media
 

Shared properties

Name Type Default value Description
Name String Empty string Gets or sets the name of the viewed media
Chapter1 String? null Gets or sets the first chapter
Chapter2 String? null Gets or sets the second chapter
Chapter3 String? null Gets or sets the third chapter
Action Enum null Gets or sets the action type
Level2 Int? -1 Gets or sets the level 2 ID
IsBuffering Bool? false Indique si le média est en “buffering”
IsEmbedded Bool? false Indicates if the media is external to the application
Webd@omain String? null Gets or sets the media referrer in case of external placements (isEmbedded at true)
 

MediaPlayer class

 

Properties

Name Type Default value Description
PlayerId Int 1 Gets or sets the player ID
Videos Videos null Gets the instance allowing video management
Audios Audios null Gets the instance allowing audio media management
LiveVideos LiveVideos null Gets the instance allowing live video management
LiveAudios LiveAudios null Gets the instance allowing live audio media management

Management of player ID is automatic but you can nonetheless specify one.

 

Video class

 

Properties

Name Type Default value Description
Duration Int 0 Gets or sets total video length, in seconds
 

Audio class

 

Properties

Name Type Default value Description
Duration Int 0 Gets or sets total audio media length, in seconds
 

Methods

Name Return type Description
SendPlay() void Sends a play hit with an automatic refresh of 5 seconds
SendPlay(refreshDuration: Int) void Sends the play hit with an automatic refresh, given in parameters (0 = refresh disabled)
SendPause void Sends ‘pause’ hit
SendStop void Sends ‘stop’ hit
SendMove void Sends ‘play cursor’ movement hit
Was this post helpful?
Yes
No
Last update: 26/12/2018