API Updates FAQ Start Using Swift

Start Using Swift

We've done our best to make the transition to our new Ooyala Player, Swift, as easy and painless as possible. However, there are a few different things you may need to do in order to successfully transition over, depending both on what features you are using, and what level of testing you'd like to do before using Swift on all of your traffic. While we've made every effort to ensure that the transition will be seamless, we recommend that high traffic sites and complex player integrations use Swift on a test page or single video before converting all of their traffic onto Swift.

Some special cases may apply to your integration of the Ooyala Player:

How to turn Swift on for your whole site
    1. Log into Backlot and go to the "Player Branding" subtab under the "Account" tab. You will see a list of your players.
    2. Check the "Use New Player" checkbox next to each of your players.
    3. For each player, you may want to look through the various styling tabs to the right in order to customize the look and feel of the player. We've added a number of new options including a new color selection for channels and channel sets and some start screen options.
    4. Check the various portions of your site that use the player and verify that everything works properly and looks good.

It may take several minutes for the change to take effect, so if you don't see Swift immediately, wait a minute or two. In the unlikely case something doesn't work properly with Swift on your site, simply go back into Backlot and uncheck the "Use New Player" checkboxes to revert to using the old player. Contact support@ooyala.com with any questions or problems you are having and we'll look at it as soon as we can.

How to test Swift before turning it on for your whole site
    1. Log into Backlot and go to the "Player Branding" subtab under the "Account" tab. This will show you a list of your players.
    2. Click the "Add New Player" button. This will create a new player, which you'll notice is marked as "Use New Player". This will be your test player.
    3. Set any styling settings in the tabs to the right. You'll notice that there are a number of new options here, including a new color selection for channels and channel sets and start screen options.
    4. Go to the Content tab, and either find a video/channel/channel set you'd like to use to test with or upload/create a new one.
    5. Once you've found the video/channel/channel set you'd like to test with, click on it to select it, then click the "Edit Video" button beneath the preview image, and select your test player from the "Custom Player" dropdown. This will enable Swift for that video/channel/channel set.
    6. Go look at that video/channel/channel set within your site (or embed it on a test page if it's a new asset). It may take several minutes for the change to take effect, so if you don't see Swift immediately, wait a minute or two. In the unlikely case something doesn't work properly with Swift on your site, simply go back into Backlot and set the custom player back to the previous player to revert to using the old player. Then contact support@ooyala.com with a description of the issue you're having, and we'll look at it as soon as we can.
    7. Once you're satisfied that your site doesn't have any issues using Swift, you can either create new players that have the "Use New Player" checkbox checked, or simply check that checkbox on your existing players. Keep in mind that any changes will take effect more or less immediately, so if you'd like to make styling changes, you may want to create new players, tweak the styling, and then move your videos to them.

Changing <object> embed tags (affects users with Javascript disabled and "Flash Embed Code" snippets from Backlot)

Users who have Javascript disabled

When you check the "Use New Player" box in Backlot, this will only affect your users that have Javscript enabled. While this is the vast majority of users (>95%), if you'd like to ensure that those users that have Javascript turned off also see Swift, you'll need to modify the embed snippet that you pasted onto your web pages. If you decide to wait, when we remove support for the old player, we'll switch all your users with Javascript over to Swift, and everything will continue to work fine.

If you pasted the "Flash Embed Code" from Backlot onto your website:

If you pasted the "Flash Embed Code" from Backlot to embed your videos, channels, or channel sets, you should start by follow the instructions listed under How to turn Swift on for your whole site. However, checking the "Use New Player" box in Backlot will not affect players that have embedded using the "Flash Embed Code" snippet from Backlot, only those that are embedded using the "HTML Embed Code" snippet. To convert flash embed code players to use Swift, you'll need to change the embed snippet itself.

What to do

Your embed snippet will include something like the following:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ooyalaPlayer_7b6i_fuz0d7kf" width="800" height="280" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="http://www.ooyala.com/player.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" /><embed src="http://www.ooyala.com/player.swf" quality="high" bgcolor="#000000" width="800" height="280" name="ooyalaPlayer_7b6i_fuz0d7kf" align="middle" play="true" loop="false" quality="high" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" flashvars="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object>

You need to change both occurances of "player.swf" to be "player.swf?version=2". For example, the above snippet would become the following (changes in bold):

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ooyalaPlayer_7b6i_fuz0d7kf" width="800" height="280" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="http://www.ooyala.com/player.swf?version=2" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" /><embed src="http://www.ooyala.com/player.swf?version=2" quality="high" bgcolor="#000000" width="800" height="280" name="ooyalaPlayer_7b6i_fuz0d7kf" align="middle" play="true" loop="false" quality="high" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" flashvars="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object>

We recommend, for the best possible future compatibility, that you append "&embedCode=<embed_code>" after "version=2", where <embed_code> is replaced with the embedCode value that appears elsewhere in the snippet. For example, the above snippet would become:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="ooyalaPlayer_7b6i_fuz0d7kf" width="800" height="280" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab"><param name="movie" value="http://www.ooyala.com/player.swf?version=2&embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" /><embed src="http://www.ooyala.com/player.swf?version=2&embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" quality="high" bgcolor="#000000" width="800" height="280" name="ooyalaPlayer_7b6i_fuz0d7kf" align="middle" play="true" loop="false" quality="high" allowscriptaccess="always" allowfullscreen="true" type="application/x-shockwave-flash" flashvars="embedCode=s2ZmdnOhen4zhrlg8LJowKZ06pWJL0Ih" pluginspage="http://www.adobe.com/go/getflashplayer"></embed></object>

You can also recopy the embed snippet out of Backlot, though this may be more time consuming if you have many videos.

If you've embedded the Ooyala Player in your own flash application:

You'll need to download a new copy of FlashPlayer.as (download here), and recompile your application.

If you embed the player by reading an MRSS feed:

Your MRSS feeds will automatically update when you change your player to Swift within Backlot. If you're comfortable turning on Swift immediately for your whole site, follow the instructions listed in the How to turn Swift on for your whole site section. Otherwise, if you want to test it first, follow the instructions listed in the How to test Swift before turning it on for your whole site section. While it won't be possible to test it on a test page, you can turn it on for a single video in your MRSS feed, to make sure it works properly.

If you're using dynamic channels:

If you're using dynamic channels, and are using an embedCode to specify which videos are shown, then simply follow the instructions list in the How to turn Swift on for your whole site section or How to test Swift before turning it on for your whole site section. The dynamic channel will show Swift when the "Use New Player" checkbox is checked for the custom player assigned to the video for that embedCode.

If you're using pcode for your dynamic channel, the "Use New Player" checkbox for your default player will control whether Swift is used or not. If you'd like to test on a single dynamic channel, simply add "&version=2" to the end of your dynamic channel query string arguments.

If you're embedding a player with no embed code, and then setting the embed code later via Javascript:

Some implementations specify an embed code after the player has been loaded using the Player Javascript API. If you're loading a player without specifying an embed code, simply add "&version=2" to the query string, ie:

<script src="http://www.ooyala.com/player.js?width=800&height=280&version=2"></script>