Groups | Blog | Home
all groups > macromedia flash flashcom > august 2005 >

macromedia flash flashcom : Can't play video stream! Why???


kleva82
8/13/2005 10:48:25 AM
Hi.
I've got very strange situation:
First application (let it be 1.swf) publishes video stream to the server like:
out_ns = new NetStream(nc);
out_ns.attachAudio(source_mic);
out_ns.attachVideo(source_cam);
out_ns.publish("myStream", "live");

Second application tries to play it:
preview_ns = new NetStream(nc);
preview_ns.setBufferTime(2);
prev_video.attachVideo(preview_ns);
preview_ns.play("myStream");

where prev_video isVideo Object (Embeded Video 1)

Using App Inspector I can see 2 streams:
myStream - publishing
myStream - playing live

But I CAN'T see the picture in my video object(prev_video) ! Why? What can
be wrong?


kleva82
8/13/2005 11:23:08 AM
I think I know why it don't wanna to play, but I don't know how to fix it...
Actualy my prog consists of thee parts (not two - and that is the reason).
first part - broadcaster - publishes stream to the second part server. Server
republishes it to the other host and player tries to play it from there.
Streams are created, but there is no picture why it can be, and how I can fix
it? Aproximatly my code looks like:

/////////////// BROADCASTER ///////////////////////
br_ns = new NetStream(nc);
br_ns.attachAudio(source_mic);
br_ns.attachVideo(source_cam);
br_ns.publish("myStream", "live");

/////////////// SERVER ///////////////////////
in_ns = new NetStream(nc);
in_ns.setBufferTime(2);
in_ns.play("myStream");

out_ns = new NetStream(nc_OTHER);
out_ns.setBufferTime(2);
out_ns.attachVideo(in_ns);
out_ns.attachAudio(in_ns);
out_ns.publish("myStream_out", "live");

/////////////// PLAYER ///////////////////////
pl_ns = new NetStream(nc_OTHER);
pl_ns.setBufferTime(2);
myVidObj.attachVideo(pl_ns);
pl_ns.play("myStream_out");


As I sad, in App Inspector all streams are fine: myStream_out is publishing
and playing live, but THERE IS NO PICTURE:(

AddThis Social Bookmark Button