So you would like to cache the video / data client-side?

Or is your question about integrating a YT alternative which does not load the complete video file on each page visit?

Like what nostr:npub1l5aav5te8q0hd68cazvjt6968kmd8wdzu6lvg238a08djlx9yzjs4vmxm7 said, there are plenty video players out there with their own pros and cons.

You could also build something on your own pretty easy with https://www.media-chrome.org/ for example.

Reply to this note

Please Login to reply.

Discussion

I don't know what best practices are for hosting a video. A YT alternative would work, but I'd prefer not embedding the video on another platform, if possible.

The problem is I don't know how to set it up if it's not on a platform like YT, Vimeo or something similar. I mean, I can host the entire video myself and load it on the homepage, but (I think) that means loading the entire video everytime someone visits?

Sorry if this vague. Not a developor, I make drawing for a living ;)

Yeah this is exactly the problem!

You need a backend that can stream the resources instead of just loading it in one single file.

In my eyes you are having two options:

1. You can use a hosting service that can do this for you pike you are already doing with youtube

Maybe nostr.build is an option (or other). You can upload it there and the add a standalone player to your website which plays the stream after loading the site.

2. You can code your own server which streams the video. You can build such a thing with node.js with like 50 lines of code. You can find plenty of examples on how to do this online.

The down side here is that after coding you have to host this small server code somewhere.

After that you can add a player to your website like in option 1.

If you are not into coding servers I would recommend you option 1. It’s much easier to achieve your goal.