Player V3 Embedded Parameters (Deprecated)

Note: Ooyala Player V3 has been deprecated and is scheduled to be disabled. For details and alternatives, see the OVP Release Notes.
You can pass embedded parameters to the OO.Player.create() method. These parameters include:
  • CSS style settings (such as width and height)
  • supported Flash attributes (such as wmode)
  • other parameters (such as tags from your ad server or ad network account used for advanced ad tracking and targeting)
The following table describes some of these embedded parameters, which are represented as key value pairs, that you may use with the OO.Player.create() method. Unless otherwise indicated, the parameters in the table may be used for both HTML5 and Flash players.
Note: To specify embedded parameters for Google IMA, VAST, VPAID, FreeWheel, and Liverail, see Player V3 Embedded Parameters for Ads (Deprecated) and follow the links for the desired ad manager or module.
Table 1. Embedded Parameters
Parameter Key Description
adSetCode

Each ad set has a unique Ad Set Code identifier. Use the adSetCode key value pair to associate an ad set with a particular player and player asset (video).

Note: You must first setup the Ad Set Code in Backlot. For additional information about setting up an ad set code in Backlot and using adSetCode, see Assigning an Ad Set with OO.Player.create in Player V3 (Deprecated).

Example:

<script>
    var videoPlayer = OO.Player.create('playerwrapper','embed_code',{
      height:'100%',
      width:'100%',
      adSetCode:'yourAdSetCode'
    });
<script>
analytics

Enables the use of custom analytics tags in Player V3.

Example:

...
var ca_tags = [];
ca_tags[0] = "toolbar";
OO.ready(
    function () {
        OO.Player.create('ooyalaplayer',
            'w3ZHc0Njr33Tdp-RRcwfZMjaOrmzOP82', {
                analytics: {
                    "tags": ca_tags
                }
            });
    });
...
Note: For additional information about custom analytic tags and using these tags with the Backlot REST API, see Custom Analytics: Tags and Custom Analytics: Tags.
autoplay

Enables the automatic playing of an asset (video or audio) upon loading. This is useful for UIs that do not have play/pause controls or conditions where you want the content to play immediately.

Example:

var videoPlayer = OO.Player.create('playerwrapper',
         'embed_code', {
         height:100%,
         width:100%,
         autoplay:true,
         .... 
  });
enableChannels Enables loading Flash videos in Channels mode. This parameter provides backwards compatibility for channels. By default the flag is set to a value of false. The embedChannels parameter handles HTML5 compatibility and ensures Flash channel usability.

For HTML:

  • Set enableChannels : true to play the first video of the channel or the first video of the first channel of the channel set
  • Set enableChannels : false to display an error screen.

For Flash:

  • Set enableChannels : true to pass the channel embed to the player to run normally (this may impact performance).
  • Set enableChannels : false to display an error screen.
Example:
var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    enableChannels: true,
    ....
});
initialTime Use this parameter to set an initial time in seconds to start playing content at a specific point. This parameter can be used to enable seeking for iOS-based devices. You can also use this parameter with Cross-Device Resume to seek to a specific user's position.

Type: integer

Valid Values: time in seconds

Example: initialTime: 10

OO.ready(function () {
    window.pp = OO.Player.create('playerV3Container',
        'embed_code', {
        width: 480,
        height: 360,
        initialTime: 10
    }); 
in-stream Use this parameter to pass In-Stream ad server or network tags to the Ooyala player. The parameter takes a key value pair representing an In-Stream URL.

Example:

var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    'in-stream': {
        tagUrl: 'some url',
        ....
    },
});
locale

Use this parameter to set or override the language and closed caption options. In the following example, the locale parameter is used to create a Hebrew localized player. Note that because of the way that closed captions are supported in iOS, we are not able to add closed caption data for IOS web for remote assets.

Example:
var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    locale: 'he_IL',
    ....
});
loop Use this parameter to enable continuous play. With loop set to true, once the playback has started it continues until the user stops playback or closes the browser. Also the behavior is the same when embed code is set using setEmbedCode. As soon as the embed code is set, if autoplay is true, the playback starts immediately regardless of the previous state of the player (video playing/paused/stopped). If autoplay and loop parameters are not passed in through setEmbedCode, the existing values are used (which may have been set via a previous call to setEmbedCode).

Example:

var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    loop: true,
    ....
});
onCreate Use this parameter to listen to an event message and perform an action. This parameter enables you to subscribe to event messages from the message bus before the player is fully created. It allows you to modify the player prior to its complete creation.

