Open video in new window

  • Jordan514d
  • Novice
  • Novice
  • User avatar
  • Posts: 33

Post 3+ Months Ago

i am trying to create a link that opens a window that i set to a default size. When this windows opens i want it to play a video file with a quicktime plug in (i think) so that instead of opening windows media player when clicked it opens a seperate browser window and play the video in this browser.
  • Jordan514d
  • Novice
  • Novice
  • User avatar
  • Posts: 33

Post 3+ Months Ago

also....

i am trying to do this in html.

here is an example if you go to this site and click to play one of the videos

http://www.norope.com/video.htm


Thanks!
  • newbie
  • Novice
  • Novice
  • newbie
  • Posts: 24

Post 3+ Months Ago

I got the same question, waiting for the answer...
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

if you want the window to be a defined size, then you have to use a javascript. but what you have to do is create a new page with the video that you want played.. in the new html page, it would be formatted similar to this:
Code: [ Select ]
<html>
<head>
<title>Quicktime Movie</title>
</head>

<body>
<embeded src="yourmoviename.mov" height="240" width="320" autoplay="true">
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Quicktime Movie</title>
  4. </head>
  5. <body>
  6. <embeded src="yourmoviename.mov" height="240" width="320" autoplay="true">
  7. </body>
  8. </html>

the autoplay="true" parameter is optional, not necessary. then save that as like movie.html or something.. so then your link to open that window would look like this:
Code: [ Select ]
<a href="#stayhere" onclick="window.open('movie.html', 'movieWindow', 'height=275, width=350, statusbar=no, toolbar=no, menubar=no, scrollbars=no, resizable=no')">Play Movie</a>


<EDIT> If you want to have a button to close your newly created window, edit the html similar to this:
Code: [ Select ]
<html>
<head>
<title>Quicktime Movie</title>
</head>

<body>
<embeded src="yourmoviename.mov" height="240" width="320" autoplay="true">
<br><br>
<input type="button" value="Close Window" onclick="javascript: window.close()">
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Quicktime Movie</title>
  4. </head>
  5. <body>
  6. <embeded src="yourmoviename.mov" height="240" width="320" autoplay="true">
  7. <br><br>
  8. <input type="button" value="Close Window" onclick="javascript: window.close()">
  9. </body>
  10. </html>
and then i would edit the link to make the window height bigger, maybe to 375</EDIT>

<EDIT++>If you want your page to be xhtml compliant (the movie page), then you'd have to edit your html even more.. add a !doctype tag, change <br> to <br /> and not use the <embed> tag. instead, you'd use an <object> tag.. an example of how to do this AND to make it compatible with all versions of IE, go here: http://realdev1.realise.com/rossa/rende ... ktime.html
k i'm done, hope this helps :)</EDIT++>
  • Jordan514d
  • Novice
  • Novice
  • User avatar
  • Posts: 33

Post 3+ Months Ago

great thanks man. I have one more quick question. Bare with me im a newb. Is there a way to create that link in dreamweaver with out just copying it and pasting it into dreamweaver? Also when i set it up i open the link and the video screen appears but there is no video. I imported the video into a blank HTML document as a "plugin". Did i do that right?



Thanks For All Of Your Help,

Jordan
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

with the video problem, it either has to be in the same directory as your html file, or you have to specify its directory in your like, so say you made a folder called "media" and your movie.html file was in your root folder, then it would look more like:
Code: [ Select ]
<embed src="media/yourmovie.mov" ...>
OR if you had "movie.html" in like "webpages" and then your movie in media and they were both inside the root folder, then you would have /media/yourmovie.mov - so you can only have the format: movie/... if the folder is in the same one as the html file :) lol i hope thats not too confusing, just tell me it if is and i'll try to make it more clear.

as for the dreamweaver problem.. they dont really have a place to generate the script, no. they have a way to create a link that will open up in a new page, but then you'd have to add the: onclick="....." manually. unless i'm missing something.. lol. there is however a program called "first page" which is free and it comes with premade, customizable javascripts :) so you may want to check that out: http://www.evrsoft.com/1stpage2.shtml
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

for browser compatibility and html compliance, i have some highly recommended, updated code. the only item in this code you would have to change is the filename / the path to the file & its name.
movie.html:
Code: [ Select ]
<html>
<head>
<title>Quicktime Movie</title>
<link rel="stylesheet" type="text/css" href="mov.css">
</head>

<body>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="260">
<param name="src" value="yourmoviehere.mov" />
<param name="controller" value="true" />
<object type="video/quicktime" data="yourmoviehere.mov" width="320" height="260" class="mov">
 <param name="controller" value="true" />
 Uhm...there was an error. Oops.
</object>
</object>
<br>
<div align="center">
<input type="button" value="Close Window" onclick="javascript: window.close()">
</div>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Quicktime Movie</title>
  4. <link rel="stylesheet" type="text/css" href="mov.css">
  5. </head>
  6. <body>
  7. <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="260">
  8. <param name="src" value="yourmoviehere.mov" />
  9. <param name="controller" value="true" />
  10. <object type="video/quicktime" data="yourmoviehere.mov" width="320" height="260" class="mov">
  11.  <param name="controller" value="true" />
  12.  Uhm...there was an error. Oops.
  13. </object>
  14. </object>
  15. <br>
  16. <div align="center">
  17. <input type="button" value="Close Window" onclick="javascript: window.close()">
  18. </div>
  19. </body>
  20. </html>

mov.css:
Code: [ Select ]
/* hides the second object from all versions of IE */
* html object.mov {
  display: none;
}

/* displays the second object in all versions of IE apart from 5 on PC */
* html object.mov/**/ {
  display: inline;
}

/* hides the second object from all versions of IE >= 5.5 */
* html object.mov {
  display/**/: none;
}
  1. /* hides the second object from all versions of IE */
  2. * html object.mov {
  3.   display: none;
  4. }
  5. /* displays the second object in all versions of IE apart from 5 on PC */
  6. * html object.mov/**/ {
  7.   display: inline;
  8. }
  9. /* hides the second object from all versions of IE >= 5.5 */
  10. * html object.mov {
  11.   display/**/: none;
  12. }
(from http://realdev1.realise.com/rossa/rende ... ktime.html )
I've tested this in IE 6, FF 1.0.2, Netscape 8.0 beta, Opera 7.54, and Mozilla 1.7.5 and the only i had a problem in is Opera (unsure as to why, but it wouldn't play in the window. however, i dislike opera so it only matters if you care about it being compatible with all browsers, lol) but i dont know if opera is just gay and can't handle it? maybe.. ANYWAYS, it works in the rest of the browsers i tried.
  • Jordan514d
  • Novice
  • Novice
  • User avatar
  • Posts: 33

Post 3+ Months Ago

Thank You! :D
  • AnarchY SI
  • Web Master
  • Web Master
  • User avatar
  • Posts: 2521
  • Loc: /usr/src/MI

Post 3+ Months Ago

any time :) i <3 web dev.. lol

Post Information

  • Total Posts in this topic: 9 posts
  • Users browsing this forum: No registered users and 14 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.