Wowza Community

How to periodically check a unique client?

Hi There!

I’ve been beating my head against the wall trying to come up with a proper solution to the following issue.

I would like to be able to track users that are currently watching a stream, when they perform their request they go through security with the onHTTPCupertinoEncryptionKeyRequest, from here a thread is created upon acceptance of a users credentials with our backend.

Now, this thread checks with the backend at a set interval whether he is allowed to watch the stream, in case he receives a negative the thread will reject the session and shut it down.

The original HttpStreamerSessionCupertino is stored in each thread upon creation, a long with other data that is specific to our backend, that is originally received in the onHTTPCupertinoEncryptionKeyRequest using the request.getParameter function.

Is there any other way to go about this method? Having periodical checks without having to create a thread for each active client?

And if not, when using the onHTTPCupertinoEncryptionKeyRequest function, it can in some cases be called more than once because the player (I’m assuming) doesn’t wait for a response, leading to multiple threads being created for the same streaming session. How would I go about getting the same information that onHTTPCupertinoEncryptionKeyRequest receives, but only once? (Perhaps there is a way to use the OnPlay eventlistener and transfer the data ?)

TL;DR:

  1. Is creating a new thread for every active session best practice for periodical checks or is there another way?

  2. Is there a function that reminds of (Has same parameters) onHTTPCupertinoEncryptionKeyRequest that runs only once even though the player might lag?

Cheers, and welcome to the new year!

Hello

Thanks for contacting Wowza Forums.

Sounds like authenticate and want to monitor the connections. Here is an article on security and how to implement. SECURITY

From there either you can ingest the wowza logs and use a log parser, like Sawmill or one similar. From there you can build dashboards based off your specific needs.

Hope this helps.

regards,

Jermaine