Skip to content

Commit

Permalink
Deprecate module
Browse files Browse the repository at this point in the history
So long, and thanks for all the fish.
  • Loading branch information
bekriebel committed Apr 20, 2022
1 parent cb4989e commit 6140951
Show file tree
Hide file tree
Showing 6 changed files with 109 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Jitsi WebRTC client

> | :exclamation::warning::exclamation: [This module is now deprecated and no longer maintained](https://github.com/luvolondon/fvtt-module-jitsiwebrtc/issues/99) :exclamation::warning::exclamation: |
> | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Replacement for the EasyRTC p2p client to use a Jitsi relay server for A/V. It has the main advantage of being able to run all communication via a relay server. A player only needs to send her/his A/V stream to a single receiver, where it is distributed to all other players. If you have more then 2 players, this is a bandwidth improvement. This feature is called SFU (Selective Forwarding Unit). Read more about Jitsi on https://jitsi.org/.

First tests with 4-5 players resulted in ~700kbit/s upload and ~ 1Mbit/s download rate for each player.
Expand All @@ -15,7 +18,7 @@ First tests with 4-5 players resulted in ~700kbit/s upload and ~ 1Mbit/s downloa
>
> However, I highly suggest instead switching to the newer [LiveKit AVClient](https://foundryvtt.com/packages/avclient-livekit) module. I have found LiveKit to be a much more stable A/V platform to work with and the server much easier to run. There are currently no free public LiveKit servers. There are links on the module page to guides on running your own server, and I (bekit) also provide a highly available cluster of LiveKit servers with nodes in multiple parts of the world. To cover my expenses, this cluster is only available to subscribers of [my Patreon](https://www.patreon.com/bePatron?u=5662939).
>
> Due to ongoing issues both developing and using the Jitsi module, I will no longer be actively developing it. I will continue to make minor adjustments and bug fixes, but this module may soon enter a deprecated state unless another developer would like to take over work on it.
> Due to ongoing issues both developing and using the Jitsi module, I will no longer be actively developing or maintaining it.
## Installation

Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "jitsirtc",
"title": "Jitsi WebRTC client",
"description": "Use Jitsi to handle A/V. Connect to jitsi.org or self-hosted server.",
"title": "Jitsi WebRTC client (deprecated)",
"description": "Use Jitsi to handle A/V. Connect to jitsi.org or self-hosted server. Warning: no longer maintained!",
"author": "bekit, Luvolondon",
"authors": [
{
Expand Down
30 changes: 30 additions & 0 deletions src/JitsiAVDeprecation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { MODULE_NAME } from "./utils/constants.js";

export default class JitsiAVDeprecation extends Application {
/** @override */
static get defaultOptions() {
const module = game.modules.get(MODULE_NAME);
return mergeObject(super.defaultOptions, {
template: "modules/jitsirtc/templates/deprecation.html",
resizable: true,
width: 640,
// height: 500,
classes: ["jitsiAVDeprecation"],
title: module.data.title,
});
}

activateListeners(html) {
super.activateListeners(html);

const module = game.modules.get(MODULE_NAME);

html.find(".show-again").on("change", (ev) => {
game.settings.set(
MODULE_NAME,
"hideDeprecationWarning",
ev.currentTarget.checked ? module.data.version : ""
);
});
}
}
12 changes: 12 additions & 0 deletions src/utils/hooks.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { MODULE_NAME } from "./constants.js";
import JitsiAVConfig from "../JitsiAVConfig.js";
import registerModuleSettings from "./registerModuleSettings.js";
import JitsiAVDeprecation from "../JitsiAVDeprecation.js";

/* -------------------------------------------- */
/* Hook calls */
Expand Down Expand Up @@ -34,6 +35,17 @@ Hooks.on("ready", () => {
type: JitsiAVConfig,
restricted: false,
});

// Show deprecation warning to GM if it isn't hidden
const module = game.modules.get(MODULE_NAME);
if (
game.user.isGM &&
game.settings.get(MODULE_NAME, "hideDeprecationWarning") !==
module.data.version
) {
const deprecationWarning = new JitsiAVDeprecation();
deprecationWarning.render(true);
}
});

Hooks.on("renderCameraViews", (cameraViews, cameraViewsElement) => {
Expand Down
10 changes: 10 additions & 0 deletions src/utils/registerModuleSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ export default function registerModuleSettings() {
onChange: (value) => log.setDebug(value),
});

// Register hide deprecation warning
helpers.registerModuleSetting({
name: "hideDeprecationWarning",
scope: "client",
config: false,
default: "",
type: String,
onChange: () => {},
});

// Set the initial debug level
log.setDebug(game.settings.get(MODULE_NAME, "debug"));
}
51 changes: 51 additions & 0 deletions templates/deprecation.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<style>
.jitsiAVDeprecation .window-content > * {
flex: 0;
}
</style>
<h1><b>Jitsi WebRTC client</b> is deprecated</h1>
<h2>Deprecation warning</h2>
<p>
Due to ongoing complications combined with a change from Jitsi that
<a href="https://github.com/luvolondon/fvtt-module-jitsiwebrtc/issues/98"
>removes access to their public server</a
>, this module is now deprecated and no longer maintained.
</p>
<h2>More information</h2>
<p>
For more details, please see the github issue:
<a href="https://github.com/luvolondon/fvtt-module-jitsiwebrtc/issues/99"
>Module is deprecated and unmaintained</a
>.
</p>
<p>
If you are interested in taking over maintenance of the project, please
contact <b><i>bekit#4213</i></b> on Discord.
</p>
<h2>Need a replacement?</h2>
<p>
The
<a href="https://foundryvtt.com/packages/avclient-livekit"
>LiveKit AVClient</a
>
module is available as a more modern alternative A/V Client.
</p>
<h2>Acknowledgements</h2>
<p>
Thank you to all the contributors and users of the project. Special thanks to
<b><i>luvolondon</i></b> for the initial development efforts!
</p>
<h1></h1>
<p
style="
display: flex;
flex-flow: row nowrap;
align-items: center;
justify-content: flex-start;
"
>
<input type="checkbox" class="show-again" id="welcome-screen-show-again" />
<label for="welcome-screen-show-again"
>Don't show this screen again until next update.</label
>
</p>

0 comments on commit 6140951

Please sign in to comment.