Gabe Rocks!

Correction I originally wrote that Grayjay was FOSS, this isn’t true. Grayjay is simply source-available, even if the plugins actually are licensed under the GPL.

Grayjay appears to be intended to be a one-stop-shop for all of one’s digital consumption needs. It has support for YouTube, Rumble, Odysee, and others, but what got my attention was the PeerTube support.

I still don’t quite understand how plugins work under the hood. It seems that they inherit functionality from classes that provide standard interfaces for the client to use. Essentially the goal seems to be that every platform can be abstracted in the form of a plugin.

The Official Plugin

The PeerTube plugin has some issues. It’s not immediately apparent how to use your own peertube instance instead of FUTOs. The “open in Grayjay” button just outright ignores whatever you add. So the easiest way to rectify that would be to hit the “copy link” button and open it from your android. If you’re having trouble with this, simply make a simple web link to the url with html, open it with the html viewer and click the link, or find a different way to send you the link as a hyperlink, just opening the link in your browser may not work.

So once that’s taken care of local peertube videos will work great! As of writing this I haven’t tested casting, but I know casting from other platforms works so I assume there aren’t issues there. The problem is that remote videos will all fail to load. When you open a link in grayjay it’s designed to choose a plugin that’s authorized to open it, the app doesn’t seem to understand that the peertube plugin works for all peertube sites.

Thankfully there’s a fairly simple solution to this. The real reason remote videos fail is that the URL provided from the api call /api/v1/videos/ gives the remote url, not the local url. This confuses grayjay because it doesn’t realize that it can play the video.

Making my own

You see, a remote video on peertube can be loaded from the instances URL. So I simple forked the plugin and changed how remote videos are loaded.

Shamefully copied from my in the repo:

Hopefully this specific plugin will be unnecessary. I forked the official peertube plugin because as it currently exists, it doesn’t properly load videos from remote instances.

My solution isn’t very elegant, I’m not familiar with typescript, but this plugin will allow you to browse videos within the network for the Libre Solutions Network PeerTube

Changes made:

Outstanding issues

If you have grayjay and want to give it a try feel free to install it from here.
Simply install the grayjay app and open that page, the install button will have grayjay load the plugin. I’ve limited it’s reach to only but you could fork your own and make it work for your instance.

I’m hoping the main peertube add-on gets fixed, and/or that the plugin system allows the user to configure variables like the baseURL from within the plugin settings. Once that’s done, all that really needs to be done is for the plugin to properly add the configured baseURL to videos as they are loaded in.

Reply to this post

PeerTube Grayjay Typescript Plugin
Prev B @ Next