You can use Windows Media Player to play AVI files. Here is the html code:
<OBJECT ID="MediaPlayer" WIDTH="320" HEIGHT="160" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject"> <PARAM NAME="FileName" VALUE="yourFile.avi"> <PARAM name="autostart" VALUE="false"> <PARAM name="ShowControls" VALUE="true"> <param name="ShowStatusBar" value="false"> <PARAM name="ShowDisplay" VALUE="false"> <EMBED TYPE="application/x-mplayer2" SRC="yourFile.avi" NAME="MediaPlayer" WIDTH="320" HEIGHT="160" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"> </EMBED> </OBJECT>
You can also use FlashPlayer.
Since you have a file in the form of a byte array (db source), you will need to create a shared handler (ashx) to transfer this file to Media Player. Then the Html parameter for FileName will look something like this:
<PARAM NAME="FileName" VALUE="handler.ashx?file=yourFile">
Make sure you set the correct ContentType inside the ashx handler as follows:
context.Response.ContentType = "video/avi"; context.Response.Write(fileData, 0, fileData.Length);
Here is the link to get started with ashx files:
http://msdn.microsoft.com/en-us/library/bb398986(v=vs.100).aspx
source share