Link to home
Start Free TrialLog in
Avatar of brycol24
brycol24

asked on

Have a mpeg play on the web page not open a media player

I want a video to be able to be played on the web page not open up a new media window.  Is that possible and how?
Avatar of mrwebdev
mrwebdev

You can embed it as an Object and it should with no problems!
Example:
<embed src="YourMovie.mpg" width="400" height="400" controller="false" loop="false" autoplay="true">
 or convert it to Flash using Swish here, http://www.swishzone.com/index.php?product=video!


Hope this helps
more info:

How to embed a Video through html (for opening within browser)

   1. Open your web page in an editing program
   2. View the html coding for your page
   3. Locate where you would like to embed the video
   4. Copy and paste the supplied code below in the desired spot
      note:  There is code for *.mov movie files in case QuickTime is needed
   5. Be sure to change the name of the video file to match yours, and you may need to

Html Code for *.avi and *.mpg files

<embed width=75 height=100 src="video/VIDEONAME.mpg" controls="true" autoplay="false">

Html Code for *.mov files

<embed width="75" height="100" pluginspage="http://quicktime.apple.com" src="video/VIDEONAME.mov" type="video/quicktime" autoplay="true" loop="false">

This should do the job... just change the value for "FileName"

************************************************

<object id="MediaPlayer" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">

<param name="FileName" value="mpeg/mpeg1.mpg">
<param name="TransparentatStart" value="true">
<param name="AutoStart" value="true">
<param name="ShowControls" value="1">
</object>
Avatar of brycol24

ASKER

minichicken....

I tried that and the video didnt play.  Is there something missing?
Hi brycol24

Are you using netscape or any other browser that is not IE? I just tested the code i posted above and it only worked in IE and not in Netscape.
And I got it to work in netscape as well with the code below.
Remember to change the value for "FileName" and the src for the embed tag.

Hope this works for you....
***************************************************************

<object id="MediaPlayer1" 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" width="280" height="256">
<param name="fileName" value="mpeg/mpeg1.mpg">
<param name="animationatStart" value="true">
<param name="transparentatStart" value="true">
<param name="autoStart" value="true">
<param name="showControls" value="true">
<param name="Volume" value="-450">
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="mpeg/mpeg1.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450>
</object>
I assume that <param name="fileName" value="mpeg/mpeg1.mpg"> is what I need to edit.  However, I put the name of the file in there, it was simply called videos.mpg and nothing came up.  Do I need to direct it a path?  If so what would the path be?

Thanks....Brian
The path to your Video on your webserver.
Root
yourvideo.mpg

or any subfolder you FTP it into:
Images/yourvideo.mpg
Video/yourvideo.mpg

or another location on the web maybe:
http://www.someserver.com/videos/theirvideo.mpg

The Value is what you change...
<param name="fileName" value="mpeg/mpeg1.mpg"> --> CHANGE the VALUE to your_video.mpg

<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="mpeg/mpeg1.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450> --> CHANGE the SRC to your_video.mpg

it can be a relative path or absolute path.....

eg.
path/my_vid.mpg
http://www.mydomain.com/path/my_vid.mpg
ok that is what I did and it is still not working.  
I am going to try and do it with this "http://www.someserver.com/videos/theirvideo.mpg" and hopefully that will work.


ASKER CERTIFIED SOLUTION
Avatar of mrwebdev
mrwebdev

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