Perhaps you could 'build' the dynamic url in seperately, and then just
use one echo to include it in the QT_WriteOBJECT

eg.

$url = "http://www.mysite.com/media_files/"; . $uid . "/" .
$row['media_tra_name'];

then.

QT_WriteOBJECT('<?php echo $url; ?>', '300', '256', '', 'AUTOPLAY',
'True', 'SCALE', 'Aspect');

Honestly it probably won't make a difference, unless for some VERY
strange reason it just prefers one echo in there instead of 2.


The other thing that is could possibly be is that your MPEG4 videos
aren't in a format that can be played by the iPhone. After watching
the developer track from WWDC, it was fairly clear that there are a
lot of things to take into account for displaying video on the iPhone.
You can find more about this here: 
http://developer.apple.com/iphone/designingcontent.html

On Jul 22, 10:40 am, sigamy <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Sorry if this is an FAQ.  I read thru a few threads here...someone is
> actually doing something similar to me with displaying videos.  I have
> code that works in Safari on my Mac but it doesn't work on the iPhone.
>
> My first page reads mysql db and gets a list of 5 movie files, this
> works fine.  Each item in the list has a dynamic URL to call a PHP
> file.  That PHP file then calls QT_WriteOBJECT in order to display an
> MPEG4 movie.
>
> If I hard code all the parms in the URL for QT_WriteOBJECT it works
> fine.  If I try to use php echo to fill in parms I get a blank page on
> the iPhone.
>
> Here is my PHP file:
> <?php
> require('includes/links.php');
>
> $uid = $_REQUEST['uid'];
> $mid = $_REQUEST['mid'];
> $sql = "SELECT * FROM ".$cfg['DB_MEDIA']." WHERE m_id='".$mid."'";
> $res = $mycms->sql_query($sql);
> $row = $mycms->sql_fetchrow($res);
> $mov_size = explode("X", $row['size']);
> ?>
>
> <html>
> <head>
> <title>MyPlayer 1.05</title>
>
> <script src="scripts/AC_QuickTime.js"
> language="JavaScript" type="text/javascript">
> </script>
>
> </head>
> <body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
> <!-- media Player -->
>
> <div name="hfpage">
> <script language="JavaScript" type="text/javascript">
> QT_WriteOBJECT('http://www.mysite.com/media_files/<?php echo ($uid);?>/
> <?php echo($row['media_tra_name']);?>','300','256','','AUTOPLAY',
> 'True','SCALE','Aspect');
> </script>
> </div>
> </body>
> </html>
>
> If I substitue the dynamic URL above with this, it works:
>
> <script language="JavaScript" type="text/javascript">
> QT_WriteOBJECT('http://www.mysite.com/media_files/731/
> mediatra_590.m4v','300','256','','AUTOPLAY', 'True','SCALE','Aspect');
> </script>
>
> I guess it is the php echo stuff...what else can I do here?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"iPhoneWebDev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/iphonewebdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to