Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

NetstreamInfo blank....

Avatar

Level 3

I'm trying to build a webcam module that automatically adjusts to network conditions, but the NetstreamInfo for the publisher/subscriber are both filled with all 0 (zero). Is there something I have to do to get those populated?

thanks,

-sandy

0 Replies

Avatar

Level 10

Hi ,

For the publisher, you will get the publishing stream's NetStreamInfo whereas on the subscriber side you would have to provide the publisherID of a stream to get the streamInfo for that stream.

Now, for publisher or subscriber, you have to be publishing and only during publish, you can request the info.

Isn't it the case with you?

What swc version are you using ? If you still always get zero, send me a test code and I will run on my side.

Thanks

Hironmay Basu

Avatar

Level 3

I'm getting data for the subscriber, but the publisher is still blank. Is there something special about the netstreamInfo for the Publisher?

Unfortunately, there are quite a few classes involved. If there's nothing special I have to do for the publisher, than I'll put together a simple example and send that off.

thank,

-sandy

Avatar

Level 10

Hi,

The NetStreamInfo from publisher is that of the stream the user is publishing. It should be straightforward , even more so than subscriber. I will run on my side, but in case its possible for you, send a simple reproducible test code.

Thanks

Hironmay Basu

Avatar

Level 10

Hi,

I am attaching a simple example and I checked both Audio and Camera Publisher NetStreamInfo by putting break points and they both had data in it.

Try out this example and let me know. I verified with both player 10 and player 10.1 swcs.

Thanks

Hironmay Basu

Avatar

Level 3

hi,

Thanks so much for the sample code, unfortunately, I have no data in either the audio or webcam publishers netstream info. It's just filled with zeros.

I tried both the 10 and the 10.1 swc.

I'm on a mac, using firefox with Flash Player 10,1,82,76 debug.

any other ideas?

-sandy

Avatar

Level 10

Hi,

I could reproduce your problem. Basically, it happens with the rtmfp connection. With rtmps connection , it works fine. I was connecting remotely yesterday with rtmps so couldn’t reproduce. But today when I tried rtmfp, it is all 0. I will be talking to the Player team and investigate the ways to fix it and will keep you posted.

Thanks for reporting this

Regards

Hironmay Basu

Avatar

Level 10

Hi,

On detailed investigation , I figured that you must have been doing p2p streaming. For p2p streams, those parameters don't make sense and so you don't get the data. Though if you are doing multicasting, you can always add an API for getting the multicastStreamInfo into your WebcamPublisher source. The code of which might look something like this

public function get netStreamMulticastInfo():NetStreamMulticastInfo

{

if ( _stream ) {

return _stream.multicastInfo ;

}

return null ;

}

I will get back with details I can find on NetStreamInfo for player 10 p2p streams.

Hope this helps

Thanks

Regards

Hironmay Basu

Avatar

Level 3

So, it sounds like we have 3 modes:

1) Hub'n'Spoke - Full TX/RX information is available.

2) Peer-To-Peer - TX information isn't available but RX is.

3) Multicast - TX/RX information is available?

Is there any way for me to limit which modes are used?

If I absolutely need the TX info, can I restrict it to Multicast or Hub'n'Spoke?

Thanks for being so responsive,

-sandy

Avatar

Level 10

Hi,

So, basically if you are using player 9 swc , its hub-spoke and no p2p.

If you are using 10 swc, its p2p + hub-spoke with default being p2p but it switches down to hub-spoke seamlessly when the number of p2p streams exceed 3 or when one has user doesn’t have rtmfp connection/firewall etc.

Multicast you can only use with 10.1 as it’s a 10.1 feature.

So, my suggestion is , if you need anything specific to multicast , use 10.1. But as a standard, you should use our player 10 swc as you have the access to source plus its more stable. As I mentioned above, player 10 by default does p2p, so to prevent that, you need to do streamManager.maxP2PStreamPublish = 0 in the app. Then your streams will be always hub-spoke in 10 and thus you will be getting the NetStreamInfo too.

Hope this helps

Thanks

Hironmay Basu