Link to home
Start Free TrialLog in
Avatar of sunshine737
sunshine737

asked on

how to show a mpeg or other videos within a webpage

Hi,

I have designed a webpage where I embedded media player and on the other side I have put video names as anchor tags.
So what I would like to do is when the user clicks these tags I want to play the video in my webpage.

Could anyone please help me how to do this.

Thanks

My´code
-------------

<HTML>
<HEAD>
<style type="text/css">

 
  background-position: left;
  background-repeat: no-repeat;}
</style>



</HEAD>
<BODY bgcolor = "#707070" >
<a href="I:\Gotla\docu\Information\web\arun.html"><b><h4 style="color:green">Home </h></b></a><a <br>

   
<table width = "100%" height = "">
<tr>



</td>

<td width="25%" height = "" valign="left">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="flash/swflash.cab#version=6,0,0,0">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="100%" HEIGHT="" id="TEST" ALIGN="">
<PARAM NAME=movie VALUE="I:\Gotla\docu\Information\web\flash\Autumn leaves start to fall.swf">
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=best>
<PARAM NAME=scale VALUE=exactfit>
<param name=salign value=T>
<PARAM NAME=bgcolor VALUE=#FFFFFF>

<EMBED src="I:\Gotla\docu\Information\web\flash\Autumn leaves start to fall.swf" menu=false quality=best scale=noscale bgcolor=#FFFFFF  WIDTH="100%" HEIGHT="" NAME="TEST" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>

</OBJECT>
<br><br><br>
<p>
<i><b><font size="3" face="Times new roman" style="color:#FAEBD7">
Click on below links to see the videos
</i></b></font>
</p>

<ul>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
<li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman" style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
</ul>


</td>

<td width="75%" height = "" valign="top">
<object id="WMPlayer1" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" height="590" width="750"> <param name="uiMode" value="full" /> <param name="autoStart" value="true" /> <param name="URL" value="" />  Your browser does not support ActiveX controls or the Windows Media Player. </object>
<br>


</tr>
</table>


</BODY>  
</HTML>



Avatar of minichicken
minichicken

Have a look at http:Q_21197752.html

hope this helps
Avatar of sunshine737

ASKER

when im doing this, its opening a new page with quick time player and playing the video......



<HTML>
<HEAD>
<style type="text/css">

 
  background-position: left;
  background-repeat: no-repeat;}
</style>



</HEAD>
<BODY bgcolor = "#707070" >
<a href="I:\Gotla\docu\Information\web\arun.html"><b><h4 style="color:green">Home </h></b></a><a <br>

   
<table width = "100%" height = "">
<tr>



</td>

<td width="25%" height = "" valign="left">

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"

codebase="flash/swflash.cab#version=6,0,0,0">http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,

0,0" WIDTH="100%" HEIGHT="" id="TEST" ALIGN="">
<PARAM NAME=movie VALUE="I:\Gotla\docu\Information\web\flash\Autumn leaves start to fall.swf">
<PARAM NAME=menu VALUE=false>
<PARAM NAME=quality VALUE=best>
<PARAM NAME=scale VALUE=exactfit>
<param name=salign value=T>
<PARAM NAME=bgcolor VALUE=#FFFFFF>

<EMBED src="I:\Gotla\docu\Information\web\flash\Autumn leaves start to fall.swf" menu=false quality=best scale=noscale

bgcolor=#FFFFFF  WIDTH="100%" HEIGHT="" NAME="TEST" ALIGN="" TYPE="application/x-shockwave-flash"

PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>

</OBJECT>
<br><br><br>
<p>
<i><b><font size="3" face="Times new roman" style="color:#FAEBD7">
Click on below links to see the videos
</i></b></font>
</p>

<ul>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
<li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
 <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
  <li><a href="I:\Gotla\docu\Information\others\Bush bored boy.mpeg"><b><i><b><font size="3" face="Times new roman"

style="color:#E6E6FA">Bush's boring speech</b></i></b></font></a></li><br><br>
</ul>


</td>

<td width="75%" height = "" valign="top">
<object classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"

codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" id="wmp"

