Skip to content

Commit

Permalink
update to latest golang code
Browse files Browse the repository at this point in the history
  • Loading branch information
deleolajide committed Jun 23, 2024
1 parent f9127ba commit cd94863
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 11 deletions.
2 changes: 1 addition & 1 deletion changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1>
Broadcast Box Plugin Changelog
</h1>

<p><b>0.0.1</b> -- February 29, 2023</p>
<p><b>0.0.1</b> -- July 31, 2024</p>

<ul>
<li>Initial release. </li>
Expand Down
Binary file modified classes/linux-64/broadcast-box
Binary file not shown.
Binary file modified classes/win-64/broadcast-box.exe
Binary file not shown.
14 changes: 13 additions & 1 deletion src/java/org/ifsoft/broadcastbox/openfire/BroadcastBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.eclipse.jetty.apache.jsp.JettyJasperInitializer;
import org.eclipse.jetty.plus.annotation.ContainerInitializer;
import org.eclipse.jetty.server.handler.ContextHandlerCollection;
import org.eclipse.jetty.proxy.ProxyServlet;
import org.eclipse.jetty.servlets.*;
import org.eclipse.jetty.servlet.*;
import org.eclipse.jetty.webapp.WebAppContext;
Expand Down Expand Up @@ -80,6 +81,7 @@ public class BroadcastBox implements Plugin, PropertyEventListener, ProcessListe
private String broadcastboxRoot = null;
private ExecutorService executor;
private WebAppContext jspService;
private ServletContextHandler webContext;
private Cache muc_properties;
private WhipIQHandler whipIQHandler;
private WhepIQHandler whepIQHandler;
Expand All @@ -94,6 +96,7 @@ public void destroyPlugin() {
if (executor != null) executor.shutdown();
if (broadcastboxThread != null) broadcastboxThread.destory();
if (jspService != null) HttpBindManager.getInstance().removeJettyHandler(jspService);
if (webContext != null) HttpBindManager.getInstance().removeJettyHandler(webContext);
if (whipIQHandler != null) whipIQHandler.stopHandler();
if (whepIQHandler != null) whepIQHandler.stopHandler();

Expand Down Expand Up @@ -223,7 +226,16 @@ private void startGoProcesses(File pluginDirectory) {

Engine.environment.put("STUN_SERVERS", "stun1.l.google.com:19305|stun1.l.google.com:19302|stun4.l.google.com:19302|stun.frozenmountain.com:3478|stun.freeswitch.org:3478");

broadcastboxThread = Spawn.startProcess(broadcastboxExePath, new File(broadcastboxHomePath), this);
broadcastboxThread = Spawn.startProcess(broadcastboxExePath, new File(broadcastboxHomePath), this);

webContext = new ServletContextHandler(null, "/", ServletContextHandler.SESSIONS);
webContext.setClassLoader(this.getClass().getClassLoader());
ServletHolder proxyServlet = new ServletHolder(ProxyServlet.Transparent.class);
proxyServlet.setInitParameter("proxyTo", webUrl);
proxyServlet.setInitParameter("prefix", "/");
webContext.addServlet(proxyServlet, "/*");
HttpBindManager.getInstance().addJettyHandler(webContext);

Log.info("BroadcastBox enabled " + broadcastboxExePath);

} else {
Expand Down
2 changes: 1 addition & 1 deletion src/root/web/build/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Broadcast Box</title><meta name="description" content="Broadcast Box is a tool that allows you to efficiently stream high-quality video in real time, using the latest in video codecs and WebRTC technology."><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="./static/js/main.25a28648.js"></script><link href="./static/css/main.61116ba7.css" rel="stylesheet"></head><body class="bg-slate-900 text-gray-100"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Broadcast Box</title><meta name="description" content="Broadcast Box is a tool that allows you to efficiently stream high-quality video in real time, using the latest in video codecs and WebRTC technology."><meta name="viewport" content="width=device-width,initial-scale=1"><script defer="defer" src="/static/js/main.a9dcd3aa.js"></script><link href="/static/css/main.61116ba7.css" rel="stylesheet"></head><body class="bg-slate-900 text-gray-100"><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*/

/**
* @remix-run/router v1.16.0
* @remix-run/router v1.16.1
*
* Copyright (c) Remix Software Inc.
*
Expand All @@ -50,7 +50,7 @@
*/

/**
* React Router DOM v6.23.0
* React Router DOM v6.23.1
*
* Copyright (c) Remix Software Inc.
*
Expand All @@ -61,7 +61,7 @@
*/

/**
* React Router v6.23.0
* React Router v6.23.1
*
* Copyright (c) Remix Software Inc.
*
Expand Down

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/web/broadcast-box-summary.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
for (int s=0; s<connections.length(); s++) {
JSONObject connection = connections.getJSONObject(s);
String roomName = connection.getString("streamKey").substring(7);
String roomName = connection.getString("streamKey");
int subscribers = connection.getJSONArray("whepSessions").length();
String subscribe_url = service_url + "/" + roomName;
%>
Expand Down

0 comments on commit cd94863

Please sign in to comment.