Expand my Community achievements bar.

Setting maxP2PStreamPublish for a room

Avatar

Former Community Member

Hi,

How do I set the parameter maxP2PStreamPublish of StreamManager for a room to enable more than 3 p2p streams to be published by a publisher?

Also, what are the implications of setting this value to a very high value??

Thanks,

Soumik

5 Replies

Avatar

Former Community Member

Hi Soumik,

You can set the value using something like connectSession.streamManager.maxP2PStreamPublish = higher value to enable more than 3 p2p to be published. For player 10, there is a limit upto which flash player can handle these p2p streams. So, a very high value above 8/9 in player 10 may not be sustainable and might cause some issues.

For higher values, you should use player 10.1 multicasting, but we don’t provide its source yet.

Thanks

Hironmay Basu

Avatar

Former Community Member

Hi Hironmoy,

Thanks for that info. From the documents, however, I see that the streamManager member for ConnectSessionContainer is a read-only value.

I'm hoping that the documentation is probably not up-to-date in that case.

So having not known that the streamManager member can indeed be updated, I went ahead and changed the StreamManager source file for flash 10 and set the value to 6. That seemed to work properly with no side-effects. But when I set it to 10, I couldn't get the publisher to publish the stream, I guess, since the subscriber couldn't show the feed, despite the fact that the subscriber got the "streamReceive" event(I had an handler for that event).

I was wondering what is the reason why the max no. of p2p publish stream can't be set beyond a certain value. I just want to know how LCCS handles the p2p connections on its end and what are the effects of that.

Thanks again,

Soumik

Avatar

Former Community Member

Hi Soumik -

The main issue Basu is referring to is that for player 10 P2P streaming,

each stream is published separately from the publisher to each subscriber.

So, if you have 4 people in a room, and one person is broadcasting audio P2P

to all, he's actually broadcasting 3 times the bandwidth of one audio

stream.

We found that after a certain point (we chose 3, but this wasn't an exact

science), a publisher's uplink would become saturated, and have difficulty

ensuring a high QoS. You can absolutely change this value and try it out -

your results may be different, depending on the network.

thanks

nigel

Avatar

Former Community Member

Hi Nigel,

Thanks for the clarification.

I'm using Flash Player 10, and in my setup I tried setting up a room with 3 participants. So as per my understanding, each publisher should have 4 p2p streams(since I bumped up the max value in StreamManager to 6). This actually works fine for me.

What I don't understand is when I bump up the max p2p streams value to 10, with the same setup(same quality etc.) of 3 participants in a room, I don't get the streams on the subscribers(though the subscriber's streamReceive event handlers get fired).

-Soumik

Avatar

Former Community Member

Hi,

LCCS handles the p2p streams through Player and we don't put any special restrictions on the upper limit of stream capacity. For p2p streams, there are a lot of factors, the internal mesh that gets created between clients, the bandwidth required at the client to handle these streams and so on. Flash Player can handle only a particular number of those connections and when you go above that, the meshes inside player for p2p gets messed up and you can't have p2p.

You can talk to player team or post in their forums if you want internal details about p2p stream limitations. So, we always ask users to use hub-spoke if they need large number of streams in a room.

And maxP2PStreamPublish is a public var inside streamManager. So , you can do something like

var streamManager:StreamManager = connectSession.streamManager;

streamManager.maxP2PStreamPublish = "your val"

Hope this helps

Thanks

Hironmay Basu