API and SDK FAQ

Frequently asked questions about API and SDKs.

New Player Skin for iOS and Android

Q: Where are the latest versions of the SkinSDK for iOS and Android?

A: Download the latest Android SkinSDK at http://static.ooyala.com.s3.amazonaws.com/sdk/android/release/OoyalaSkinSDK-Android.zip and the latest iOS SkinSDK at http://static.ooyala.com.s3.amazonaws.com/sdk/ios/release/OoyalaSkinSDK-iOS.zip.

Q: What's new in this release for the mobile SDKs for iOS and Android?

A: For this release, the mobile SDKs for iOS and Android have a completely rebuilt user interface that aligns perfectly (when reasonable) with the HTML5 player user interface. See User Interface for the Player V4 Skin.

Q: What can I configure in this new interface?

A: You can adjust the player user interface settings (see Customizing the Player V4 Appearance) by modifying the file skin.json. You can use the same skin.json file for your HTML5, iOS, and Android players, creating a unified look and feel.

Q: How can I add a WaterMark click-through URL?

A: You can do this using the controlBar.watermark.clickUrl field in skin.json.

Q: What will happen to syndicated players that are not on my website?

A: They will remain operational unless they are migrated.

Q: How can I add another Social share option?

A: You must use advanced skin customization by altering the skin code directly. The associated code is located in the skin within js/views/shareScreen.js.

Mobile Ads

Q: What Ad Providers do Ooyala support?

A: We support the following ad formats, networks, and services (which we call "ad sources"):
  • VAST 2.0
  • Google IMA
  • FreeWheel
  • LiveRail for delivery via the Ooyala Mobile SDKs
  • Ooyala Ads (videos marked as ads)
  • Ooyala Pulse (formerly known as Videoplaza)

Q: What are the requirements for VAST tags for mobile?

A: As long as your tags are VAST-compliant, there are no mobile-specific requirements, except a mobile-playable video format. VAST wrapper tags are also supported.

Q: What are the supported video formats and codecs for mobile?

Q: What are the iOS limitations for Ad playback?

A: There is no clickthrough for ads on the iPhone. However, clickthrough URLs are supported on iPad.

Q: Would VPAID ads work in iOS?

A: VPAID (which is essentially Flash ads) does not work on iOS or Android.

Q: Can I assign ad sets dynamically at the page level?

A: Yes, you can.

Q: How should I setup VAST tags to work on mobile?

A: The easiest way is to use the Backlot UI to create an ad set of VAST tags and associate that ad set with the videos.
Note: For use on mobile devices, be sure to create the ad set as type "VAST Compliant" (either overlay or in-stream). On mobile, when the video plays, its associated ads are played as well. For more detail on creating ad sets in the Backlot UI, see Working with Your Own Ad Assets, Ad Sets, and Ad Sources. For information about setting up dynamic ad tags with the Ooyala player on the desktop, see Assigning Ad Sets Dynamically in Player V3 (Deprecated).

Q: Which ad sources support ad countdown?

A: None, except LiveRail and TV2/Nord (TV2N).

High Performance API

Q: Will POST and PATCH requests be faster when using the High Performance API?

A: No. The high performance API endpoint at http://cdn-api.ooyala.com is for speeding up response to GET (read) requests. It rejects other request methods, such as POST or PATCH. For all non-GET requests, use the normal endpoint at http://api.ooyala.com/. For more details, see High Performance API Endpoint.

Q: Do I get more credits when using the High Performance API?

A: You do not get more credits when you use the high performance API endpoint at http://cdn-api.ooyala.com. There is credit limit. The advantage of using High Performance API is that as long as you are requesting the same information (same API call) from the cache no credits are being used and so the credit limit is not affected. If the same call is used in a time window of 5 minutes no credits will be reduced from the account, as the results are cached for that period of time. But, if a call previously created is queried after 5 minutes from the first time the call was used, the new credits will be reduced from the account. For more details, see API Rate Limiting and High Performance API Endpoint.

tvOS SDK

