<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>The Interledger Community 🌱: Miles DeWitt</title>
    <description>The latest articles on The Interledger Community 🌱 by Miles DeWitt (@miles).</description>
    <link>https://community.interledger.org/miles</link>
    <image>
      <url>https://community.interledger.org/images/lMiTO1h94NPeeECWUqSsAi5xdnOSOvDZpd1MCySmjm8/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy91/cGxvYWRzL3VzZXIv/cHJvZmlsZV9pbWFn/ZS8xMTEvYzIwNjcz/OTctOGY3Zi00ZmY2/LWFjYWQtNTZkOGE2/ODI2MmNmLnBuZw</url>
      <title>The Interledger Community 🌱: Miles DeWitt</title>
      <link>https://community.interledger.org/miles</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://community.interledger.org/feed/miles"/>
    <language>en</language>
    <item>
      <title>Web Monetization in PeerTube — Grant Report #2</title>
      <dc:creator>Miles DeWitt</dc:creator>
      <pubDate>Tue, 29 Jun 2021 18:19:45 +0000</pubDate>
      <link>https://community.interledger.org/miles/web-monetization-in-peertube-grant-report-2-3jd6</link>
      <guid>https://community.interledger.org/miles/web-monetization-in-peertube-grant-report-2-3jd6</guid>
      <description>&lt;h2&gt;
  
  
  Project Update
&lt;/h2&gt;

