• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3778
  • Last Modified:

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?
0
brycol24
Asked:
brycol24
  • 6
  • 4
  • 3
1 Solution
 
mrwebdevCommented:
You can embed it as an Object and it should with no problems!
0
 
mrwebdevCommented:
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
0
 
mrwebdevCommented:
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">

0
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
minichickenCommented:
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>
0
 
brycol24Author Commented:
minichicken....

I tried that and the video didnt play.  Is there something missing?
0
 
minichickenCommented:
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>
0
 
brycol24Author Commented:
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
0
 
mrwebdevCommented:
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

0
 
mrwebdevCommented:
The Value is what you change...
0
 
minichickenCommented:
<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
0
 
brycol24Author Commented:
ok that is what I did and it is still not working.  
0
 
brycol24Author Commented:
I am going to try and do it with this "http://www.someserver.com/videos/theirvideo.mpg" and hopefully that will work.


0
 
mrwebdevCommented:
Try it with this video, I know this one works!
http://216.23.169.22/Videos/Medium_WMP8/Metal_Baby.wmv

This is how they have it at Stupid Videos:

<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="240" height="207" standby="Loading Microsoft Windows Media Player components...">
                          <param NAME="AudioStream" VALUE="-1">
                          <param NAME="AutoSize" VALUE="0">
                          <param NAME="AutoStart" VALUE="-1">
                          <param NAME="AnimationAtStart" VALUE="-1">
                          <param NAME="AllowScan" VALUE="0">
                          <param NAME="AllowChangeDisplaySize" VALUE="0">
                          <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="0">
                          <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="http://216.23.169.22/Videos/Medium_WMP8/Metal_Baby.wmv">
                          <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="http://216.23.169.22/Videos/Medium_WMP8/Metal_Baby.wmv" name="wmp" SHOWCONTROLS="1" EnableContextMenu="0" SHOWDISPLAY="0" SHOWTRACKER="0" SHOWPOSITIONCONTROLS="0" SHOWSTATUSBAR="0" autosize="1" autostart="1" width="240" height="207" displaybackcolor="black">
                                  <noembed>
                          <a href="http://216.23.169.22/Videos/Medium_WMP8/Metal_Baby.wmv">Click Here to Play the Video</a>
                                  </noembed>
                        </object>
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 6
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now