Using Content Editor web Part we can play videos in SharePoint,
Add Content Editor Web Part to the page and add the following code
Example Code |
WMA Audio Files
<OBJECT ID="MMPlayer1" WIDTH=280 HEIGHT=45 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="$thisfolderurl$YourSongName.wma"> <PARAM NAME="ShowControls" VALUE="1"> <PARAM NAME="ShowStatusBar" VALUE="0"> <PARAM NAME="ShowDisplay" VALUE="0"> <PARAM NAME="DefaultFrame" VALUE="Slide"> <PARAM NAME="Autostart" VALUE="0"> <Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" src="$thisfolderurl$YourSongName.wma" Name=MMPlayer1 Autostart=0 ShowControls=1 ShowDisplay=0 ShowStatusBar=0 DefaultFrame="Slide" width=280 height=45> </embed> </OBJECT>
Example Code |
WMV Video Files
<OBJECT ID="MMPlayer1" WIDTH=280 HEIGHT=200 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="$thisfolderurl$YourVideoName.wmv"> <PARAM NAME="ShowControls" VALUE="1"> <PARAM NAME="ShowStatusBar" VALUE="0"> <PARAM NAME="ShowDisplay" VALUE="0"> <PARAM NAME="DefaultFrame" VALUE="Slide"> <PARAM NAME="Autostart" VALUE="0"> <Embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/download/default.asp" src="$thisfolderurl$YourVideoName.wmv" Name=MMPlayer1 Autostart=0 ShowControls=1 ShowDisplay=0 ShowStatusBar=0 DefaultFrame="Slide" width=280 height=200> </embed> </OBJECT>
Example Code |
Flash 4
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=Movie1 WIDTH=550 HEIGHT=400> <PARAM NAME=movie VALUE="$thisfolderurl$FlashFileName.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="$thisfolderurl$FlashFileName.swf" quality=high bgcolor=#FFFFFF WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED> </OBJECT>
Example Code |
Flash 6 (MX)
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="550" HEIGHT="400" id="Untitled-1" ALIGN=""> <PARAM NAME=movie VALUE="$thisfolderurl$FlashFileName.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="$thisfolderurl$FlashFileName.swf" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="Untitled-1" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> </OBJECT>
Example Code |
Flash 7 (MX Pro 2004)
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="550" height="400" id="Untitled-1" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="$thisfolderurl$FlashFileName.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="$thisfolderurl$FlashFileName.swf" quality="high" bgcolor="#ffffff" width="550" height="400" name="Untitled-1" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Example Code |
Flash 8 (MX Pro 2004)
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="300" height="200" id="Untitled" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="$thisfolderurl$moviename.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="$thisfolderurl$moviename.swf" quality="high" bgcolor="#ffffff" width="300" height="200" name="Untitled" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Example Code |
FLV (Flash Video)
<object type="application/x-shockwave-flash" width="400" height="350" wmode="transparent" data="flvplayer.swf?file=FILENAME.flv&autoStart=true"> <param name="movie" value="flvplayer.swf?file=FILENAME.flv&autoStart=true" /> <param name="wmode" value="transparent" /> </object>
Change FILENAME.flv to the name of your own .flv file and set the width and height.
Download the zip file below, extract the .swf player file and attach it with your .flv file in Website Properties > Attached Files.
Click here to download. DjMixMan_flvplayer.zip
Example Code |
Mov (Quicktime Movie)
<embed src="$thisfolderurl$MovieName.mov" width="200" height="240" autoplay="true">
Example Code |
AVI (Audio Video Interleave)
<object data="$thisfolderurl$VideoFileName.avi" type="video/avi"> </object>
Example Code |
MPG
<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" id="MediaPlayer1" width="286" height="225"> <param name="Filename" value="$thisfolderurl$MyVideo.mpg"> <param name="AutoStart" value="-1"> <param name="ShowAudioControls" value="-1"> <param name="ShowDisplay" value="-1"> </object>
Example Code |
DivX
<object classid="clsid:67DABFBF-D0AB-41fa-9C46-CC0F21721616" width="400" height="200" codebase="http://go.divx.com/plugin/DivXBrowserPlugin.cab"> <param name="src" value="$thisfolderurl$moviename.divx> <embed type="video/divx" src="$thisfolderurl$moviename.divx" width="400" height="200" pluginspage="http://go.divx.com/plugin/download/"> </embed> </object>
No comments:
Post a Comment