Macromedia Flash Server - odd...is it me? attachVideo stream vs prog no video

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > April 2005 > odd...is it me? attachVideo stream vs prog no video





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author odd...is it me? attachVideo stream vs prog no video
Sean Moran

2005-04-07, 5:50 pm


Is there a difference in how attachVideo is used for prog or stream
video?

I have an actionscript video player that has the necessary code on the
layer containing the progress bar and controls.
The embedded video mc is on a different layer. This works fine when
streaming, but when I try to modify the code to handle a progressive
download, I get the audio but no video.

Here's the code for the streaming (works fine):
========================================
==========================

nc = new NetConnection();
nc.onStatus = function(ncObj:Object):Void {
initStreams();
}
//for streaming
nc.connect("rtmp://192.168.0.1/lapp/");

function initStreams():Void {
//set up netstream to the connection
ns = new NetStream(nc);

//set buffertime
ns.setBufferTime(4);

//attach the stream to the video
_root.myPlayer.attachVideo(ns);

//for streaming
ns.play("512kbps_Stream",0,-1,false);
}

========================================
==========================
Now, if i change it to handle a progressive download, I get audio but
no video.
========================================
==========================

nc = new NetConnection();
nc.onStatus = function(ncObj:Object):Void {
initStreams();
}
//for prog download video
nc.connect(null);

function initStreams():Void {
//set up netstream to the connection
ns = new NetStream(nc);

//set buffertime
ns.setBufferTime(4);

//attach the stream to the video
_root.myPlayer.attachVideo(ns);

//for prog video play
ns.play("http://www.someserver.com/Stream001.flv");

}

========================================
==========================

If I embed the video on the same layer it works fine.

Is is me?

Thanks,
Sean


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Wouter van Vliet / WEBclusive

2005-04-07, 5:50 pm

Have you tried to swap the attachVideo and play calls?

Sean Moran wrote:
>
> Is there a difference in how attachVideo is used for prog or stream video?
>
> I have an actionscript video player that has the necessary code on the
> layer containing the progress bar and controls.
> The embedded video mc is on a different layer. This works fine when
> streaming, but when I try to modify the code to handle a progressive
> download, I get the audio but no video.
>
> Here's the code for the streaming (works fine):
> ========================================
==========================
>
> nc = new NetConnection();
> nc.onStatus = function(ncObj:Object):Void {
> initStreams();
> }
> //for streaming
> nc.connect("rtmp://192.168.0.1/lapp/");
>
> function initStreams():Void {
> //set up netstream to the connection
> ns = new NetStream(nc);
>
> //set buffertime
> ns.setBufferTime(4);
>
> //attach the stream to the video
> _root.myPlayer.attachVideo(ns);
>
> //for streaming
> ns.play("512kbps_Stream",0,-1,false);
> }
>
> ========================================
==========================
> Now, if i change it to handle a progressive download, I get audio but no
> video.
> ========================================
==========================
>
> nc = new NetConnection();
> nc.onStatus = function(ncObj:Object):Void {
> initStreams();
> }
> //for prog download video
> nc.connect(null);
>
> function initStreams():Void {
> //set up netstream to the connection
> ns = new NetStream(nc);
>
> //set buffertime
> ns.setBufferTime(4);
>
> //attach the stream to the video
> _root.myPlayer.attachVideo(ns);
>
> //for prog video play
> ns.play("http://www.someserver.com/Stream001.flv");
>
> }
>
> ========================================
==========================
>
> If I embed the video on the same layer it works fine.
>
> Is is me?
>
> Thanks,
> Sean
>
>
> =-----------------------------------------------------------
> Supported by Fig Leaf Software - http://www.figleaf.com
> =-----------------------------------------------------------
>
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcomm
>
>
>


--
Met vriendelijke groet,
Wouter van Vliet

WEBclusive
Calandstraat 1
2521 AD Den Haag
www.webclusive.com

Tel +31 (0) 70 3699 817
Fax +31 (0) 70 4450 321
Mob +31 (0) 61 5397 471
E-mail wouter-cbyZFP1Q8NkXQ3Lr6voeyA@public.gmane.org


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sean Moran

2005-04-07, 5:50 pm


Yes, just tried swapping them. No difference.
Ah well, that is ok. I was going to rework this anyway to get the
actionscript out of the fla and into some external .as files.
Will see what happens.

Thanks,
Sean


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com