Hai everyone, I am working with one Image/Video Application using JSP.

In my jsp i need to displaying and playing a video file.
I am using the following Embed tag, for the video file.

<OBJECT 
ID="mediaPlayer" 
CLASSID= "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE= "[URL]http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701[/URL]"
TYPE="application/x-oleobject" 
STANDBY="Loading media player components..." 
HEIGHT="200" WIDTH="250"> 
<PARAM NAME="showcontrols" VALUE="true">
<PARAM NAME="autostart" VALUE="false">
<PARAM NAME="loop" VALUE="false">
<PARAM NAME="filename" VALUE="photo/video/<%=category%>/<%=image.elementAt(i*4+1)%>">
<EMBED TYPE="video/x-msvideo" 
STANDBY="Loading media player components…"
CONTROLLER="true" 
CONTROLS="ImageWindow,ControlPanel" 
SHOWCONTROLS="true" 
AUTOSTART="false" 
HEIGHT="200" WIDTH="250" 
SRC="photo/video/<%=category%>/<%=image.elementAt(i*4+1)%>" >
</OBJECT>

While using this Embed Tag, such type of video files are not playing(ex: *.flv, *.avi, *.mov, etc.,).

I need to play all types of video files in any browser.

Can anyone help me for this.

Waiting for replies..

Regards

Tamilvanan

looks like you are using two similar tag inside of each other, which is resulting into nothing... you can refer to this site: http://cit.ucsf.edu/embedmedia/step1.php to get your embedding code... click on the media type, and give the information it is asking for, it will generate code for you... and plz post in the correct forum.... good luck... :)

Hai, Thanks for your replies.
Still such type of files does not playing in browser, like(*.flv, *.avi, *.mp4, etc.,)

In your References, there are separate Embed Tags for each player, such as separate Embed Tag for Windows Media Player, Real Player, Quick Time Player.

But in my system there is installed Windows Media Player only.

I have used the following code for windows media player, to play the video files such as (ex: *.wmv, *.mov, *.mpeg, *.mpg, *.avi, *.flv, *.mp4, etc.,).

<object type="video/x-ms-*" 
  data="[EMAIL="photo/video/baby/1@barsandtone.flv"]photo/video/baby/1@barsandtone.flv[/EMAIL]" 
  width="420" height="360">
  <param name="autostart" value="true" />
  <param name="controller" value="true" />
</object>
 
and
 
<object type="video/x-ms-wmv" 
  data="[EMAIL="photo/video/baby/1@barsandtone.flv"]photo/video/baby/1@barsandtone.flv[/EMAIL]"
  width="320" height="260">
  <param name="src" 
    value="<A href="photo/video/baby/1@barsandtone.flv"/>"
  <param name="autostart" value="true" />
  <param name="controller" value="true" />
</object>

and this also

<OBJECT id='mediaPlayer' width="320" height="285" 
      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="[EMAIL="photo/video/baby/1@barsandtone.flv"]photo/video/baby/1@barsandtone.flv[/EMAIL]">
      <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="320" height="285"
        src="[EMAIL="photo/video/baby/1@barsandtone.flv"]photo/video/baby/1@barsandtone.flv[/EMAIL]" autostart="true" designtimesp='5311' loop="true">
      </EMBED>
      </OBJECT>

But for those types there are *.flv, *.mp4, *.avi files does not play with this Embed Tag

I need to play all those types of video files also in a same Embed Tag in any browser.

So if there is any aother solution

Thanks in advance

Tamilvanan

i still can't understand your question... so u r saying u know how to embed flv or not?
for the media files, it does not matter what type of file you want to play, but what type of object you want to embed.... suppose, for a mpg file, you need to embed windows media player, not mpg file it self... thn u will pass the location of mpg file to the object media player as a parameter... same way, flv is a flash document... u need to know how to embed a flash object... (i am not sure if you can run a flv file using windows media player)... same thing goes for mp4, avi.
if you move this topic to web developers forum in this website, you may find better response.

Hai, still i am having the problem,
I have attached the jsp file, what i have used, please refer the file, and let me know what else i have done. The filename was videos.zip

In this file i have using separate Embed/Object Tag for each type of video files, and in my system installed Windows Media Player, Flash player, VLC Media Player.

So with this condition, what can i do for this...

Please reply me, i am waiting for replies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.