Embed WMV

From TMM Wiki
(Redirected from Wmv embed)
Jump to navigationJump to search
CARMA

This article outlines a CARMA template workaround for clients publishing WMV files. This article is intended for anyone who maintains CARMA templates.


A recent update to Windows and/or Windows Media Player is causing WMV files not to play correctly in IE and FireFox for some people. You can fix this by looking for code in your view_clip template similar to this:

  <embed type="application/x-mplayer2"
    pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
    src="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}"
    name="MediaPlayer"
    ShowControls="1"
    ShowStatusBar="1"
    width="320"
    height="285">
  </embed>

and replacing it with this something like this:

<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="player"  width="320" height="260">
  <param name="url" value="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" /> 
  <param name="src"  value="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" />
  <param name="showcontrols" value="true" /> 
  <param name="autostart" value="true" />
  <!--[if !IE]>-->   
    <object type="video/x-ms-wmv" data="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}"  width="320" height="260" >
      <param name="src" value="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" />
      <param name="autostart" value="true" />
      <param name="controller" value="true" />
    </object>
  <!--<![endif]-->    
</object>

You should change this on all your view_clip templates.

Note: The above code blocks are general examples, and that they may not work on your site(s) without modifying them. It is up to you to make changes if necessary.

This new code will be included in the default templates of CARMA starting with version 1.3.5.1