ASP.NET - video display

Asked By madhu krishna on 19-Jul-11 02:44 AM
<object width="312px" height="248px" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
viewastext>
<param name="autoStart" value="False">
<param name="URL" value="./Movie/Pljacka.wmv">
<param name="enabled" value="True">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="enableContextMenu" value="True">
<param name="fullScreen" value="False">
<param name="mute" value="False">
<param name="playCount" value="1">
<param name="rate" value="1">
<param name="stretchToFit" value="False">
<param name="uiMode" value="full">
</object>
<embed type="video/x-ms-wmv" width="416px" height="320px" autostart="true" url="./prodvideos/TASP2W1_P1_L01_T02.wmv"
enabled="True" balance="0" currentposition="0" enablecontextmenu="True" fullscreen="False"
mute="False" playcount="1" rate="1" stretchtofit="False" uimode="3">
for this code how to display video
by giving file name in cs code
Reena Jain replied to madhu krishna on 19-Jul-11 03:10 AM
hi,

You can do this on two different ways, with static HTML tags <OBJECT > and <EMBED>, or by embedded Flash video player (this is YouTube's approach). With static HTML here is the code :

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title></title>
</head>
<body>
  <form id="form1" runat="server">
   <object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="280" width="320"
   codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#version=6,4,7,111">
  <param name="URL" value="Video/Didi.flv">
  <param name="autoStart" value="false">
  <param name="UIMode" value="full">
  You do not have Windows Media Player installed.
  Get it here.
  </object>
  <object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="280" width="320">
  <param name="URL" value="Video/As%20long%20as%20you%20love%20me.WMV" />
  <param name="autoStart" value="false">
  <param name="UIMode" value="full">
  </object>
  </form>
</body>
</html>

Hope this will help you
Reena Jain replied to madhu krishna on 19-Jul-11 03:10 AM
Hi,
There are many ways now a days to play video on your website.

1) Flash Player

for flash  visit

http://blogs.ugidotnet.org/kfra/archive/2006/10/04/50003.aspx

2) HTML5 video tag

To display video using HTML5 just follow the code

<video src="movie.ogg" controls="controls"></video>

3) Silverlight.

<MediaElement
 Width="472"
 Height="328"
 Canvas.Left="40"
 Canvas.Top="40"
 Source="EmergencySituation.wmv"
 Stretch="Fill"/>
for silverlight just in xmal file and use in your asp.net application

Hope this will help you
dipa ahuja replied to madhu krishna on 19-Jul-11 04:29 AM
Untitled document
You can use the below code:
 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9.0.0.0"
id="3"
width="600"
height="350">
<param name="movie" value="4.avi">
<param name="bgcolor" value="#FFFFFF">
<embed name="FSB" src="4.avi" width="400" height="320" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"/>
</object>
 

OR
You can download Video control for asp.net from :
 
http://videoshow.codeplex.com/
 
Right Click on the toolBox and choose "Add Tab"
 
and in that new tab again right click and - > "choose item"
 
now one dialogbox will be appear..
 
from that click on browse Button and add the dll of videoCotnrol..
 
and just drag n drop video control :
 
<ASPNetVideo:WindowsMedia ID="WindowsMedia1" runat="server"
  VideoURL="~/DSCN3995.AVI">
   </ASPNetVideo:WindowsMedia>
  
 
Hope this will help you !