Skip to main content
elwampa
Participant
April 22, 2009
Question

DynamicStreamItem and Playlist

  • April 22, 2009
  • 1 reply
  • 1309 views

Hello!

Following the code shown in this example (Examle 6): http://www.adobe.com/devnet/flashmediaserver/articles/dynstream_advanced_pt2_04.html I made this:

var ds:DynamicStream = new DynamicStream( myNetConnection );

//The first item in the playlist
var dsi:DynamicStreamItem = new DynamicStreamItem();
dsi_1.addStream( "mp4:sample1_500kbps.f4v", 500 );
dsi_1.addStream( "mp4:sample1_700kbps.f4v", 700 );
dsi_1.addStream( "mp4:sample1_1000kbps.f4v", 1000 );

dsi_1.length = 30;

//The second item in the playlist
var dsi_2:DynamicStreamItem = new DynamicStreamItem();
dsi_2.addStream( "mp4:sample2_500kbps.f4v", 500 );
dsi_2.addStream( "mp4:sample2 _700kbps.f4v", 700 );
dsi_2.addStream( "mp4:sample2 _1000kbps.f4v", 1000 );

dsi_2.reset = false;
dsi_2.length = 20;

ds.startPlay( dsi_1 );
ds.startPlay( dsi_2 );

But this code its not working as should.

When dsi_1 finish playing in 30 seconds, dsi_2 never start. Instead of the second item, the first (dsi_1) start playing again.

What I'm missing in my code?

Thanx,

Alex Lopez.

    This topic has been closed for replies.

    1 reply

    April 22, 2009
    var dsi:DynamicStreamItem = new DynamicStreamItem();

    Should be var dsi_1

    (but i bet that was just a typo in your post. the code looks good to me, otherwise, but i haven't had time to run it.)

    Jody

    elwampa
    elwampaAuthor
    Participant
    April 22, 2009

    Yes, its just a typo in my question...

    April 22, 2009

    Hi Alex,

    I just tested the code and I'm seeing the same behavior that you're seeing. I've sent an e-mail to the engineer who wrote the classes, we'll see what he says.

    Jody