Made the video slightly taller to make the horizontal bar off the bottom on Wii.
[recordtv.git] / playonwii / play.php
blob6186adbebb92afecc36ba6787e739461931466a0
1 <?php
3 $curfiletitle = htmlspecialchars( $_GET['title'], ENT_QUOTES );
4 $curfilenum = $_GET['file'];
6 if( $_GET['large'] == "1" )
8 $width = 1200;
9 $height = 698;
11 else
13 $width = 813;
14 $height = 480;
17 # This is a list of all the files in the directory
18 $filenames = array();
19 $handle = opendir( '/home/andy/.gnometvguide/recorded_programmes' );
20 if( $handle )
22 while( ( $filename = readdir( $handle ) ) )
24 $filenames[] = $filename;
28 $num = 0;
29 rsort( $filenames );
31 foreach( $filenames as $filename )
33 if( preg_match( '/^(.*)\\.flv$/', $filename, $matches ) )
35 if( $num == $curfilenum )
37 $curfile = $filename;
38 break;
40 $num++;
46 <html>
48 <head>
49 <title><?php print "$curfiletitle" ?></title>
50 <script type="text/javascript" src="swfobject.js"></script>
51 </head>
53 <body style="background-color: black; color: white">
54 <table width='100%' height='100%'><tr valign='middle'><td align='center'>
56 <p id='player1'>No flash player!</p>
57 <script type='text/javascript'>
58 var s1 = new SWFObject('flvplayer.swf','single','<?php print $width; ?>','<?php print $height; ?>','7');
59 s1.addVariable('overstretch','true');
60 s1.addParam('allowfullscreen','true');
61 s1.addVariable('file','<?php print "$curfile" ?>');
62 s1.addVariable('showvolume','false');
63 s1.addVariable('autostart','true');
64 s1.write('player1');
65 </script>
67 </td></tr><table>