Wowza Community

cupertino streaming : Client object in onHTTPCupertinoStreamingSessionCreate is null

Hi,

I need to set the property of the client object from onHTTPCupertinoStreamingSessionCreate event eg :

httpCupertinoStreamingSession.getStream().getclient().getProperties().setProperty("info",hashMapData);

and later on access the same data from implementation of IMediaStreamFileMapper class like.

         IClient client= stream.getClient();
    	 mfmb=(Map)client.getProperties().getProperty("info");

But its giving me error nullpointer exception on the onHTTPCupertinoStreamingSessionCreate method where i am setting the object.

I tried setting the value of property in httpstreamersession object’s property rather then client for example -:

httpCupertinoStreamingSession.getStream().getHTTPStreamerSession().getProperties().setProperty("info",hashMapData);

and later accessing the same data from implementation of IMediaStreamFileMapper like

String cacheObject=(String)(stream.getHTTPStreamerSession().getProperties().getProperty("info"));

But this also seems to fail.

Can you suggest some way of setting the property value and accessing it later.?

IClient is the server-side of Flash NetConnection, so client will always be null in HTTP or RTP session.

You should be able to use the stream. Try this:

httpCupertinoStreamingSession.getStream().getProperties().setProperty("info",hashMapData);

Richard

Another approach is use a Map and use sessionID as a key.

Richard

Hi kkaushik

Try this:

set properties

HTTPStreamerSessionCupertino.getProperties().setProperty(MyConsts.USER_DATA, “MyString”);

get properties

HTTPStreamerSessionCupertino.getProperties().getPropertyStr(MyConsts.USER_DATA);

James

Hi Richard,

I am tryied using it. Although i am not getting any error, but the value which is set here is not retained till we reach implementation of IMediaStreamFileMapper.

here the value of the set property “info” is returned as null.

Does it mean to retain the value thoughout session?

Hi James

Thanks for your reply.

Although i can set the property as you described but there is no object “HTTPStreamerSessionCupertino” in my implementation of IMediaStreamFileMapper class. So i am not able to extract whatever i have set.

Thanks,

Kunal