Opening Video in Multiple Browsers

  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

I recently borrowed and tweaked code I saw written by AnarchY SI at website-design-forum/open-video-new-window-t42596.html. I tried to let you view the problem (and get the code via 'View Source') but it turns out I'm not allowed to post external links, so I have copied the code between the sets of double lines below, after which I will state the problems I encounter:
===================================================
Main page:

<html>
<head>
<title>Movie Opener</title>
<link rel="stylesheet" type="text/css" href="mov.css">
</head>
<body>
<a href="#stayhere" onclick="window.open('-LLh81for ix _Thanksgiving.htm', 'movieWindow', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no')">FOR IX THANKSGIVING</a>
<br>
<a href="#stayhere" onclick="window.open('Oh159 car-stop finish, woman _sweet, look-up.htm', 'movieWindow2', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no')">CAR-STOP, WOMAN, SWEET, LOOK-UP</a>
</body>
</html>

One of the two Child Windows:

<html>
<head>
<title>car-stop finish, woman _sweet, look-up</title>
<link rel="stylesheet" type="text/css" href="mov.css">
</head>
<body>
<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="<link to apple's quicktime plug-in>">
<param name="src" value="Oh159 car-stop finish, woman _sweet, look-up.mov" />
<param name="controller" value="true" />
<object type="video/quicktime" data="Oh159 car-stop finish, woman _sweet, look-up.mov" align="left" width="704" height="490" class="mov">
<param name="controller" value="true" />
Uhm...there was an error. Oops.
</object>
</object>
</body>
</html>

===========================================

I have two problems with it:

(1) It more or less works (but see problem 2 below) in two environments that I have tested (Firefox on Windows 7 and XP, TenFourFox on Mac OS 10.5.8 ), but leads to tiny truncated video windows - cropped to about one fifth size - on two others (Internet Explorer on Windows 7 and XP, Safari on Mac OS 10.5.8 ). And the truncated window dimensions are not even the same in the latter two environments.

(2) Even in the environments where it more or less works, it does not appear exactly as I would like. What I want is (a) for the url not to show up at the top, but all the window.open() parms I can find that might prevent that (location=no, fullscreen) seem to have no effect; and (b) for there to be no whitespace border around the video; that is, I want it to go right to the edge of the window border. I succeed in getting the bottom and right edges of the window to be where I want by appropriate choices of width and height, but I can't seem to get rid of the white margins at the left edge and the top; align is apparently for text only, while setting hspace and vspace to 0 have no effect, which is hardly surprising since their default values are 0 anyway.

Thanks in advance for your help!

P.S. And just so I understand this better, what's the reason for the <object> within an <object>? Apparently for IE vs. Mac since there's also a css page to hide the second object for IE, but why?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

I just realized that the rule against external links must surely be only to prevent malware. So here's the link in disguised form for whoever is willing to trust me: aslresearch-dot-info.
  • hienbng
  • Born
  • Born
  • hienbng
  • Posts: 1

Post 3+ Months Ago

I succeed in getting the bottom and right edges of the window to be where I want by appropriate choices of width and height.
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

Thanks, hienbng, but I don't see your point since what you wrote is just a quotation from my original post. Were you simply providing the context for a comment you were about to make, but then got distracted by something, or your computer went down, or...?
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

The stylesheet.

Put the following in there

CSS Code: [ Select ]
* {
    margin: 0;
    padding: 0;
}
  1. * {
  2.     margin: 0;
  3.     padding: 0;
  4. }
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

Thanks, Bogey, that at least gets rid of the margin at the top. But the other margins are still there, and the url is still shown at the top, which I would like to get rid of.

It's not clear why the CSS code you provided would work only for the top margin. As you know, the single 0 is supposed to apply to all the margins if the others are left blank. Just to see, I tried margin: 0 0 0 0; but that gave the same result.

Here's my css code as it stands now:

