It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming HTML Forum

Linking to video clips (i.e. quicktime)

Linking to video clips (i.e. quicktime)

Postby jfwebmaster on Sat Jul 22, 2006 4:12 pm

Hey,
Sorry for this second post but I was wondering if any of you could hlp me with this little problem I'm having. Actually, I've only been doing HTML for a couple years now so I really have no idea how to do this. Lol. I have videos uploaded on an old website of mine, and I want to create a link from my new website to those clips. It would be easy enough if they opened in a new window but it's just a little Quicktime window. Can anyone help me with this?
jfwebmaster
 
Posts: 14
Joined: Sat Jul 22, 2006 3:37 pm

Postby dazz_club on Sat Jul 22, 2006 4:23 pm

Hi there,

You could try and first embed the movie into a html file using the correct html coding. And then have the link from the website to the html page that embeds the movie.

so it would work like this, user clicks on "watch video" link, it then opens up the page with the movie in it, ie Video_page.html.

Once you`ve done that you can customize the page so the window fits the sze of the movie.if you like that is.

check this link out, you will learn alot from it:
http://www.mediacollege.com/video/strea ... rview.html, someone from here, called Johneva helped m out with a similar question.

or you could try this:
<a href="videofilename.filetype>Click here to view video</a>

anymore help let me knoe
User avatar
dazz_club
250+ Club
 
Posts: 313
Joined: Fri Jul 15, 2005 7:35 am
Location: Chester and Hull

Postby jfwebmaster on Sat Jul 22, 2006 4:54 pm

Thanks, I'll try that!
jfwebmaster
 
Posts: 14
Joined: Sat Jul 22, 2006 3:37 pm

Postby grommit on Sun Jul 23, 2006 12:23 pm

If you want to embed them into your site this would be the code:

Code for MPEG files:
Code: Select all
<object
         classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
         width="320"
         height="255"
         codebase="http://www.apple.com/qtactivex/qtplugin.cab"
      >
         <param name="src" value="video/video.mpg">
         <param name="autoplay" value="true">
         <param name="controller" value="true">
         <param name="loop" value="false">
         <embed
            plugin=    "quicktimeplugin"
              type=       "video/mpeg"
              cache=       "false"
              src=      "video/video.mpg"
            width=      "320"
            height=      "255"
            autoplay=   "true"
            controller=   "true"
            loop=      "false"
            pluginspage="http://www.apple.com/quicktime/download/">
         </embed>
      </object>


and for WMV it's:
Code: Select all
<object
      name="Player"
      width="320"
      height="305"
      type="application/x-oleobject"
      classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6">
         <param name="URL" value="video/video.wmv"><param>
         <param name="AUTOSTART" value="true"></param>
         <param name="showControls" value="true"></param>
         <embed
            widht="320"
            height="305"
            SRC="video/video.wmv"
            type="application/x-oleobject"
            autostart="true">
         </embed>
      </object>


#### IMPORTANT ####
The .mpg and the .wmv are the same video's but i had to use different heights to display them correct.
for the quicktime player you should add 15 pixels to the height of the video
and for windows media player you should add 65 pixels to the height of the video

atributes like autostart and showcontrols are just some of the atributes available for embeded video's
grommit
 
Posts: 28
Joined: Thu Jun 29, 2006 11:29 am
Location: Netherlands

Postby johneva on Sun Jul 23, 2006 12:31 pm

Dude you should not use the embed tag anymore it is depreciated.

Only the object tag should be used, problem is it wont work with just the same old code without the embed tag in all browsers.

So you need to put it like this with the relevant codebase and classid in place oh if your not doing you page in XHTML you will also need to remove the space and the / from the param tags too as they just close the tag as you have to in XHTML.

Code: Select all
     <!--[if !IE]> <-->
     <object id='mediaPlayer' data="video/yourvideo.wmv" standby='Loading Microsoft Windows Media Player components...' type='type="video/x-ms-wmv"'>
      <param name='fileName' value="http://www.yourdomain.com/video/yourvideo.wmv" />
      <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" />
     <param name="PlayCount" value="*" />
      </object>
     <!--> <![endif]-->
     <!--[if IE]>   
      <object id='mediaPlayer' data="video/yourvideo.wmv" 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="http://www.yourdomain.com/video/yourvideo.wmv" />
      <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" />
     <param name="PlayCount" value="*" />
      </object>
     <![endif]-->   



You can just use the embed tag but this dont work for most browsers.

You can also use this code, but as the embed tag is now depreciated the coding is invalid according to W3C Standards.

Code: Select all
<object id="MediaPlayer" width=320 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="http://yourdomain/yourmovie.wmv">
<param name="Showcontrols" value="True">
<param name="autoStart" value="True">

<embed type="application/x-mplayer2" src="http://yourdomain/yourmovie.wmv" name="MediaPlayer" width=320 height=240></embed>

</object>
Image
Only God Can Judge Me.
User avatar
johneva
500+ Club
 
Posts: 565
Joined: Sat Oct 29, 2005 1:16 pm
Location: Stafford, England

Postby jfwebmaster on Sun Jul 23, 2006 4:25 pm

Thanks for all your help, guys!
jfwebmaster
 
Posts: 14
Joined: Sat Jul 22, 2006 3:37 pm

Postby grommit on Sun Jul 23, 2006 6:35 pm

@ johneva: you are totaly right....
I didn't looked if the code was xhtml valid.
the code was a combination of codes i found on the internet and they worked (in flock). But isn't this topic the same as "launch windows media player"??
it's about the same code.
grommit
 
Posts: 28
Joined: Thu Jun 29, 2006 11:29 am
Location: Netherlands

Postby johneva on Sun Jul 23, 2006 7:54 pm

Yep pretty much. ;)
Image
Only God Can Judge Me.
User avatar
johneva
500+ Club
 
Posts: 565
Joined: Sat Oct 29, 2005 1:16 pm
Location: Stafford, England

Postby Tomi on Sun Jul 23, 2006 8:17 pm

thanks i also found this very usefull :D but i have a question, is there anyway i can have a lil kinda "progress" bar underneith so it will say 'buffering' etc

for an example of what i mean watch a video on this page and look at the bottom of the video frame

http://www.gametrailers.com/gamepage.php?fs=1&id=2613

Thanks :D
User avatar
Tomi
500+ Club
 
Posts: 925
Joined: Mon Jun 26, 2006 6:51 pm
Location: Essex, England

Postby johneva on Sun Jul 23, 2006 9:38 pm

Yeah if you stream it but you need a sreamer server to do so.
Image
Only God Can Judge Me.
User avatar
johneva
500+ Club
 
Posts: 565
Joined: Sat Oct 29, 2005 1:16 pm
Location: Stafford, England


Who is online

Users browsing this forum: No registered users and 4 guests