A tracking manager that reports events to the Studio enabler. It listens for all the events using a VideoEventDispatcher that monitors a NetStream object and Sound object independent of the player.
Constants
Name | Value | Description |
---|---|---|
VIDEO_EVENT_PREFIX | EVENT_VIDEO_ | |
VIDEO_INTERACTION_EVENT | EVENT_VIDEO_INTERACTION | |
VIEW_TIMER_EVENT_NAME | EVENT_VIDEO_VIEW_TIMER |
Static Methods
StudioTrackingManager.getInstance(reportingIdentifier:String)
:
StudioTrackingManager
Gets an instance of the StudioTrackingManager multiton with the reporting identifier as a key.
Instance Methods
Defined in com.google.ads.studio.video:StudioTrackingManager
getVideoEventDispatcher()
:
VideoEventDispatcher
Gets the VideoEventDispatcher the tracking manager is listening for events on.
initializeSession()
:
void
Initializes the tracking manager for a video session. This is important as only one tracking manager is created per reporting identifier, however there may be multiple usages of that identifier. We need to reset some variables states that are non-transient per session in order to ensure that the session is tracked properly.
setPlayOffsetTime(offsetTime:Number)
:
void
Sets the offset that should be added to the elapsed time of the video. This can be used when the video doesn't start playing at the beginning of the ad.
setPrimary(primary:Boolean)
:
void
Sets whether this StudioTrackingManager should report itself as the primary video when calling met events on the enabler. If true, causes the enabler to dispatch standard VAST events for this video.
startMonitoring(netStream:flash.net:NetStream, trackAsAutoPlay:Boolean=false)
:
void
Initiate monitoring on a NetStream and Sound object.
startTracking()
:
void
Start tracking the netStream and sound events. Default is to track the events.
stopTracking()
:
void
Stops tracking the netStream and sound events. Default is to track the events.
unload()
:
void
Unloads the tracking manager and preps it for garbage collection as best as possible.