Results from the most recent live auction are here .
22 members in the live chat room. Join Chat !
01-20-2007, 11:34 PM
· #1 Senior Member
Name: Zubair
Location: Ontario Canada
Join Date: May 2005
Posts: 2,754
NP$: 724.15 (
Donate )
best way to play video in html/php
Hey
can anyone tell me if <object> is the only way of showing a video on the website or if there is another way to do it too? [better way]
thanks
01-20-2007, 11:50 PM
· #2 Eating Pie
Name: Steve
Location: Canada
Join Date: Nov 2004
Posts: 2,284
NP$: 91.30 (
Donate )
<embed>
Either one works.. Embed offers more ways to play around with way it is shown than object but they are both the same.
- Steve
01-21-2007, 03:00 AM
· #3 NamePros Regular
Name: Sam Cleaver
Location: England
Join Date: May 2005
Posts: 346
NP$: 59.50 (
Donate )
I've used this for small school projects, it uses both for compatability.
http://beaver6813.pastebin.co.uk/9345 (Easier to copy)
HTML Code:
<object id="MediaPlayer" width=380 height=286
classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading
Windows Media Player components..." type="application/x-oleobject"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"> <param name="filename" value="oefdzv6nz5j1.wmv" > <param name="Showcontrols" value="True" > <param name="autoStart" value="True" > <embed type="application/x-mplayer2" src="oefdzv6nz5j1.wmv"
name="MediaPlayer" width=380 height=240> </embed> </object>
Just modify the src parts to the location of your movie and the width and height sections are obvious.
__________________
-Beaver6813.com V5 Soon!
01-21-2007, 05:56 AM
· #4 Senior Member
Name: Zubair
Location: Ontario Canada
Join Date: May 2005
Posts: 2,754
NP$: 724.15 (
Donate )
and dat would play .avi files too?
01-21-2007, 06:03 AM
· #5 Stud Sausage
Location: England
Join Date: Dec 2006
Posts: 1,545
NP$: 32.41 (
Donate )
Originally Posted by unknowngiver and dat would play .avi files too?
Yes, assuming the avi file is encoded with a codec that Windows Media Player supports or the user has installed. Just change the file name.
Remember this is pure html, php cannot render video
01-21-2007, 03:39 PM
· #6 Senior Member
Name: Zubair
Location: Ontario Canada
Join Date: May 2005
Posts: 2,754
NP$: 724.15 (
Donate )
great
it works yai...1 last question..what about Flash? hwo do i embed that ?
01-22-2007, 12:41 AM
· #7 NamePros Regular
Name: Sam Cleaver
Location: England
Join Date: May 2005
Posts: 346
NP$: 59.50 (
Donate )
lol you should have looked around on my pastebin.
Use the first bit of code pasted here:
http://beaver6813.pastebin.co.uk/7388
Or... just copy and paste this:
Code:
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="320" HEIGHT="240" id="Yourfilename" ALIGN="">
<PARAM NAME=movie VALUE="Yourfilename.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#333399>
<EMBED src="Yourfilename.swf" quality=high bgcolor=#333399 WIDTH="320" HEIGHT="240" NAME="Yourfilename" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
Replace Yourfilename.swf with your movie file name, and bgcolor with whatever you want the default background colour to be... width and height are pretty self explanatory
__________________
-Beaver6813.com V5 Soon!
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off