Rich Media

  • iOS
  • watchOS
  • tvOS
 

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.

In cases of a Swift project,
please import the Tracker module (or TrackerExtension if your target is an extension) in your ViewController. In
cases of an Objective-C project, please import the headers ATInternet.h, ATTracker.h, then depending on the type of
content, ATAudio.h, ATVideo.h, ATLiveAudio.h, ATLiveVideo.h, ATMedium.h, ATLiveMedium.h.

 

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:
    • < v2.9.0 : Sends a media play hit with a refresh hit sent automatically every 5
      seconds
    • >= v.2.9.0 :  Sends a media play hit with a refresh hit sent automatically with
      intervals defined like this:

      • Every 5 seconds during the first minute
      • Every 15 seconds between the second and the fifth minute
      • Every 30 seconds between the sixth and the tenth minute
      • Every minute for play duration > 10 minutes
  • sendPlay with int 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!) (Deprecated in v2.9.0)
  • 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
  • >= v.2.9.0 :
    • sendPlay(SparseIntArray refreshDurations) : custom refresh interval can be defined
    • sendPlayWithoutRefresh() :Sends a media play hit without refresh
    • sendResume() : Resume media tracking preserved updated intervals
 

Dynamic refresh (>= 2.9.0)

sendPlay method has been improve in order to optimise refresh durations all along a media playback. Since
version 2.9.0, sendPlay takes in parameter a Dictionary<Int, Int> like [0: 5, 2: 10, 3:
20] meaning :

From 0 to 2 minutes of media read (not affected by sendMove method), there will be a 5 seconds refresh
duration.
From 2 to 3 minutes, there will be a 10 seconds refresh duration.
After 3 minutes, there will be a 20 second refresh duration.

In the case of the sendPause(), the sendResume() method will be used
to resume and keep the playback and dynamic refresh in progress. If sendPlay(_) is called instead of
sendResume(), the dynamic refresh will restart from the beginning.

 

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 duration by default ( [0:5, 1:15, 5:30, 10:60] )

  2. Tagging a video play with a dynamic refresh duration

  3. Tagging a video play with themes (chapters for older sdk versions)

  4. Tagging a video “pause”

  5. Tagging a video “stop”

  6. Tagging video information

  7. Tagging others actions 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 live video information

  6. Tagging others actions on the 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 audio information

  6. Tagging others actions on the audio

 

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 live audio information

  6. Tagging others actions on the live audio

 

Medium

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

  • add : Enables the addition of a medium and returns a Medium
    object.
  • remove : Deletes a medium
  • removeAll : Deletes all media
 

Tagging examples

  1. Tagging medium play without refresh

  2. Tagging medium play with refresh (refresh period cannot be less than 5 seconds)

  3. Tagging a medium ‘pause’

  4. Tagging medium ‘stop’

  5. Tagging medium information

  6. Tagging others actions on the medium

 

LiveMedium

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

  • add : Enables the addition of live medium to the player and returns a
    LiveMedium object.
  • remove : Deletes a live medium
  • removeAll : Deletes all live medium
 

Tagging examples

  1. Tagging live medium play without refresh

  2. Tagging live medium play with refresh (refresh period cannot be less than 5 seconds)

  3. Tagging a live medium ‘pause’

  4. Tagging a live medium stop

  5. Tagging live medium information