Migrating an Existing Embed Code to Player V3

Migrating an existing embed code is straightforward in Player V3.

To get started, you can copy an existing web page to test out the migration process. If you have many web pages or a site with multiple players, you may want to script the migration. To start migrating from a web page, you need to do the following:

  1. Insert the correct DOCTYPE in your web page.
  2. Set up your head tags and include the script tags around your existing load player statements. For example:
     
    <script
     src="http://player.ooyala.com/player.js?width=750&height=312
     &embedCode=replace_with_embed_code">
    </script>
    
  3. Then add the <head> tags and the v3 path. Instead of the embed code information, you insert the player branding id (get this from Backlot). If your player is a Flash player, it will continue to work as always. The Player V3 will “wrap” the Flash player and playback continues to work as it normally does.
     
    <head>
    
    <!-- Load Ooyala Player -->
     <script src='http://player.ooyala.com/v3/
      replace_with_player_branding_id'></script>
    
    </head>
    
  4. Within the <body> tags, you will place the player in the <div> container and include your embed code information. In the following example, we have taken the size parameters and specified them in the <div> container. However, you can also specify the <div> container as one size and the actual video another size by adding additional parameters.
     
    <body>
    <!-- Player Placement -->
    <div id='playerwrapper' style='width:750px;height:312px;'></div>
    <script>
        var videoPlayer = OO.Player.create('playerwrapper','replace_with_embed_code');
        videoPlayer.play();
    </script>
    </body>
    
  5. That is all you need to do to migrate to the new embed style.

Was this article helpful?