Setting timeout for media streaming app

Hello Thunkers!

I am building a media streaming app. In order to keep it free for me + the users, I need to set limits so I don’t use up my streaming allotment on Cloudinary. I’m not sure if this is the most logical / straightforward way to approach this (please be honest if it isn’t! I’m a n00b, but I can handle critique! :sweat_smile: ) …

I’m thinking maybe I should set a max amount of streaming for the app?

  • Limit the user to 1 total hour of use per day.
  • Limit the user to 5 total hours / month.

When their personal limit is reached, the app will navigate from the media screen and hide it if they open the app again during that day (if time elapsed) or that month (if time elapsed).

Is this even possible without user accounts? Is this entering crazy complicated territory land?

Thank you for your wisdom Thunkers! :laughing:

Why would anyone want to use your limited app when there are competitors out there that are unlimited and free?

Yes possible. Not crazy at all. Do it!

1 Like

Hi Dean!

I am providing specific media that isn’t out there in this way. I want very much to keep it a 100% unlimited stream + free app, but I’m just plain unsure how to do so with the cost of streaming itself? :sweat_smile:

I’ve estimated that I’d get about 400 hours of free streaming via the free Cloudinary subscription… so if I had 100 active users, they’d only get 4 hours per month.

I don’t know how else to provide media for people to stream it as much as they like at no cost to myself (or them).

If you have any suggestions though, I am 1000000% all ears! :smiley: :clap:t2:

Thank you! :clap:t2:

Would you have any tips on where to start? :upside_down_face:

Are you serving videos?

To lock any content for a fixed amount of time, I would use the secondssince1970 block
You’ll have to do some math but that’s where I’d start.

How many seconds left in the month based on the number of days

Add that value to the current second since 1940 save that to a variable named timetounlock

Then either navigate to a different screen or make that visual component invisible if the current second since 1970 does not equal or is greater than the stored variable timetounlock

1 Like

No, just audio! I’m providing about 150 - 200mb on a shuffled loop… wanted it to play for them as long as they liked, but as I researched it more, realised that would be a problem with streaming costs. I didn’t know any of that when I started!

1 Like

Can you compress the MP3’s to a slightly lower but acceptable quality?

Or are there services like YouTube for MP3’s?

With youtube you could share a video in the app via the video link

I’d you could find a mp3 server like YouTube, you’d be in business.

1 Like

Thank you so much! I will look into this! I may have more questions in the future, but this is a great place to start. I appreciate the help. :smiley:

1 Like

Very good questions Jared! So, I the most important function to me is that the app will share all of this audio in a shuffled + totally random order, until the full list of audio is all played, then repeats it all over again shuffled… (the same audio file should not repeat multiple times in a row after it’s already played… there should be a long space before the user hears the same file again).

I don’t want the audio to be in the same order every single time for these users, as in each time they open the app it starts with audio 1, then 2, then 3. Then I might as well just give them a set playlist or send them over to youtube or a podcast station. “Shuffled” is key here.

Would I be able to do all of this via an mp3 server?
What do you think? :thinking:

Thank you for taking the time to dialogue over this. I appreciate your insight!

If each mp3 has its own link, should be no problem.

I’d start looking into services like

https://www.caster.fm/

Or other internet radio hosting services.

1 Like

Oh WOW! Clyp looks really promising Jared… will look into this one more. Fantastic!
Thanks a million for sharing these links and all of the advice!

Would love to avoid limiting their time steaming if I can, this would be ideal. I didn’t think it was an option really!

:clap:t2: :clap:t2: :clap:t2: :clap:t2: :laughing:

1 Like

I just want to add this table in case it helps anyone else.

Drop box is a great option! 20GB traffic / bandwidth per day! You get that in an entire month on the free plan for Cloudinary. Woohoo! :laughing:

You just have to amend the shared link slightly so it will stream.

1 Like