Wowza Community

onHTTPCupertinoStreamingSessionCreate called twice

I’m having strange behaviour. I’m trying to limit number of streams per user, but I’m having problem where onHTTPCupertinoStreamingSessionCreate is fired twice for the same stream. My idea was to write to MySQL database does user watch anything, and check that when Streaming Session is created, but if onHTTPCupertinoStreamingSessionCreate is fired twice for one stream, then I can’t do it this way. Any idea what could be wrong?

Also if there is some documentation about life-cycle of HTTP streaming requests in wowza it would be great.

When I refreshed my page, and tried again event was fired only once. So I guess multiple events has something to do with sessions? Is there a way to check this, and be sure that event is only called once per stream?

EDIT: refreshed again, but still fires twice. Weird.

Thank you. I decided to place my business logic elsewhere and move it from the onHTTPCupertinoStreamingSessionCreate. As you can assume, that raise new issues :slight_smile: But I’ll ask in a new thread, not to post things here that are not related to the original question.

If I remember well, this is specific to HLS (Cupertino). One session is opened for getting the list of chunks, and the other one for getting the actual chunks. I was working on something similar and came across the same problem. Again if I remember well, there was a way to distinguish between the two, I think user agent string in the request was different, you can check yourself - you should spot the difference.

The workaround would be to increase the limit for Cupertino by one, but this is just a quick fix, not a very good solution.