Difference between revisions of "Embed WMV"

From TMM Wiki
Jump to navigationJump to search
(proofreading for Dan, added warning at bottom and blurb at top)
Line 22: Line 22:
  
 
<pre>
 
<pre>
   <OBJECT ID="MediaPlayer" width="640" height="480" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
+
   <OBJECT id='mediaPlayer' width="640" height="480"  
     STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
+
    classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
     <PARAM NAME="FileName" VALUE="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}">
+
    codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
     <PARAM name="ShowControls" VALUE="true">
+
     standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
     <param name="ShowStatusBar" value="true">
+
     <param name='fileName' value="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}">
     <PARAM name="ShowDisplay" VALUE="false">
+
     <param name='animationatStart' value='true'>
     <PARAM name="autostart" VALUE="false">
+
    <param name='transparentatStart' value='true'>
     <EMBED TYPE="application/x-mplayer2" SRC="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" NAME="MediaPlayer"
+
     <param name='autoStart' value="true">
    width="640" height="480" ShowControls="1" ShowStatusBar="1" ShowDisplay="0" autostart="0"> </EMBED>
+
     <param name='showControls' value="true">
   </OBJECT>
+
     <param name='loop' value="true">
 +
     <embed type='application/x-mplayer2'
 +
      pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
 +
      id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
 +
      bgcolor='darkblue' showcontrols="true" showtracker='-1'
 +
      showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="640" height="480"
 +
      src="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" autostart="true" designtimesp='5311' loop="true">
 +
    </embed>
 +
   </object>
 
</pre>
 
</pre>
  

Revision as of 14:46, 20 February 2009

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 id='mediaPlayer' width="640" height="480" 
    classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' 
    codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
    standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
    <param name='fileName' value="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}">
    <param name='animationatStart' value='true'>
    <param name='transparentatStart' value='true'>
    <param name='autoStart' value="true">
    <param name='showControls' value="true">
    <param name='loop' value="true">
    <embed type='application/x-mplayer2'
      pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
      id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
      bgcolor='darkblue' showcontrols="true" showtracker='-1' 
      showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="640" height="480"
      src="http://{$smarty.server.HTTP_HOST}{rebuild_link without="style"}" autostart="true" designtimesp='5311' loop="true">
    </embed>
  </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.4.2