&lt;p&gt;This is the final report, and all objectives have been achieved, though it would be good to improve optimization in the future. A big usability improvement over the previous version is currency conversion (which wasn't something originally considered), which allows costs and stats to be handled in USD (or other currency of your choice) rather than XRP. Badges on titles help to quickly see if and how a video is monetized. And stats tracking provides more insight on how videos are viewed&lt;/p&gt;

&lt;h2&gt;
  
  
  Progress on objectives
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Title badges
&lt;/h3&gt;

&lt;h1&gt;
  
  
  &lt;img src="https://community.webmonetization.org/images/kt45NSa1mJ8-qQad8iwkqfh7XPiRh6WDP7oUQu-KJQ8/w:880/mb:500000/ar:1/aHR0cHM6Ly9taWxl/c2Rld2l0dC5jb20v/cGVlcnR1YmUtd2Vi/LW1vbmV0aXphdGlv/bi9iYWRnZXMucG5n" alt="Video titles with badges showing monetization status" width="" height=""&gt;
&lt;/h1&gt;

&lt;p&gt;An icon by the title of a video showing the user they will skip sponsors can entice the user to choose one video over another. There are three types of video represented (beyond those without monetization). Videos that are simply monetized display a simple Web Monetization logo, those that have sponsor spots that may be skipped have the logo surrounded by a circle. Those that require payment additionally display the cost by the icon. If the user has already paid toward the video that amount is also displayed. The user can simply ignore the badges as well, to no harm.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stats tracking
&lt;/h3&gt;

&lt;p&gt;It's important that users don't have to double-pay for a video (if/when users can pay directly rather than the current unlimited subscription model), so the site must remember what parts of videos have been paid for. As a user views a video, the client remembers which segments are viewed, and the payments with receipts associated with it. Every few seconds it submits this information to the server which verifies the receipts, commits the changes, and sends the new state back to the client.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;img src="https://community.webmonetization.org/images/_ZLr90r8YsCl7VptH4RQvYL6SITEBxaieAYtBFDeM24/w:880/mb:500000/ar:1/aHR0cHM6Ly9taWxl/c2Rld2l0dC5jb20v/cGVlcnR1YmUtd2Vi/LW1vbmV0aXphdGlv/bi9wYXJ0aWFsLXBh/eW1lbnQucG5n" alt="A video partially paid for shows the amount paid and amount for the entire video" width="" height=""&gt;
&lt;/h1&gt;

&lt;p&gt;Similar infrastructure is used to track general viewing stats. The server stores, for each video, the overall amount paid during 15 second segments. It will also record the amount received on each day, and whether the payment came from a subscriber of the channel. Users can also record how much they have contributed to different creators. This tracking can be opted-out by the user in the stats viewing tray.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;img src="https://community.webmonetization.org/images/-n_hgsvoZMeFsBg-JT38tbePREfz3V3-V_7YSDlT68s/w:880/mb:500000/ar:1/aHR0cHM6Ly9taWxl/c2Rld2l0dC5jb20v/cGVlcnR1YmUtd2Vi/LW1vbmV0aXphdGlv/bi9zdGF0czIucG5n" alt="Stats are displayed in the stats tray below a video" width="" height=""&gt;
&lt;/h1&gt;

&lt;p&gt;Stats are viewed by clicking the Web Monetization icon in the video action bar. This displays the total amount paid by the user, the histogram with the amount paid for segments of the video, the per-day revenue, and pie chart of the logged in users contributions by creator. The currency can be changed by a drop-down menu using exchange rates from CoinGecko. The histogram displays all-user stats, and data from the current page view.&lt;/p&gt;

&lt;p&gt;These stats provide less-easily-forge-able data about which parts of a video (paying) users are watching, during what days, and whether they are subscribed. It may be useful to compare this data with that from users not contributing by Web Monetization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Currency conversion
&lt;/h3&gt;

&lt;p&gt;This was a detail not originally considered, but nonetheless important. Payments from Coil are made in XRP, but can theoretically be in any sort of asset. Thus, payments are stored as a list of assets and amounts upon receipts. Once submitted to the server for stats, etc., they are converted to the currency specified for the video. This is because it is assumed the author converts the payment upon receipt, and remembering the amount of a more volatile currency such as XRP is not as meaningful.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;img src="https://community.webmonetization.org/images/dvqV7RSJGAWgSMJHBru_b7D2IfoimrEkP7AbjSY3v6k/w:880/mb:500000/ar:1/aHR0cHM6Ly9taWxl/c2Rld2l0dC5jb20v/cGVlcnR1YmUtd2Vi/LW1vbmV0aXphdGlv/bi9leGNoYW5nZS5w/bmc" alt="Amount paid is converted to Euros" width="" height=""&gt;
&lt;/h1&gt;

&lt;p&gt;Users can choose to display values in any currency: USD, XRP, BTC, among others. Directly above, the value is converted to Euros rather than USD. Minimum view costs still display in the currency specified for the video, but conversion to the user's desired currency is shown in parenthesis (e.g. in image of title badges above, BTC is used for the third video).&lt;/p&gt;

&lt;h2&gt;
  
  
  Key activities
&lt;/h2&gt;

&lt;p&gt;The plugin has been &lt;a href="https://www.npmjs.com/package/peertube-plugin-web-monetization"&gt;published on npm&lt;/a&gt;, making it available to install in PeerTube, along with its accompanying &lt;a href="https://www.npmjs.com/package/peertube-plugin-chapters"&gt;chapters plugin&lt;/a&gt; discussed in the previous post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communications and marketing
&lt;/h2&gt;

&lt;p&gt;I've made some blog posts on my &lt;a href="https://milesdewitt.com/"&gt;website&lt;/a&gt; where there is also a &lt;a href="https://milesdewitt.com/peertube-web-monetization"&gt;homepage for the project&lt;/a&gt;. I've also &lt;a href="https://github.com/Chocobozzz/PeerTube/issues/1586#issuecomment-775251018"&gt;shared it with those interested&lt;/a&gt; on a GitHub issue discussing monetization in PeerTube.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;The main concern is optimization. Receipts are sent fairly often as they come quickly, and they are bundled with their related stats data. PeerTube plugins have fairly rudimentary data storage access at the moment, so it would be good to first store the data in Redis and actually write less often.&lt;/p&gt;

&lt;p&gt;It may be possible to improve the view cost setting as Web Monetization evolves. Currently, the uploader can set a minimum cost to view a video, however users cannot change how much Coil pays. This feature is still useful as-is to simply require the same amount that Coil pays, but if some sort of negotiation feature is added to the protocol, it will need to be implemented in this plugin.&lt;/p&gt;

&lt;h2&gt;
  
  
  What community support would benefit your project?
&lt;/h2&gt;

&lt;p&gt;Use the plugin and give me your thoughts! I'm open to any suggestions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relevant links/resources
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://community.webmonetization.org/miles/web-monetization-in-peertube-grant-report-1-2feh"&gt;Previous post&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://milesdewitt.com/peertube-web-monetization/"&gt;Project webpage&lt;/a&gt;&lt;br&gt;
&lt;a href="https://peertube.milesdewitt.com/accounts/root/videos"&gt;Demo videos&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/samlich/peertube-plugin-web-monetization"&gt;Repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://milesdewitt.com/peertube-chapters/"&gt;Chapters plugin webpage&lt;/a&gt;&lt;/p&gt;

</description>
      <category>grantreports</category>
    </item>
    <item>
      <title>Web Monetization in PeerTube — Grant Report #1</title>
      <dc:creator>Miles DeWitt</dc:creator>
      <pubDate>Mon, 08 Feb 2021 16:53:25 +0000</pubDate>
      <link>https://community.interledger.org/miles/web-monetization-in-peertube-grant-report-1-2feh</link>
      <guid>https://community.interledger.org/miles/web-monetization-in-peertube-grant-report-1-2feh</guid>
      <description>&lt;h2&gt;
  
  
  Project Update
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Progress on objectives
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Payments
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://community.interledger.org/images/iKRRk4mnot7RQXeHGzfvvR_91Q4uGOhx9CQXP0tU_is/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L2ZqaWZ0NnF3YXNt/ZXlvaTRxbDViLnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.interledger.org/images/iKRRk4mnot7RQXeHGzfvvR_91Q4uGOhx9CQXP0tU_is/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L2ZqaWZ0NnF3YXNt/ZXlvaTRxbDViLnBu/Zw" alt="Editing monetization settings" width="758" height="483"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://community.interledger.org/images/_MrVP6OgEGP0mZXwPF5R_0j4aSDVI2hMqWZ_VewMXqk/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L3JhbWh0dzdvc3Mz/OXN4djd0bjl6LnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.interledger.org/images/_MrVP6OgEGP0mZXwPF5R_0j4aSDVI2hMqWZ_VewMXqk/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L3JhbWh0dzdvc3Mz/OXN4djd0bjl6LnBu/Zw" alt="Payment being required to view a video" width="880" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ad-skipping
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://community.interledger.org/images/IFekYYSdEerLkC-c42zVMkyMI2Azd09pOlvLIXhuMHY/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/LzdrMno3bmE5bG53/M2RlajRkcWJ1LnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.interledger.org/images/IFekYYSdEerLkC-c42zVMkyMI2Azd09pOlvLIXhuMHY/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/LzdrMno3bmE5bG53/M2RlajRkcWJ1LnBu/Zw" alt="Viewing the chapter menu" width="431" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Statistics tracking
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://community.interledger.org/images/6mGj9TWMeFe1PaCAUzfFo5J17XWc5U0Wv0ruXQT3YRI/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L2VscWFnbGd1cmU4/NHdlM2l0c3k4LnBu/Zw" class="article-body-image-wrapper"&gt;&lt;img src="https://community.interledger.org/images/6mGj9TWMeFe1PaCAUzfFo5J17XWc5U0Wv0ruXQT3YRI/w:880/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkuaW50ZXJs/ZWRnZXIub3JnL3Jl/bW90ZWltYWdlcy9p/L2VscWFnbGd1cmU4/NHdlM2l0c3k4LnBu/Zw" alt="Viewed segments data" width="491" height="137"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Demos
&lt;/h3&gt;

&lt;p&gt;I've uploaded some videos which demonstrate the different modes of monetization.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://peertube.milesdewitt.com/videos/watch/b5b04416-9afc-42d0-9b47-cdf931b7740c"&gt;Monetized with No Minimums&lt;/a&gt;
The canonical mode of Web Monetization. If any level of payment is made, ads will be skipped.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://peertube.milesdewitt.com/videos/watch/3951474a-4342-46a2-82c7-1b510b7caaaf"&gt;Monetized with Low Minimum Payment&lt;/a&gt;
Required monetization. If less than 1e-5 XRP/s is paid, you are not able to view the video. (You may need to scroll, once the video pauses, for the modal to appear. This is an issue with PeerTube).&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://peertube.milesdewitt.com/videos/watch/b388eab6-6ba5-4a68-bcff-1cd6d82bc252"&gt;Monetized with High Minimum Payment&lt;/a&gt;
At least 1e-3 XRP/s is required to video (It waits around 15 seconds to give time for the client to initialize payment). This payment level is intentionally high to demonstrate insufficient payment.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://peertube.milesdewitt.com/videos/watch/793d2c82-d90a-4009-a4f7-fca4fb9f58e4"&gt;Monetized with High Minimum Payment to Skip Ads&lt;/a&gt;
This video will not skip ads unless at least 1e-3 XRP/s is paid.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Key activities
&lt;/h2&gt;

&lt;p&gt;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 &lt;a href="https://peertube.milesdewitt.com/accounts/root/videos"&gt;this test account&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The Web Monetization plugin has more details on &lt;a href="https://milesdewitt.com/peertube-web-monetization"&gt;my website&lt;/a&gt; and &lt;a href="https://github.com/samlich/peertube-plugin-web-monetization"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The chapters plugin is published separately and is needed to use ad-skipping. It also has a page on &lt;a href="https://milesdewitt.com/peertube-chapters"&gt;my website&lt;/a&gt; and on &lt;a href="https://github.com/samlich/peertube-plugin-chapters"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Communications and marketing
&lt;/h2&gt;

&lt;p&gt;Someone opened an issue around monetization on the PeerTube GitHub, after I had applied for the grant. I've posted the plugin there &lt;a href="https://github.com/Chocobozzz/PeerTube/issues/1586"&gt;https://github.com/Chocobozzz/PeerTube/issues/1586&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I've also posted the chapters plugin on the relevant GitHub issue, &lt;a href="https://github.com/Chocobozzz/PeerTube/issues/271"&gt;https://github.com/Chocobozzz/PeerTube/issues/271&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made a post about the initial MVP and an overview of the project, &lt;a href="https://milesdewitt.com/blog/2020-10-01-peertube-web-monetization-introduction/"&gt;https://milesdewitt.com/blog/2020-10-01-peertube-web-monetization-introduction/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;And a second post discussing further progress and the implementation &lt;a href="https://milesdewitt.com/blog/2020-11-01-peertube-web-monetization-stage-one/"&gt;https://milesdewitt.com/blog/2020-11-01-peertube-web-monetization-stage-one/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that it is published, I will suggest the plugin to instance admins.&lt;/p&gt;

&lt;h2&gt;
  
  
  What’s next?
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  What community support would benefit your project?
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Relevant links/resources
&lt;/h2&gt;

&lt;p&gt;These are all above, but repeated for convenience.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://milesdewitt.com/peertube-web-monetization/"&gt;Web Monetization Plugin Homepage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://milesdewitt.com/peertube-chapters/"&gt;Chapters Plugin Homepage&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://peertube.milesdewitt.com/accounts/root/videos"&gt;Demo Videos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>grantreports</category>
    </item>
  </channel>
</rss>