/* 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;
}

* {
margin: 0;
padding: 0;
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

I think that the width and the height of the pup-up is set to a wrong value...
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

I have no idea how big to set them. The size of the movie is 720 by 480, and it needs a little bit extra added to its height for the controls at the bottom, which is why one of them has height = 490. The other values are less than that amount, chosen to try to make it look like I want, and even then I get the extra margins (I'm just testing in Win 7 for now, other tests later).

When I remove all specifications of height and width everywhere, the result is worse: the main window opens much too large, and the video doesn't appear at all. Just as a guess: maybe without specifying the size for the video it assumes zero.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

I'm talking about the following sizes:
Code: [ Select ]
<html>
<head>
<title>Movie Opener</title>
<link rel="stylesheet" type="text/css" href="mov.css">
</head>
<body>
<a href="#stayhere" onclick="window.open('-LLh81for ix _Thanksgiving.htm', 'movieWindow', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no')">FOR IX THANKSGIVING</a>
<br>
<a href="#stayhere" onclick="window.open('Oh159 car-stop finish, woman _sweet, look-up.htm', 'movieWindow2', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no')">CAR-STOP, WOMAN, SWEET, LOOK-UP</a>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Movie Opener</title>
  4. <link rel="stylesheet" type="text/css" href="mov.css">
  5. </head>
  6. <body>
  7. <a href="#stayhere" onclick="window.open('-LLh81for ix _Thanksgiving.htm', 'movieWindow', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no')">FOR IX THANKSGIVING</a>
  8. <br>
  9. <a href="#stayhere" onclick="window.open('Oh159 car-stop finish, woman _sweet, look-up.htm', 'movieWindow2', 'innerWidth=400,height=500,width=690,statusbar=no,toolbar=no,menubar=no,scrollbars=no,resizable=no')">CAR-STOP, WOMAN, SWEET, LOOK-UP</a>
  10. </body>
  11. </html>

Not in the video but in the actual window.
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

Those are the sizes of the containing window for the video, not of the video itself. And they seem to function independently of the video:

For example, you can set them smaller (like 390 x 250), and you see only a piece of the video, which extends past the window (just like a window in your house shows you only part of the outside world) - and yet you still see the wide white margin on the left that refuses to go away.

On the other hand, if you set them bigger (like 890 x 800), you'll see all the video and more, since the right and bottom margins will be much bigger, with the same pesky white margin on the left that's always there.
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

Setting the dimensions of the video itself only makes for bigger margins if you set them bigger than the intrinsic size of the video. If you set them smaller, then the video is cropped so you see only part of it. Thus the video appears the same size no matter what. It does not shrink when smaller dimensions are set and it does not expand when larger dimensions are set. Since it seems to know how big it should be and sticks to it, you'd think that if you left the width and height parameters out it would simply assume the size it knows it should have, but no, it simply does not appear at all as I pointed out earlier.
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

To be somewhat clearer, allow me to revise the sentence "The video appears the same size no matter what" to:

The video is (or regards itself to be) the same size no matter what, and displays as much of that fixed size as it can within the dimensions you specify for it. Setting a smaller width and height than its true size means you only get to see part of it.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

peytontodd wrote:
To be somewhat clearer, allow me to revise the sentence "The video appears the same size no matter what" to:

The video is (or regards itself to be) the same size no matter what, and displays as much of that fixed size as it can within the dimensions you specify for it. Setting a smaller width and height than its true size means you only get to see part of it.

If you set them to the right width, they will hide the margins. If you set them bigger then the video, they will add margins around the video.
  • peytontodd
  • Newbie
  • Newbie
  • peytontodd
  • Posts: 9

Post 3+ Months Ago

No, the whole problem is that that's not so. I can set them to hide the right and bottom margins (at least I can on Firefox in Windows 7; IE, as mentioned earlier, will be another problem). And your suggestion to use * {margin:0; padding:0;} did solve the margin problem at the top. But no matter how I set the width and height values (even when I set them much smaller that the size of the video itself), the left margin still defiantly stares me in the face!

Post Information

  • Total Posts in this topic: 14 posts
  • Users browsing this forum: No registered users and 93 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.