player loads the WHOLE .swf

5 views
Skip to first unread message

cemsung

unread,
Jun 17, 2009, 11:06:27 AM6/17/09
to SWFObject
Hi,

I am trying to stream a .swf from apache via php:

header("Cache-Control: public, max-age=31536000");
header("X-Content-Type-Options: nosniff");
header("Content-Type: application/x-shockwave-flash");
header('Content-Length: '. $length);

$buffer = 4096;

while(!feof($handle))
{
$data = fgets($handle,$buffer);
echo $data;
}
fclose($handle);
exit;


and I have the following swfobject code

var flashvars = {};
var params = {
play: "false",
loop: "false",
menu: "true"
};
var attributes = {};
swfobject.embedSWF("index.php?media=part_1.swf",
"divpart1", "800", "600", "9.0.0", false, flashvars, params,
attributes);


___________________


when I load the html the page starts to download the whole video (211
mb) ... how can I stop that and only have it stream? what am I doing
wrong or not doing? Thanks for you help in advance!

Sam Sherlock

unread,
Jun 17, 2009, 11:40:20 AM6/17/09
to swfo...@googlegroups.com
I would look at one the the many media player flash projects

such as

swfObject can embed the flash but its within the flash that the streaming is handled (later flash versions handle this better)
- S


2009/6/17 cemsung <cem...@gmail.com>

Aran Rhee

unread,
Jun 17, 2009, 9:33:54 PM6/17/09
to swfo...@googlegroups.com
@semsung
 
Why are you trying to stream a swf rather than a FLV / MP4 if it is video?
 
.swf is a progressive download file format, not a streaming format, so I am not sure what you are expecting to achieve.
 
A swf can playback a external video file, and I think this is what you are really trying to do. A bit of research in how you are trying to achieve your goals would be useful to you.
 
Aran

Reply all
Reply to author
Forward
0 new messages