Hi, i am trying to play a video from my rackspace clould files account. If i mention the file url in the embade code, the video works perfectly. But i dont want to expose that url directly, so i am storing it in a database and trying to access it through an ID. If i specify that url which will fetch the video, i get a cross-domain policy restriction error even though the url points to the domain where the player.swf is placed. It perfectly plays the video from an other domain but cant access it through a file in the same domain. How do i fix this? Kindly help me. Thanks.
I set the provide flashvar as suggested, but now the player loads, but i get the message : Video not found or access denied : http://www.googlewaveindia.com/shantanu/hazmat/video/streaming.php?ID=77I58mmm95893Hp525LE
Here is the code for http://www.googlewaveindia.com/shantanu/hazmat/video/api.php bc.. <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <title>Untitled Document</title> </head> <body> <h3>Player Example</h3> <p>Below you see a simple embedded example of the JW Player. Copy and paste the source code and put the SWF, JS and FLV file on your site to get started.</p><!-- START OF THE PLAYER EMBEDDING TO COPY-PASTE --> <script src="swfobject.js" type="text/javascript"></script> <div id="mediaspace">This text will be replaced</div> <script type="text/javascript"> var so = new SWFObject('player.swf','ply','800','480','9','#000000'); so.addParam('allowfullscreen','true'); so.addParam('allowscriptaccess','always'); so.addParam('wmode','opaque'); <?php $path = "http://www.googlewaveindia.com/shantanu/hazmat/video/streaming.php?ID=77I58mmm95893Hp525LE";
</script><!-- END OF THE PLAYER EMBEDDING --> </body> </html>
in this file if for the file parameter, a direct url is given, it works perfectly. But if send the url through a variable like $path, it fails.
Code for http://www.googlewaveindia.com/shantanu/hazmat/video/streaming.php : bc.. <?php //Validate text input /* if (! preg_match('//^[-a-z.-@,'s]*$/i',$_GET['ID'])) { die('Invalid name proved, the name may only contain a-z, A-Z, 0-9, "-", "_" and spaces.'); } else $empty=strlen($_GET['ID']); if ($empty==0) { die('The text field cannot be empty'); } else
{
//the input data is clean, retrieve text data input
$ID = $_GET['ID'];
} */ $ID = $_GET['ID']; //Connect to MySQL database after sanitizing the data
In this file, i am just retrieving the complete url for the ID sent. What would be the best way to send the source of the file with out exposing the url? Thanks for all the help.
I am Not sure what you are doing wrong, but Flash is not able to consume the content coming out of your php though.
If you download the file your script (http://www.googlewaveindia.com/shantanu/hazmat/video/streaming.php?ID=77I58mmm95893Hp525LE) it’s not a valid video file. I think that is the issue here.