summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-26 18:28:36 +0100
committerTheTroll <trolldev@gmail.com>2010-02-26 18:28:36 +0100
commit8b4da475907e5b50eb90e25fa4905cf1e1dc93c9 (patch)
tree7294a6c1e593bdbdf027a801e21879f663d640fd
parent94369659087122abba14eccac5baa377b4cab63f (diff)
downloadistreamdev-8b4da475907e5b50eb90e25fa4905cf1e1dc93c9.tar.gz
istreamdev-8b4da475907e5b50eb90e25fa4905cf1e1dc93c9.tar.bz2
Fix logo size when stream is started
-rwxr-xr-xincludes/inc_files.php9
-rwxr-xr-xincludes/inc_stream.php4
2 files changed, 12 insertions, 1 deletions
diff --git a/includes/inc_files.php b/includes/inc_files.php
index abbbb3d..c3cda85 100755
--- a/includes/inc_files.php
+++ b/includes/inc_files.php
@@ -66,6 +66,15 @@ function mediagetinfostream($stream = "")
return array($title, $info);
}
+function mediagetwidth($file)
+{
+
+ $getid3 = new getID3;
+ $fileinfo = $getid3->analyze($file);
+
+ return $fileinfo['video']['resolution_x'];
+}
+
function mediagettype($file)
{
global $videotypes, $audiotypes;
diff --git a/includes/inc_stream.php b/includes/inc_stream.php
index abd1d57..1e65633 100755
--- a/includes/inc_stream.php
+++ b/includes/inc_stream.php
@@ -45,7 +45,9 @@ if (infostreamexist())
$logopath = "logos/nologoMEDIA.png";
}
- print " <center><video id=\"videofeed\" poster=\"{$logopath}\" /></center>\r\n";
+
+ $logowidth = mediagetwidth($logopath);
+ print " <center><video id=\"videofeed\" width=\"{$logowidth}\" poster=\"{$logopath}\" /></center>\r\n";
print " </ul>\r\n";