media

ADBMobile. media

Classes

MediaInfo
AdInfo
ChapterInfo
AdBreakInfo
QoSInfo

Members

(static, readonly) StreamType :string

Properties:
Name Type Description
VOD string

Constant defining stream type for VOD streams

LIVE string

Constant defining stream type for LIVE streams

LINEAR string

Constant defining stream type for LINEAR streams

PODCAST string

Constant defining stream type for PODCAST streams

AUDIOBOOK string

Constant defining stream type for AUDIOBOOK streams

AOD string

Constant defining stream type for AOD streams

Type:
  • string

(static, readonly) MediaType :string

Properties:
Name Type Description
Video string

Constant defining media type for Video streams

Audio string

Constant defining media type for Audio streams

Type:
  • string

(static, readonly) Event :string

Properties:
Name Type Description
AdBreakStart string

Constant defining event type for AdBreak start

AdBreakComplete string

Constant defining event type for AdBreak complete

AdStart string

Constant defining event type for Ad start

AdComplete string

Constant defining event type for Ad complete

AdSkip string

Constant defining event type for Ad skip

ChapterStart string

Constant defining event type for Chapter start

ChapterComplete string

Constant defining event type for Chapter complete

ChapterSkip string

Constant defining event type for Chapter skip

SeekStart string

Constant defining event type for Seek start

SeekComplete string

Constant defining event type for Seek complete

BufferStart string

Constant defining event type for Buffer start

BufferComplete string

Constant defining event type for Buffer complete

BitrateChange string

Constant defining event type for change in Bitrate

Type:
  • string

(static, readonly) MediaObjectKey :string

Properties:
Name Type Description
StandardMediaMetadata string

Constant defining Map of Standard Video/Audio Metadata to be attached on MediaObject.

StandardAdMetadata string

Constant defining Map of Standard Ad Metadata to be attached on AdObject.

MediaResumed string

Constant defining explicit media resumed property. Set this to true on MediaObject if resuming a previously closed session.

Type:
  • string

(static, readonly) VideoMetadataKeys :string

Standard video metadata keys are
SHOW
SEASON
EPISODE
ASSET_ID
GENRE
FIRST_AIR_DATE
FIRST_DIGITAL_DATE
RATING
ORIGINATOR
NETWORK
SHOW_TYPE
AD_LOAD
MVPD
AUTHORIZED
DAY_PART
FEED
STREAM_FORMAT

Type:
  • string

(static, readonly) AudioMetadataKeys :string

Standard audio metadata keys are
ARTIST
ALBUM
LABEL
AUTHOR
STATION
PUBLISHER

Type:
  • string

(static, readonly) AdMetadataKeys :string

Standard ad metadata keys are
ADVERTISER
CAMPAIGN_ID
CREATIVE_ID
PLACEMENT_ID
SITE_ID
CREATIVE_URL

Type:
  • string

(static, constant) BUFFER_START :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) BUFFER_COMPLETE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) SEEK_START :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) SEEK_COMPLETE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) BITRATE_CHANGE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) CHAPTER_START :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) CHAPTER_COMPLETE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) CHAPTER_SKIP :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_BREAK_START :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_BREAK_COMPLETE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_BREAK_SKIP :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_START :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_COMPLETE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) AD_SKIP :string

Deprecated:
  • Will be removed after 2.2 release.
See:
Type:
  • string

(static, constant) STREAM_TYPE_LIVE :string

Deprecated:
  • Will be removed after 2.2 release.
See:
  • Use ADBMobile.StreamType#LIVE instead.
Type:
  • string

(static, constant) STREAM_TYPE_VOD :string

Deprecated:
  • Will be removed after 2.2 release.
See:
  • Use ADBMobile.StreamType#VOD instead.
Type:
  • string

Methods

(static) setDelegate(delegate)

Sets an instance of MediaDelegate to be used by the ADBMobile library.
The delegate object passed should have 2 functions.
1) getCurrentPlaybackTime() - Returns current playback time in seconds.
2) getQoSObject() - Returns the quality of service of current playback as QOSObject created using ADBMobile.media.createQoSObject method.

Parameters:
Name Type Description
delegate object

Delegate instance

(static) trackSessionStart(mediaObject, data)

Tracking method to load media information and track the start of a viewing session.

Parameters:
Name Type Description
mediaObject object

An MediaObject instance created using createMediaObject method

data object

an object containing the context data to be tracked.

(static) trackPlay()

Tracking method to track media play and resume after a previous pause.

(static) trackPause()

Tracking method to track media pause.

(static) trackError(errorId)

Tracking method to track an error in media playback.

Parameters:
Name Type Description
errorId string

A string describing the error

(static) trackEvent(event, info, data)

Tracking method to track an event in media playback.

Parameters:
Name Type Description
event ADBMobile.media.Event

Event to be tracked.

info object

a info object of the Event to be tracked.

data object

an object containing the context data to be tracked.

(static) trackComplete()

Tracking method to track media complete.

(static) trackSessionEnd()

Tracking method to track the end of a viewing session.
This method must be called even if the user does not watch the media to completion.

(static) createMediaObject(name, mediaId, length, streamType, mediaType)

Creates an instance of the Media info object.

Parameters:
Name Type Description
name string

The name of the media

mediaId string

The unique identifier for the media

length number

The length of the media in seconds

streamType string

The stream type of the media. Use the pre-defined constants ADBMobile.media.StreamType or custom values.

mediaType ADBMobile.media.MediaType

The type of the media

(static) createAdBreakObject(name, position, startTime, playerName)

Creates an instance of the AdBreak info object.

Parameters:
Name Type Description
name string

The name of the ad break

position number

The position of the ad break in the content starting with 1

startTime number

The start time of the ad break relative to the main media

playerName string

The name of the player used to play AdBreak.

(static) createChapterObject(name, position, length, startTime)

Creates an instance of the Chapter info object.

Parameters:
Name Type Description
name string

The name of the chapter

position number

The position of the chapter

length number

The length of the chapter in seconds

startTime number

The start time of the chapter relative to the main media

(static) createAdObject(name, adId, position, length)

Creates an instance of the Ad info object.

Parameters:
Name Type Description
name string

The name of the ad

adId string

The unique id for the ad

position number

The start position of the ad

length number

The length of the ad in seconds

(static) createQoSObject(bitrate, startupTime, fps, droppedFrames)

Creates an instance of the QoS info object.

Parameters:
Name Type Description
bitrate number

The bitrate of media in bits per second

startupTime number

The start up time of media in seconds

fps number

The current frames per second information

droppedFrames number

The number of dropped frames so far

(static) trackLoad()

Deprecated:
  • Will be removed after 2.2 release.
See:

(static) trackStart()

Deprecated:
  • Will be removed after 2.2 release.
See:

(static) trackUnload()

Deprecated:
  • Will be removed after 2.2 release.
See: