-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add to the hubBlob().serve()
method options object with the property onlyStream
to prevent downloading videos
#444
Comments
server
method an options object with the property onlyStream
to prevent downloading videoshubBlob().serve()
method options object with the property onlyStream
to prevent downloading videos
Prepared PR: #445 |
I am not sure that this will prevent downloading the video as seen on https://stackoverflow.com/questions/9756837/prevent-html5-video-from-being-downloaded-right-click-saved I believe a true (I really appreciate the idea and energy though ❤ ) |
@atinux I believe any pre-defined “hacks” won't help if a user tries to get a direct video URL from the Network tab. So, I decided to block such requests, even if the user finds a way how to do that. But you are right, currently the It'd be nice to have something like HLS under the |
@atinux just wanted to confirm, does streaming potentially possible with the current implementation? Does it require minor fixes, or it's about a massive change? I want to understand because I'm building an MVP with Nuxthub and CF infra because it covers the most required areas like storage, database, and deployment. But my product is about videos for visitors. Those videos don't have to be downloaded, only streamed. Without streaming, I can't use this solution, but I really want. So, let me know, please, if I can move forward with this. |
I believe for video streaming, Cloudflare has a service for it that may directly fit your needs (and should work with NuxtHub as well): https://www.cloudflare.com/developer-platform/products/cloudflare-stream/ |
@atinux yeah, I also found that service. But initially, I got it as a possibility to upload videos for customers as content creators, like YouTube/Instagram/TikTok analogue needs, not only for the platform admins like in video courses platforms. But it seems it's created for both cases. Sadly, there's no a free plan just to check how it works. Did you plan to have any Nuxt integration for the service? |
Once I got the time to work on it, so far I am working on moving to CF workers so you might be the first one to help us integrating this service 😄 |
@atinux I will request a trial period for development and check how to build a custom solution with their API of Cloudflare Stream service. If I get it works, I'll let you know. |
hey @atinux, just an update. I tried to request a trial period, but they ignored me, as I expected. But while I was awaiting, I checked their documentation deeply and found this one: Uploading videos which size exceeds 200 MB has to be done via the NPM There are 2 ways I see to handle the uploaded videos and save them to a DB:
For now, I guess these issues:
And the PR: … could be closed as not planned because all of them are not related to the |
Thank you very much for looking at it and giving me back your feedback @serhii-chernenko Feel free to open another issue for the new functionality you imagine. |
Is your feature request related to a problem? Please describe.
I have a simple component with an HTML5 video tag:
I prepared an API endpoint to stream video blobs by name:
When the video is loaded, I can download it:


Describe the solution you'd like
I decided to create a middleware
And check
range
andreferrer
headers in the request. If they are missed, throw an Unauthorized 403 error:The issue has solved for me:

I expect similar behavior for the
serve
function when theonlyStream
option is provided:Additional context
Please don't suggest adding
nodownload
to thecontrolsList
of thevideo
tag because it could be simply “hacked” by any user who knows how to open DevTools.The text was updated successfully, but these errors were encountered: