samlich / peertube-plugin-web-monetization

Apache License 2.0
13 stars 3 forks source link

Bitcoin/Lightning integration? #4

Closed aiboss001 closed 2 years ago

aiboss001 commented 2 years ago

Hello @samlich, Great work on the plug-in! Peertube definitely needs a way to monetize and this is the start of a solution.

I am working with the head developer and owner (@Bumi) of Alby getalby.com, a browser extension that lets you pay people with lightning.

I want to create a Bitcoin only integration with Peertube. Any interest in joining forces to make this a reality?!

Thanks in advance for your reply, Brian Mac / Bitcast.online

samlich commented 2 years ago

That looks like it would integrate well with this plugin, and I'd be interested in integrating it in the future, so thanks for reaching out. Unfortunately, I don't really have the time to work on this at the moment.

It looks like it supports a streaming payment model similar to Web Monetization, so a first step could be integrating that. However, I would like to support other scenarios such as one-time payment for content or a group of content, but that's going to require significant changes to how the plugin works, and ideally improvements to PeerTube's plugin infrastructure. Namely, database use is very limited, there aren't good ways of adding additional UIs, and I don't believe I can even properly restrict access to a video other than through client-side nags (although the current Web Monetization model doesn't play well with fully restricting access to content, so I didn't try anything else).

But, I think a lot of the necessary components should really be external to PeerTube and this plugin, as no plugin should really need full database access, and things like storing purchases, transactions, and pricing data are fairly generic. So, perhaps the best solution is if you have some sort of service that the plugin can communicate with to just integrate it with PeerTube. The user could of course do basic price-setting and viewing of stats within PeerTube. And the main function of displaying prices, processing the payments, and enforcing the parameters set for viewing the content with each type of payment. But the plugin would just store the subset of the data it needs for those functions. The service would provide a dedicated user interface, and would integrate with any other similar plugins.

I'm going to close the issue, but I'm open to discussing this. I may be able to add the streaming payment part in a few months, if it fits the current model well, but in general I don't have time for much more than that at the moment.