Q: Why am I not able to adjust the volume using the +/- keys, and why is no event is being triggered?

A: This is a known Apple issue. You must configure your Apple TV and remote to work with your TV's volume. For more information, see https://support.apple.com/en-us/HT205225.

iOS SDK

Q: Where is the latest version of the Mobile SDK for iOS?

A: Please see Ooyala Downloads. You can access sample applications for the mobile SDK for iOS at https://github.com/ooyala/ios-sample-apps.

Q: How do I set the player to fullscreen by default?

A: The easiest way to enter fullscreen in your app is to specify the controlType when you create the view controller. In the snippet below (taken from the sample Getting Started app in the SDK distribution), the controlType of OOOoyalaPlayerControlTypeFullScreen has been added to the initWithPcode call:
// Create Ooyala ViewController
  ooyalaPlayerViewController = [[OOOoyalaPlayerViewController alloc]
 initWithPcode:PCODE domain:PLAYERDOMAIN
controlType:OOOoyalaPlayerControlTypeFullScreen
                

Q: How can I pass an Ad Set Code to the player dynamically?

A: You can pass the identifier (the name) of a defined ad set as an argument to the setEmbedCode function with the keyword adSetCode, as shown in the snippet below (taken from the Getting Started sample app in the SDK distribution). In this example, the name of the ad set has not yet been specified and is shown as a variable to be replaced: <# NSString *)#>.
.
.
.
// Load the view
   [ooyalaPlayerViewController.player setEmbedCode: EMBED_CODE
adSetCode: <# (NSString *)#>];
.
.
.                
For more details on the setEmbedCode function, see the JavaDocs in the SDK distribution.

Q: How do I use the bitrate selector?

A: There is no user interface for selecting bit rate, because we want to allow the Adaptive Bit Rate (ABR) features of our system to work without any human intervention. ABR efficiently selects the right stream on behalf of the user. Programmatically, you can retrieve the current bit rate, but you cannot set it. For our iOS Mobile SDK, see documentation for the bitrate function.

Q: How can I show the CC option on the player?

A: You need to set up closed captions in the Backlot UI and associate them with the video. You first need to create DFXP (now TTML) files for the desired languages and then associate those files with the videos. After this setup work, closed captions are displayed automatically on mobile devices whenever the viewer enters fullscreen mode and/or inline mode on iOS or fullscreen mode on Android. The viewer is also shown the controls to select a language.

Q: Is it possible to allow viewers to watch video offline?

A: No.

Q: Which are the ads supported in iOS SDKs?

A: We support the following ad formats, networks, and services:
  • VAST
  • Google IMA
  • FreeWheel
  • LiveRail for delivery via the Ooyala Mobile SDKs
  • Ooyala Ads (videos marked as ads)

Q: Can I set videos to autoplay with the Mobile SDK for iOS?

A: Yes, you can. The Mobile SDK will queue-up videos (embed codes) and play them automatically once all system and app resources have been set up. All you need is the following snippet:
.
.
.
[ooyalaPlayerViewController.player setEmbedCode:EMBEDCODE];
[ooyalaPlayerViewController.player play];
.
.
.                

Q: I don't see my pcode in Backlot in the DEVELOPERS tab. Where can I find my pcode?

A: Your pcode (also called "provider ID" or "Partner Code") is part of your API Key, which should always be viewable on the ACCOUNTS > Developers tab. First, make sure you are logged into an account that should have a provider ID. The pcode is the alphanumeric string that precedes the period (".") in the API key. For example, if the API key is xxxxxxxxxxxxxxxxxxxxxxxxxxxx.0000, then the pcode is the first 28 characters (xxxxxxxxxxxxxxxxxxxxxxxxxxxx). For details, see Your API Credentials. If the problem persists, contact Technical Support or your Customer Success Manager.

Q: What are the iOS limitations for ad playback?

A: There is no clickthrough behavior for ads on the iPhone. There are no skippable ads on the iPhone due to this limitation. However, clickthrough URLs are supported on iPad devices.

Android SDK

Q: Where is the latest version of the Mobile SDK for Android?

A: Please see the Ooyala Downloads page. You can find sample apps for the mobile SDK for Android at https://github.com/ooyala/android-sample-apps.

Q: How do I set the player to fullscreen by default?

A: The easiest way is to use the setFullscreen() method of the layout controller that you instantiate before playing the video. In the following snippet from the Getting Started sample app in the SDK distribution, after the playerLayoutController object has been instantiated with PCODE and new PlayerDomain(DOMAIN), its setFullscreen() method is invoked before the video is named with setEmbedCode(EMBED) and before it is played:
.
.
.
.
OoyalaPlayerLayout playerLayout = (OoyalaPlayerLayout)
findViewByID(R.id.ooyalaPlayer);
    OoyalaPlayerLayoutController playerLayoutController = new
OoyalaPlayerLayoutController(playerLayout, PCODE, new PlayerDomain(DOMAIN));
   playerayoutController.setFullscreen();
    player = playerLayoutController.getPlayer();
    if (player.setEmbedCode(EMBED)) {
        player.play();
        } else {
        Log.d(this.getClass().getName(), "Something Went Wrong!");
    }
.
.
.        

Q: How can I pass an Ad Set Code to the player dynamically?

A: You can pass the identifier (the name) of a defined ad set as an argument to the setEmbedCodeWithAdSetCode() method. In this example, the name of the ad set has not yet been specified and is shown as a variable to be replaced: nameOfAdSet>.
.
.
. 
    if (player.setEmbedCodeWithAdSetCode(EMBED),<nameOfAdSet>) {
        player.play();
    } else {
        Log.d(this.getClass().getName(), "Something Went Wrong!");
    }
.
.
.           
For more details on the setEmbedCodeWithAdSetCode() method, see the JavaDocs in the SDK distribution.

Q: How do I use the bitrate selector?

A: There is no user interface for selecting bit rate, because we want to allow the Adaptive Bit Rate (ABR) features of our system to work without any human intervention. ABR efficiently selects the right stream on behalf of the user. Programmatically, you can retrieve the current bit rate, but you cannot set it. For our Android Mobile SDK, see the documentation for the getBitrate function.

Q: How can I show the CC option on the player?

A: You need to set up closed captions in the Backlot UI and associate them with the video. You first need to create DFXP (now TTML) files for the desired languages and then associate those files with the videos. After this setup work, closed captions are displayed automatically on mobile devices whenever the viewer enter fullscreen mode and / or inline mode on iOS or fullscreen mode on Android. The viewer is also shown the controls to select a language.

Q: Minimum supported version of Android OS for the SDK player?

A: At the very least you must use version 2.2.

Q: Which are the ads supported in Android SDK?

A: We support the following ad formats, networks, and services:
  • VAST
  • Google IMA
  • FreeWheel
  • Ooyala Ads (videos marked as ads)

Q: Can I set videos to autoplay with the Mobile SDK for Android?

A: Yes, you can. The Mobile SDK will queue-up videos (embed codes) and play them automatically once all system and app resources have been set up. All you need is the following code snippet:
.
.
.
player.setEmbedCode(embed);
player.play();
.
.
.

Player Branding

Q: How do I know which player branding ID to use?

A: The player branding ID (also sometimes simply called the "player ID") for all your defined players is viewable in the Backlot UI. For your default player's branding ID, go to the MANAGE page and select one of your videos. In the lower portion of the screen, click the Embed tab. The player ID is displayed at the lower right. If you have Ooyala Discovery enabled, go to the PUBLISH > Player Branding > Discovery page. The player ID is displayed towards the bottom of the page.

Q: The web page is not showing the right player. What do I need to check?

A: You need to verify that your web page is referring to the correct player ID (also called "player branding ID") in the code that embeds the player and video in your page.
  1. First, find the player ID that is embedded in your page. For example, the following is an embed code; the player ID comes immediately after "v3/" and is highlighted in bold:
    <script src='//player.ooyala.com/v3/ e18ab1da1813483499554ea2d8e67fbd'></script><div id='ooyalaplayer' style='width:720px;height:480px'></div><script>OO.ready(function() { OO.Player.create('ooyalaplayer', 'w3ZHc0Njr33Tdp-RRcwfZMjaOrmzOP82'); });</script><noscript><div>Please enable Javascript to watch this video</div></noscript>
  2. Next, verify the player ID of the player that you are expecting to be displayed. (See the question "How do I know which branding ID to use?").
  3. Compare the two player IDs. Are they the same?
  4. In the embed code (the JavaScript <script> statement like the example shown above), substitute the correct player ID for the bad one.
  5. Retest your web page.

Q: How do I hide the AdCountDownMessage setting for Player V3?

A: In the Backlot UI, go to the PUBLISH page, "Player Branding" tab, "Player" subtab. In the left column is a checkbox for "Ad Countdown Message". Make sure this checkbox is not selected.

Facebook

Q: Does Facebook support Ooyala's JavaScript?

A: No.

Q: In Backlot, can I see how many times my videos have been shared on Facebook?

A: No. At this time, in Backlot’s ANALYZE > External Publishingtab, only videos shared on YouTube can be listed.

Q: How can I share my videos so they play within Facebook (not redirecting to my page)?

A: The basic information about setting up sharing Ooyala-hosted videos on Facebook, including the Ooyala Facebook Sample Code/SDK, is described in Sharing Video on Facebook. On the Facebook’s timeline or other post on Facebook, the playback on Facebook will always occur. However, there are two different behaviors with the thumbnail image and the text information from the URL (title and description): if the user clicks on the image, the video always plays, but next to the image there is a text square. If the user clicks the title or the description the browser is redirected to another window. Facebook has an internal cache that might cause a delay in showing the expected results. If you are testing your developed programs and are updating them frequently, it is necessary to rename the URL for them to override Facebook’s cache so you get the latest behavior.

Q: I'm getting a Content Unavailable error when playing back in Facebook. What should I do?

A: There can be a wide variety of reasons for this error, everything from network problems to possible service outages. Attempt to access the video several times, and If the problem persists, file a ticket with Ooyala Technical Support.

Q: Does Facebook have syndication or monetization restrictions? What are they?

A: The follow types of publishing rules can limit access to videos posted to Facebook:
  • Flight times
  • Device restrictions
  • Ooyala Player Token (OPT) access controls
The following access control mechanisms do not work with Facebook:
  • Domain controls: You must either disable domain controls completely, or specify the http://no.javascript domain.
  • Adobe Pass

Q: Are Ooyala videos supported in Facebook SDK for iOS? Or Facebook SDK for Android?

A: No. In addition, Ooyala-served videos appear only as links in Facebook for mobile, not as viewable videos.

Q: How can I make my videos autoplay in Facebook?

A: Due to a limitation from Facebook you cannot make your Backlot videos autoplay in Facebook. However, if the video is uploaded to Facebook you can get the autoplay functionality.

Backlot API

Q: Is there a list of field names (properly known as “properties”) that can be queried using the Query API?

A: Yes, the following are names of an asset's properties that can be queried:
  • asset.metadata
  • asset_type
  • created_at
  • description
  • embed_code
  • external_id
  • file_size
  • flight_end_time
  • flight_start_time
  • hosted_at
  • label
  • name
  • preview
  • promo
  • status
  • updated_at
These properties and many of their values are listed in Asset Properties by Asset Types. For details and examples of constructing queries, see Query Construction

Q: If I want to share content across sites, can I set multiple permalinks fields per asset?

A: Yes, you can. In the Backlot UI’s MANAGE > Embed > Permalink where content is embedded field, specify multiple URLs separated by commas, like the following: http://somehost1.example.com,http://somedifferenthost2.example.com You can also specify multiple comma-separated URLs as a value for the hosted_at property in the /v2/assets API request. See Asset Properties by Asset Types.

Player API

Q: Will the API parameter to set cue point( oo.loadRatingsApi() work for HTML5 player?

A: No, it is supported for Flash only.

Was this article helpful?