Query String Parameter Examples (Player V2 Deprecated)

Examples of query string parameters that can be passed to the Ooyala Player for basic customizations.

Query String Examples

Note: Ooyala Player V2 has been deprecated and is scheduled to be disabled. For details and alternatives, see the OVP Release Notes.
Note: This software is deprecated. Use the latest version.
The following example shows an embed with a standard player display size of 750px wide by 312px high.
<script
  src="http://player.ooyala.com/player.js?width=750&height=312
  &embedCode=dwbjp-XdAc-w6mATLnMIuwBRxHfF5vRK">
</script> 

The following example hides the sharing, info, and embed buttons with channel browser on the right occupying 300px of the space:

<script
  src="http://player.ooyala.com/player.js?embedCode=
  xpaTQ6lmnTkZSM1K6tzrPAWmznGo9fON&browserPlacement=right300px&hide=sharing,
  info,embed&width=700&height=300">
</script>    

The following example autoplays the first video with the browser on the left occupying 28% of the space:

<script
  src="http://player.ooyala.com/player.js?embedCode=
  xpaTQ6lmnTkZSM1K6tzrPAWmznGo9fON&autoplay=1&
  browserPlacement=left28&width=700&height=300">
</script> 

playerContainerId Query String Parameter Example

With the Player API, you can specify a playerContainerId as an optional parameter on the player.js query string parameters. If specified, we will do an innerHTML swap into the specified DIV instead of using document.write. To use the playerContainerID parameter, you just need to add ?playerContainerId="somename" to your embed code snippet.

The following example speeds up the rendering of the web page by positioning the player.js script at the bottom of the page. This positioning is done by swapping playerContainerID into a DIV Id.

<div id="myplayer"></div> 
<script src="/player.js?  
  playerContainerId=myplayer">
</script> 
You might use this parameter in a case where loading the player.js script on-demand won't clear the entire page with document.write.

Note: You need to make sure the target replace DIV is placed before the player .js script.

playerClassName Query String Parameter Example

With the Player API, you can specify a playerClassName as an optional parameter on the player.js query string parameters. To use the playerClassName parameter, you just need to add ?playerClassName=.... to your embed code snippet.

In the following example, when you embed the following code snippet, the name foo is assigned to the player Class Name.

<script src="<xref href="http://player.ooyala.com/player.js" 
   format="html" scope="external">
   http://player.ooyala.com/player.js</xref>?playerClassName="foo">
/script>
The following example shows what the actual HTML generated would look like when using this parameter to assign "foo" as a Class Name:
<div 
  style="width: 480px; height: 360px; overflow: hidden;" id=
  "ooyalaPlayer382037611_10wqch5OoyalaPlayerOutterWrapper" class="foo">
<object width="480" height="360" type="application/x-shockwave-flash" 
  id="ooyalaPlayer382037611_10wqch5" class="OoyalaVideoPlayer" >.....
</object>
</div>

playerId Query String Parameter Example

With the Player API, you can specify a playerId as an optional parameter on the player.js query string parameters. To use the playerId parameter, you just need to add ?playerId=.... to your embed code snippet. In the following example, when you embed the code snippet, the name foo is assigned to the playerId:
<script
  src="http://player.ooyala.com/player.js?playerId=foo">
</script>
The following example shows what the actual HTML generated would look like when using this parameter to assign foo as an Id:
<div 
  style="width: 480px; height: 360px; overflow: hidden;" 
   id="fooOoyalaPlayerOutterWrapper">
<object width="480" height="360" type="application/x-shockwave-flash" 
   id="foo" class="OoyalaVideoPlayer" data=
   "http://player.ooyala.com/static/cacheable/1330365000/player_v2.swf">
   <param name="allowScriptAccess" value="always">
   <param name="allowFullScreen" value="true">
   <param name="bgcolor" value="#000000">
   <param name="wmode" value="window">....
</object>
</div>

targetReplaceId Query String Parameter Example

With the Player API, you can specify a targetReplaceId as an optional parameter on the player.js query string parameters. To use the targetReplaceId parameter, you just need to add ?targetReplaceId=.... to your embed code snippet.

In the following example, when you embed the code snippet, the name foo is assigned to the player targetReplaceId.

<script src="http://player.ooyala.com/player.js?targetReplaceId="foo">
</script>
...
<!-- div element to be replaced by our player -->
<div 
  id="foo">
</div>
The following example shows what the actual HTML generated would look like when using this parameter to assign foo as a targetReplaceId:
<div
  style="width: 480px; height: 360px; overflow: hidden;" 
  id="fooOoyalaPlayerOutterWrapper">
<object width="480" height="360" type="application/x-shockwave-flash" 
  id="foo" class="OoyalaVideoPlayer" data=
  "http://player.ooyala.com/static/cacheable/1330365600/player_v2.swf">
  <param name="allowScriptAccess" value="always">
  <param name="allowFullScreen" value="true">
  <param name="bgcolor" value="#000000">
  <param name="wmode" value="window">
  <param name="flashvars"......
</object>
</div>

해당 내용이 도움 되었습니까?