type="application/x-oleobject" width="700" height="570" standby="Loading Microsoft Windows Media Player components...">
                          <param NAME="AudioStream" VALUE="-1">
                          <param NAME="AutoSize" VALUE="0">
                          <param NAME="AutoStart" VALUE="0">
                          <param NAME="AnimationAtStart" VALUE="-1">
                          <param NAME="AllowScan" VALUE="0">
                          <param NAME="AllowChangeDisplaySize" VALUE="true">
                          <param NAME="AutoRewind" VALUE="0">
                          <param NAME="Balance" VALUE="0">
                          <param NAME="BufferingTime" VALUE="5">
                          <param NAME="ClickToPlay" VALUE="-1">
                          <param NAME="CursorType" VALUE="0">
                          <param NAME="DisplayBackColor" VALUE="0">
                          <param NAME="DisplayForeColor" VALUE="16777215">
                          <param NAME="DisplayMode" VALUE="0">
                          <param NAME="DisplaySize" VALUE="">
                          <param NAME="Enabled" VALUE="-1">
                          <param NAME="EnableContextMenu" VALUE="0">
                          <param NAME="EnablePositionControls" VALUE="-1">
                          <param NAME="EnableFullScreenControls" VALUE="0">
                          <param NAME="EnableTracker" VALUE="-1">
                          <param NAME="Filename" VALUE="I:\Gotla\docu\Information\others\Bush bored boy.mpeg">
                          <param NAME="InvokeURLs" VALUE="-1">
                          <param NAME="Language" VALUE="-1">
                          <param NAME="Mute" VALUE="0">
                          <param NAME="PlayCount" VALUE="1">
                          <param NAME="PreviewMode" VALUE="0">
                          <param NAME="Rate" VALUE="1">
                          <param NAME="SAMILang" VALUE>
                          <param NAME="SAMIStyle" VALUE>
                          <param NAME="SAMIFileName" VALUE>
                          <param NAME="SelectionStart" VALUE="-1">
                          <param NAME="SelectionEnd" VALUE="-1">
                          <param NAME="SendOpenStateChangeEvents" VALUE="-1">
                          <param NAME="SendWarningEvents" VALUE="-1">
                          <param NAME="SendErrorEvents" VALUE="-1">
                          <param NAME="SendKeyboardEvents" VALUE="0">
                          <param NAME="SendMouseClickEvents" VALUE="0">
                          <param NAME="SendMouseMoveEvents" VALUE="0">
                          <param NAME="SendPlayStateChangeEvents" VALUE="-1">
                          <param NAME="ShowCaptioning" VALUE="0">
                          <param NAME="ShowControls" VALUE="-1">
                          <param NAME="ShowAudioControls" VALUE="-1">
                          <param NAME="ShowDisplay" VALUE="0">
                          <param NAME="ShowGotoBar" VALUE="0">
                          <param NAME="ShowPositionControls" VALUE="0">
                          <param NAME="ShowStatusBar" VALUE="0">
                          <param NAME="ShowTracker" VALUE="0">
                          <param NAME="TransparentAtStart" VALUE="0">
                          <param NAME="VideoBorderWidth" VALUE="0">
                          <param NAME="VideoBorderColor" VALUE="0">
                          <param NAME="VideoBorder3D" VALUE="0">
                          <param NAME="Volume" VALUE="0">
                          <param NAME="WindowlessVideo" VALUE="0">
                                <embed TYPE="video/x-ms-asf-plugin"

PLUGINSPAGE="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"
                                SRC="I:\Gotla\docu\Information\others\Bush bored boy.mpeg" name="wmp" SHOWCONTROLS="1"

EnableContextMenu="0" SHOWDISPLAY="0" SHOWTRACKER="0" SHOWPOSITIONCONTROLS="0" SHOWSTATUSBAR="0" autosize="false"

autostart="false" width="540" height="507" displaybackcolor="black">

                        
                         
                        </object>
                        


 
<br>


</tr>
</table>


</BODY>  
</HTML>


ASKER CERTIFIED SOLUTION
Avatar of reginab
reginab

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for the above code but im looking for a simpler one, i dont have much idea of html......
i just gave some video names as anchor tags and when the user clicks i want to play the video within my website, i dont want the player to pop up.....
in simpler words i want to send these names as parameters, can somebody give me simpler solutions.
mpeg is QuickTime format so you need this

