Compare commits

..

No commits in common. "b9999a8d60e85d25bbd9f5708008a10d119e4477" and "51f47b8d582147659585c2602d1eef9e7520ea97" have entirely different histories.

5 changed files with 6 additions and 54 deletions

View file

@ -7,9 +7,9 @@
"sourceUrl": "https://gabe.rocks/grayjay-pt/PeerTubeConfig.json",
"repositoryUrl": "https://code.gabe.rocks/gabriel/peertube-grayjay",
"scriptUrl": "./PeerTubeScript.js",
"version": 1,
"version": 20,
"iconUrl": "./icon.png",
"iconUrl": "./peertube.png",
"id": "d770c577-e9ec-4435-a78a-f83fb9064bdf",
"scriptSignature": "",
@ -18,7 +18,7 @@
"allowEval": false,
"allowUrls": [
"https://peertube.libresolutions.network"
"everywhere"
],
"constants": {

View file

@ -126,7 +126,7 @@ source.enable = function (conf) {
source.getHome = function () {
return getVideoPager('/api/v1/videos', {
sort: "-publishedAt"
sort: "best"
}, 0);
};

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

View file

@ -1,26 +1 @@
<html>
<head>
<title>Libre Solutions Network PT Plugin for Grayjay</title>
<style>
body{
font-size:18px;
display:flex;
flex-direction: column;
align-items: center;
}
button{
padding:10px;
font-size:24px;
border-radius:6px;
}
</style>
</head>
<body>
<h1>Libre Solutions Network</h1>
<h2>Peertube Plugin for Grayjay</h2>
<p>See the <a href="https://code.gabe.rocks/gabriel/peertube-grayjay"></a></p>
<a href="grayjay://plugin/https://gabe.rocks//peertube-grayjay/PeerTubeConfig.json"><button>Install</button></a>
</body>
</html>
<a href="grayjay://plugin/http://10.0.0.2:8000/PeerTubeConfig.json?url=https://peertube.libresolutions.network">Install</a>

View file

@ -1,24 +1 @@
# Grayjay PeerTube Plugin for Libre Solutions Network
Hopefully this specific plugin will be unnecessary.
I forked the official [peertube plugin](https://gitlab.futo.org/videostreaming/plugins/peertube) 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](https://peertube.libresolutions.network.)
## Changes made:
- Changing from trending peertube videos to most recent
- Setting the baseURL to `peertube.libresolutions.network`
- To allow remote videos to load, i had to hardcode `getVideoPager` url parameter with:
```url: "https://peertube.libresolutions.network"+ v.url.substring(v.url.search("/videos/")),```
**Why?** Because when the peertube plugin loads a remote video it throws an error `No source enabled to support url` Meaning that you would need to install the peertube plug-in for *every instance* within your network.
Thankfully peertube seamlessly handles links to remote videos when you replace it with your instance url.
## Outstanding issues
- I would prefer to pull the baseURL parameter properly, but I had trouble making that work and decided to just hardcode it.
- I have no idea how/if this will impact casting, but hope to test that soon.
- I need to properly sign the plugin
[Plugin Documentation](https://gitlab.futo.org/videostreaming/grayjay/-/blob/master/plugin-development.md)
gonna update later...