The Interledger Community 🌱

Cover image for Web Monetization in PeerTube β€” Grant Report #1
Miles DeWitt
Miles DeWitt

Posted on

Web Monetization in PeerTube β€” Grant Report #1

Project Update

The core functionality of accepting and requiring payments to view videos and skip ads has been implemeented, but there's still work to be done on statistics tracking. The goal of this project has been to make PeerTube more competitive with YouTube in terms of ability to garner revenue in the absence of an integrated ad platform. This goal has been achieved (sans statistics tracking) by facilitating payments from viewers with Web Monetization, providing ad-free viewing for those who pay, and enabling exclusive content which requires payment. Statistics tracking is coming in the future, and will always be optional.

Progress on objectives

Payments

Editing monetization settings

Accepting and requiring payment is mostly complete. Creators link their payment pointer and set a (possibly zero) minimum pay rate to view or to skip ads. The viewer's client then enables Web Monetization while the video is playing. It remembers which segments have been paid for, and does not double-bill if some parts are watched twice.

Payment being required to view a video

If the pay rate is below the uploader's minimum, it pauses the video and displays a modal. This enforcement is only done client-side, but it could be enforced server-side for payees which provide receipts. There also still needs to be a way to indicate payment is required.

Ad-skipping

Viewing the chapter menu

Ad-skipping is complete. Creators provide a chapter list for a video and tag sponsor segments as such. Then, if the client's pay rate is above the minimum set by the uploader, sponsor segments will be skipped during playback. There could be better indication of when sponsor segments occur. Currently they are shown in a chapter menu, but should also be indicated on the timeline.

Statistics tracking

Viewed segments data

Statistics tracking is barely implemented. Each segment of the video viewed, and how much was paid during that segment is stored client-side and is lost after a page navigation. This is ideal for some, and will be an option, but this data still needs to be able to be stored on the server so users don't have to double-pay for the same content across sessions, and so creators can get more accurate data on what people are (paying for) viewing.

This is a more complicated task as the may be too large to store in the same way video settings are currently stored. I am considering writing a plugin for the Matomo analytics platform, as the currently available media plugin is proprietary, expensive, and has different goals.

Demos

I've uploaded some videos which demonstrate the different modes of monetization.

Key activities

The plugins are published and can be installed in the administration panel in PeerTube. As linked above, you can also test videos with different settings on this test account.

The Web Monetization plugin has more details on my website and GitHub.

The chapters plugin is published separately and is needed to use ad-skipping. It also has a page on my website and on GitHub.

Communications and marketing

Someone opened an issue around monetization on the PeerTube GitHub, after I had applied for the grant. I've posted the plugin there https://github.com/Chocobozzz/PeerTube/issues/1586.

I've also posted the chapters plugin on the relevant GitHub issue, https://github.com/Chocobozzz/PeerTube/issues/271

I made a post about the initial MVP and an overview of the project, https://milesdewitt.com/blog/2020-10-01-peertube-web-monetization-introduction/.

And a second post discussing further progress and the implementation https://milesdewitt.com/blog/2020-11-01-peertube-web-monetization-stage-one/

Now that it is published, I will suggest the plugin to instance admins.

What’s next?

Optional statistics tracking is the main feature remaining. There also needs to be non-intrusive feedback to the user on the general state of monetization.

I have recently seen the documentation on receipts and revenue sharing. I will look into the feasibility of easily sharing revenue with the instance host to offset the costs of hosting the content.

There are three minor issues. Form validation only works on the video update page, not the publish page. The modal requesting payment only appears after scrolling, which seems to be a PeerTube bug. Embedded videos cannot display modals, so a different way of notifying the user needs to be added.

What community support would benefit your project?

Testing by viewing the demo videos and using the plugins on your own instance is appreciated. You could also request that instances you are active in add the plugin.

Relevant links/resources

These are all above, but repeated for convenience.

Top comments (1)

Collapse
 
chrislarry profile image
Chris Lawrence

This is exciting stuff! Love your clear articulation of your goal. It is obviously very difficult to achieve but simple in its clarity. Looking forward to what you come up with, could really be a game-changer!