<object ID="audio" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
   <param name="FileName"  value="file1.mpeg">
   <param name="AutoStart"                 value="true">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="false">
   <embed qtsrc="file1.mpeg" autoplay="true" controller="true" loop="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>
this script play all three files in sequence


<html>
<head>

<script language=Javascript>

var current=1,tmr=null;

function Load_(){

   if(document.getElementById("snd"+current).ReadyState==4)  
        current++;  
   if(current==4){
        current=1;      
        document.getElementById("snd"+current).play();
        setTimeout('Play_()',10)
        return
   }
   setTimeout('Load_()',10);
}

function Play_(){

   if(current==4){
         current=1;
         Load_();
         return
   }  
   if(document.getElementById("snd"+current).PlayState==0){
         current++;  
         if(current==4){
               current=1;
               Load_();
               return
         }    
         document.getElementById("snd"+current).play();          
   }
   setTimeout('Play_()', 10)
}
</script>

</head>
<body topmargin="5" leftmargin="5" rightmargin="5" bottommargin="5" onload="Load_()">

<object ID="snd1" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" style="display:none">
   <param name="FileName"  value="file1.mp3">
   <param name="AutoStart"                 value="false">
   <param name="SendPlayStateChangeEvents" value="true">
   <param name="ShowAudioControls"         value="false">
   <param name="ShowTracker"               value="false">
   <param name="AutoSize"                  value="false">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="true">
</object>

<object ID="snd2" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" style="display:none">
   <param name="FileName"  value="file2.mp3">
   <param name="AutoStart"                 value="false">
   <param name="SendPlayStateChangeEvents" value="true">
   <param name="ShowAudioControls"         value="false">
   <param name="ShowTracker"               value="false">
   <param name="AutoSize"                  value="false">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="true">
</object>

<object ID="snd3" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" style="display:none">
   <param name="FileName"  value="file3.mp3">
   <param name="AutoStart"                 value="false">
   <param name="SendPlayStateChangeEvents" value="true">
   <param name="ShowAudioControls"         value="false">
   <param name="ShowTracker"               value="false">
   <param name="AutoSize"                  value="false">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="true">
</object>

</body>
</html>
can i get a script that can play the video at the users selection??????
<html>
<head>

<script language=Javascript>

function Play_(){
       document.getElementById("video").play();
 }

</script>
</head>
<body>

<input type="button" onclick="Play_()" value="Play" name="video1" id="video1">

<object ID="video" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
   <param name="FileName"  value="file1.mpeg">
   <param name="AutoStart"                 value="true">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="false">
   <embed id="video" qtsrc="file1.mpeg" autoplay="false" controller="true" loop="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>

</body>
</html>



just replace "file1.mpeg" with your video file  :)
thanks a lot davidlars99, but its not showing any video, morover its just displaying only the controls and not the screen.....
try "src" instead of "qtsrc"


<embed id="video" qtsrc="file1.mpeg" autoplay="false" controller="true" loop="false" pluginspage="http://www.apple.com/quicktime/download/"></embed>
Im doing this, replace qtrsc with src but no use, still its not showing any video

<html>
<head>

<script language=Javascript>

function Play_(){
       document.getElementById("video").play();
 }

</script>
</head>
<body>

<input type="button" onclick="Play_()" value="Play" name="video1" id="video1">

<object ID="video" WIDTH=300 HEIGHT=26 CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
   <param name="FileName"  value="I:\Gotla\docu\Information\others\Auto.mpg">
   <param name="AutoStart"                 value="false">
   <param name="volume"                    value="0">
   <param name="loop"                      value="false">
   <param name="hidden"                    value="false">
   <embed id="video" src="I:\Gotla\docu\Information\others\Auto.mpg" autoplay="false" controller="true" loop="false"

pluginspage="http://www.apple.com/quicktime/download/"></embed>
</object>

</body>
</html>
what browser are you using?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
this question deserves a good attention from asker, I'm 100% positive that this question was answered many times :)