Wowza Community

Help, dynamic limiting duration of stream/disconnect after X minutes(Schedule Thread)

Hello I would like to ask for any help with what I will describe , after days , hours and hours studying this function without success , I decided to try the last instance ask for help from someone who knows these functions .

I have this data in the database.

Userid | Remaining Time

Username1 | 10

where 10 are 10 minutes

I need to check every minute through a thread , even if the User has the minutes or not , if you still own, still running stream , it does not close the stream to the user .

For this to happen in a lighter way to the server , it would be good to pass the value “10” to a temporary variable , and thus be checking it .

run every minute 
example.: tempmin = 10
HERE function that does the checking , the regressive tempmin
if ( tempmin < 1 ) {
close user stream session
//rest of code, upgrade database
}
else { 
continue playing
}

The problem is I do not know even know how to do this in wowza , a simple example would help me a lot so I could continue from there .

I have not found a way to set a countdown in minutes/seconds etc to live/vod streaming .

I have failed in all attempts to set up a shedule for the thread .

Basically , I need an example , already envisioned dozens of tutorials , hundreds of posts , and unfortunately did not help me .

Thank you in advance .

You can use the ModuleTimedDisconnect for this.

Richard

Hi!

The latest version of Wrench added support for dynamic credit balance checking for players. That means that you can have an initial balance for each connected player, like 5 minutes, and if they get score / pay for more minutes / whatever, their balance can go up. Wrench will periodically decrease their balance. If the balance goes down to 0, they are disconnected. This is more powerful than the above suggested ModuleTimedDisconnect. Here is my tutorial about this.

Thanks for the help, I’ll try it, however I need help with the source code for custom implementation, and simple code, I am beginner.

I’m making progress at a slow pace, anyway, thanks for the help.

Is there any way to create global variables?

@Edit: I found here: http://www.wowza.com/forums/showthread.php?25205-Server-Custom-Global-Variables

Tks.

Hi!

The latest version of Wrench added support for dynamic credit balance checking for players. That means that you can have an initial balance for each connected player, like 5 minutes, and if they get score / pay for more minutes / whatever, their balance can go up. Wrench will periodically decrease their balance. If the balance goes down to 0, they are disconnected. This is more powerful than the above suggested ModuleTimedDisconnect. Here is my tutorial about this.