iBicha / UnityYoutubePlayer

Play YouTube videos in Unity
The Unlicense
331 stars 63 forks source link

Heroku dynos and connection interrupted #91

Closed xkozma closed 1 year ago

xkozma commented 1 year ago

Hello, first of all, I would like to say, I love this implementation, I included it into my VR shooter videogame that incorporates YouTube videos and it's superb.

I have a question though, today I looked back at herokuapp, where I uploaded the youtubedl thing and now I'm working off of that. But there is a message from heroku that free dynos are going to be cancelled on 22th of November - is that an issue for the app? (Sorry I'm complete rookie in this stuff, just seen there is one free dyno, but don't know what that really means)

Also, I wanted to ask, if there is some way to handle connection interruption when just playing the video in the implementation, cause what it does now for me, is that it freezes the screen and then hops X-seconds the lag occured in the future of the video and the rest is "unseen", just skipped.

Thank you, and keep up the good work! :)

iBicha commented 1 year ago

there is a message from heroku that free dynos are going to be cancelled on 22th of November - is that an issue for the app?

Yes, this will be a problem. You will need to host the youtube-dl-server somewhere else, or pay Heroku.

This is true for non-desktop applications. For Desktop apps, youtube-dl can run locally, so it does not need a server.

Also, I wanted to ask, if there is some way to handle connection interruption

The job of this package is to retrieve a valid http link that returns a video file. After that, it's up to the video player to handle slow internet. What you're describing is probably right, the video player keeps a timer, and if the video is not downloading fast enough, it makes sense that it drops frames to keep up.

I hope this helps

xkozma commented 1 year ago

Alright - the solution for heroku for me atleast is - Students account - they are offering Hobby Dynos for students, which is cool and they should sustain. And as for Video Player- yeah, having a lot of issues with "AudioSampleProvider buffer overflow. XXX frames discarded", googled everything there was, no right answer found, probably will need to create some kind of handler for these kinds of problems.. But I understand its not problem of this package. Thanks for the answer :)