When called, onCreate: function(player):

  • Checks for any additional modules (custom, 3rd party or other type).

  • Enables these additional modules to connect to the message bus.

  • Sends a message to the message bus signaling each module to start up.

You must call onCreate before anything can happen; otherwise, the existing and additional or third-party modules are not connected to the message bus and are not initialized.

Example

    OO.Player.create('playerwrapper',embedCode, {
      onCreate: function(player) {
        player.subscribe('*','myPage', function(eventName) {});
      }
    });

onCreate and the Player V2 Callback

To handle events in Player V2, you can define a callback function, and then pass its name to the embed tag using a callback parameter. However, to handle events in Player V3, you provide an onCreate function to the OO.Player.create() call, and then register for all the messages. For more information about Player V3 events, see Event Model for HTML5 Player V3 (Deprecated). For information about Player V2 callbacks and parameters, see the Player Query String Parameters (Player V2 Deprecated) topic. Keep in mind that Player V2 is deprecated.

preload Use this parameter to disable preloading of videos, which happens by default. You might want to disable loading for different reasons:
  • To decrease load time when loading multiple videos on the same page
  • To avoid the cost of loading when you expect a video to be played infrequently

Example:

var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    preload: false,
    ....
});
showAdMarquee
Note: This parameter is for Flash only.

Specifies whether to show or hide the ad marquee during ad playback. If showAdMarquee is missing or set to true, the ad marquee will appear while an ad is playing on your player. This global parameter works for all ad types supported by Ooyala.

Valid Values: true | false
  • True: adMarquee will appear during ad playback.
  • False: adMarquee will be hidden during ad playback.

Default: True

Example:
var player = OO.Player.create('playerwrapper', embedCode, {
    showAdMarquee: true
});
showInAdControlBar

Specifies whether to show or hide the control bar during ad playback. If showInAdControlBar is missing or set to true, the control bar will appear while an ad is playing on your player. This global parameter works for all ad types supported by Ooyala.

Note: This parameter is available for Flash and HTML5 desktop.

Valid Values: true | false
  • True: controlBar will appear during ad playback.
  • False: controlBar will be hidden during ad playback.

Default: True

Example:
var player = OO.Player.create('playerwrapper', embedCode, {
    showInAdControlBar: false
});
tvRatingsPosition

Note: This parameter is for Flash desktop only.

This optional parameter specifies the position on the player where the TV rating watermark will appear.

Valid Values: top-left | top-right | bottom-left | bottom-right

Default: top-left

Note: To apply a TV Rating watermark to an asset, you need to include custom metadata in Backlot per asset you want given the TV Rating watermark. See Adding a TV Rating Watermark to a Flash Player for detailed information on applying a TV Rating watermark to an asset.

Example:
var player = OO.Player.create('playerwrapper', embedCode, {
    tvRatingsPosition: "top-left"
});
tvRatingsTimer

Note: This parameter is for Flash desktop only.

Specifies the duration of the TV Rating watermark on the player (in seconds) on initial play and every time the video resumes from Ad breaks. This parameter is required if you want to apply a TV Rating watermark to an asset.

Valid Values: always | never | some_number
  • always: The watermark appears for the duration of the video (but will not appear during ad playback).
  • never: The watermark never appears.
  • some_number: You will replace some_number with the number of seconds you want the TV rating to remain on the player.

Default: never

Note: To apply a TV Rating watermark to an asset, you need to include custom metadata in Backlot per asset you want given the TV Rating watermark. See Adding a TV Rating Watermark to a Flash Player for detailed information on applying a TV Rating watermark to an asset.

Example:
var player = OO.Player.create('playerwrapper', embedCode, {
    tvRatingsTimer: "15"
});
useFirstVideoFromPlaylist Use this parameter to set the video in the player to the first video from the first playlist.

Type: Boolean

Example:
var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    useFirstVideoFromPlaylist: true,
    ....
   };

    ooyalaPlayer = OO.Player.create('playerContainer', '', playerConfiguration);
}); 

Note:When a playlist is updated, after the caches expire, the first video in the first playlist that useFirstVideoFromPlaylist uses is updated.

If you don't want the video in the player to be the first video from the first playlist you can use another video by setting this parameter to "false" and specifying the desired video's embed_code in the OO.Player.create function like so:
var videoPlayer = OO.Player.create('playerwrapper',
    'embed_code', {
    height: 100%,
    width: 100%,
    useFirstVideoFromPlaylist: false,
    ....
   };

    ooyalaPlayer = OO.Player.create('playerContainer', 'embed_code', playerConfiguration);
});

Was this article helpful?