Jump to content

Getting video resolution?


Strahan

Recommended Posts

Hello!  I have some video files I want to embed in a website.  Problem is, I don't know the resolutions.  If I don't pass res to the object for video, it makes it a real small window with the controls off screen so I need to find the res. 

 

Is there any way to do that?

Link to comment
Share on other sites

<?
if(isset($HTTP_COOKIE_VARS["users_resolution"]))
$screen_res = $HTTP_COOKIE_VARS["users_resolution"];
else //means cookie is not found set it using Javascript
{
?>
<script language="javascript">
<!--
writeCookie();

function writeCookie()
{
var today = new Date();
var the_date = new Date("December 31, 2023");
var the_cookie_date = the_date.toGMTString();
var the_cookie = "users_resolution="+ screen.width +"x"+ screen.height;
var the_cookie = the_cookie + ";expires=" + the_cookie_date;
document.cookie=the_cookie

location = 'get_resolution.php';
}
//-->
</script>
<?
}
?>
</HEAD>
<BODY>
<?php
echo "Your Screen resolution is set at ". $screen_res;
?> 

 

Google.com

Link to comment
Share on other sites

Sorry guys, my kid drug me away from the computer and I didn't have a chance to get back to it yet.  As much as I love my coding, priorities are priorities :)

 

What I need is the res of a video file, an MPG or AVI or such.  I tried just leaving off the res and hoping the object autosizes, but alas that doesn't work.  Interestingly with the code to play mpg if I specify it too large it does auto resize in the Y dimension, but not the X so I get a skewed aspect ratio.  For the love of God, why did they make it nice in only one dimension??  Hehe.

 

Thanks, and sorry again for the latent update.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.