Is there a possible way to save a video on the cache? So dont need to download everytime?
Just an idea. Upload your videos to a private YouTube Channel and set to unlisted and then save the link to the video in the database and let YouTube carry the weight! Video processing, storage, play back… All a total nightmare and very resource hungry.
You can load the video to your server and use the video component to play it but there will still be a delay as it loads due to the fact your server will not actually stream it properly. As cheese says, youtube is the best option (combined with ben’s excellent video player app connect extension)
But the problem is that in my city internet is not always very good but I have a lot of recurrent users I want to have the video available when the internet speed is not good.
Then all the more reason to upload to YouTube as the variable bit-rate will be defined automatically based upon the connection speed.
I disagree using YouTube given his specific concerns in regards to living in a place where Internet access may be limited. Using YouTube solves one part of a problem, which is selecting the right quality for the current Internet speed, but if there’s a traffic cap on the Internet then it’s unnecessary to load the video from the beginning at each website visit (he mentions recurring visitors). Imagine the person has a 1GB traffic cap, it’s unnecessary to reload the video, better to load it from cache.
I’m not sure how to do this in Wappler, but you will want to play with HTTP cache headers somehow.
From ChatGPT … not sure if it works or not. May have to play with the max-age setting as well.
Depending on your server setup, you may have options to configure caching. For example, with Apache, you can use the .htaccess
file to set caching rules.
Example for Apache:
<FilesMatch "\.(mp4)$">
Header set Cache-Control "max-age=3600"
</FilesMatch>
I am reading about app cache manifest. Does anyone have use this function ??
My understanding is that there are two.options.
- Youtube
With this, the video is streamed on demand so there is no need for storing/caching. - Video file on server delivered by wappler video component.
Probably not going to make much difference if the file comes from the local server or a cache on the server but there is always a significant “preload” time using this option as the file is pulled from the server.
In my opinion youtube is the better option for low bandwidth clients as it can adapt to the available bandwidth.
But if you mean the browsers cache to keep it loaded at the client end then that is down to browser settings,not server.
Off topic but your Project could benefit from Cloudflare. Using Cloudflare it will proxy/cache and serve from the location nearest to your user based on their geographic location rather than keep fetching from the host origin server. Totally free and relatively easy to set up with a little DNS adjustment.