Class: GoogleIMAVideoWrapper

GoogleIMAVideoWrapper

Player object that wraps the video element.

GoogleIMAVideoWrapper(ima)

Initialize an instance of the current class using the new keyword along with this constructor.
Parameters:
Name Type Description
ima object The GoogleIMA object this will communicate with
Properties:
Name Type Description
controller object A reference to the Ooyala Video Tech Controller
disableNativeSeek boolean When true, the plugin should supress or undo seeks that come from native video controls
readyForCss boolean When true, css may be applied on the video element. When false, css should be stored for use later when this value is true.

Methods

sharedElementGive()

Takes control of the video element from another plugin.

sharedElementGive()

Hands control of the video element off to another plugin.

subscribeAllEvents()

Subscribes to all events raised by the video element. This is called by the Factory during creation.

setVideoUrl(url, encoding, live) → {boolean}

Sets the url of the video.
Parameters:
Name Type Description
url string The new url to insert into the video element's src attribute
encoding string The encoding of video stream, possible values are found in OO.VIDEO.ENCODING (unused here)
live boolean True if it is a live asset, false otherwise (unused here)
Returns:
True or false indicating success
Type
boolean

load(rewind)

Loads the current stream url in the video element; the element should be left paused.
Parameters:
Name Type Description
rewind boolean True if the stream should be set to time 0

setInitialTime(initialTime)

Sets the initial time of the video playback.
Parameters:
Name Type Description
initialTime number The initial time of the video (seconds)

play()

Triggers playback on the video element.

pause()

Triggers a pause on the video element.

seek(time)

Triggers a seek on the video element.
Parameters:
Name Type Description
time number The time to seek the video to (in seconds)

setVolume(volume)

Triggers a volume change on the video element.
Parameters:
Name Type Description
volume number A number between 0 and 1 indicating the desired volume percentage

getCurrentTime() → {number}

Gets the current time position of the video.
Returns:
The current time position of the video (seconds)
Type
number

applyCss(css)

Applies the given css to the video element.
Parameters:
Name Type Description
css object The css to apply in key value pairs

applyStoredCss()

Triggers application of css changes that have been previously stored.

destroy()

Destroys the individual video element.

notifyUnmutedContentAutoPlaybackSucceeded()

Called by the video controller. Notifies the video plugin that unmuted auto-playback of the content was successful. Will notify the IMA ad plugin so that it can play ads unmuted.