• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
    • Products

      • Wowza ClearCaster
      • Facebook Live appliance
      • Wowza Streaming Cloud
      • Cloud streaming services
      • Wowza Streaming Engine
      • Streaming server software
      • Wowza GoCoder & SDK
      • Mobile capture and encoding app
    • Capabilities

      • CDN
      • Ultra Low Latency
      • SRT
      • Player
      • WebRTC
      • Live Transcoding
      • See All Capabilities
  • DOCS & APIS

      Docs & APIs

      • Getting Started
      • User Guides
      • Technical Articles
      • Video Tutorials
      • API & SDK Docs
  • SOLUTIONS
    • Streaming Types

      • Live Video Streaming
      • Video on Demand
      • Audio-Only Streaming
      • IP Camera Streaming
      • VR and 360° Streaming
      • Chat
    • Industries

      • Broadcast & OTT
      • Education
      • Enterprise
      • Government
      • Live Events
      • Live Sports
      • Religious Organizations
    • Streaming Solutions

      • MediaDS—Integrated Streaming Device
      • Streaming Service Providers
      • Live Mobile Broadcasting
  • PRICING
    • Wowza ClearCaster

      • Facebook Live appliance
      • Starting at $2,995
      • Add to Cart
      • Request a Demo
    • Wowza Streaming Cloud

      • Cloud streaming services
      • Starter Plan: $49/month
      • Add to Cart
      • See All Plans
    • Wowza Streaming Engine

      • Streaming server software
      • Annual Plan: $65/month
      • Add to Cart
      • See All Plans
    • Wowza GoCoder SDK

      • SDK for mobile streaming
      • Talk to a Streaming Expert
      • Contact Us
      • Free Trial
  • RESOURCES

      Resources

      • Blog
      • Case Studies
      • Webinars
      • Videos
      • Podcasts
      • Test Players
      • Developer Tools
  • SUPPORT
    • Support

      • Forums
      • Software Updates
      • Open a Support Ticket
    • Plans & Services

      • Support Plans
      • Advisory Services
      • Live Event Support
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Developer Dojo /
  • Wowza Streaming Server Java API /
avatar image
Question by Florida Stream · Apr 26, 2014 at 08:30 PM · wowza streaming server java api

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 .
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image

Answer by Richard Lanham · May 01, 2014 at 02:50 PM

You can use the ModuleTimedDisconnect for this.

Richard
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Stream Toolbox · May 02, 2014 at 04:06 PM 0
Share
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.
avatar image

Answer by Florida Stream · May 03, 2014 at 12:48 AM

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.
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

ModuleRTMPAuthenticate.onConnect 5 Answers

Logging to a Database 27 Answers

Rest api >> wowza 4 2 Answers

How can LoopUntilLive module recognize a multi-bitrate live stream from Transcoder? 1 Answer

rtsp to rtmp from vivotek ip camer 10 Answers

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2018 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Users
  • Badges