From 4dd4707736fafb9dbbfe3fe234a5e847f923e6df Mon Sep 17 00:00:00 2001
From: Marshall Quander <marshall@quander.me>
Date: Mon, 22 Jan 2018 14:02:36 -0800
Subject: [PATCH] Upgrade minijanus to 0.4

---
 package.json | 2 +-
 src/lobby.js | 6 +++---
 yarn.lock    | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/package.json b/package.json
index 391833c24..9c69de039 100644
--- a/package.json
+++ b/package.json
@@ -16,7 +16,7 @@
     "aframe-teleport-controls": "https://github.com/netpro2k/aframe-teleport-controls#feature/teleport-origin",
     "extract-text-webpack-plugin": "^3.0.2",
     "material-design-lite": "^1.3.0",
-    "minijanus": "^0.1.6",
+    "minijanus": "^0.4.0",
     "naf-janus-adapter": "^0.1.10",
     "networked-aframe": "https://github.com/netpro2k/networked-aframe#bugfix/chrome/audio",
     "nipplejs": "^0.6.7",
diff --git a/src/lobby.js b/src/lobby.js
index 9ae262ba4..f3de8b1fe 100644
--- a/src/lobby.js
+++ b/src/lobby.js
@@ -1,6 +1,6 @@
 import React from "react";
 import ReactDOM from "react-dom";
-import mj from "minijanus";
+import { JanusSession, JanusPluginHandle } from "minijanus";
 
 import "material-design-lite";
 import "material-design-lite/material.css";
@@ -22,7 +22,7 @@ class Lobby extends React.Component {
 
   componentDidMount() {
     this.ws = new WebSocket(window.CONFIG.janus_server_url, "janus-protocol");
-    this.session = new mj.JanusSession(this.ws.send.bind(this.ws));
+    this.session = new JanusSession(this.ws.send.bind(this.ws));
     this.ws.addEventListener("open", this.onWebsocketOpen);
     this.ws.addEventListener("message", this.onWebsocketMessage);
   }
@@ -37,7 +37,7 @@ class Lobby extends React.Component {
     this.session
       .create()
       .then(() => {
-        this.handle = new mj.JanusPluginHandle(this.session);
+        this.handle = new JanusPluginHandle(this.session);
         return this.handle.attach("janus.plugin.sfu").then(this.updateRooms);
       })
       .then(() => {
diff --git a/yarn.lock b/yarn.lock
index 8ad070c0c..98bed6882 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3690,6 +3690,10 @@ minijanus@^0.1.6:
   version "0.1.7"
   resolved "https://registry.yarnpkg.com/minijanus/-/minijanus-0.1.7.tgz#a4aba659e0fc46127450aa440b32de82c6cc46b9"
 
+minijanus@^0.4.0:
+  version "0.4.0"
+  resolved "https://registry.yarnpkg.com/minijanus/-/minijanus-0.4.0.tgz#4d08529da795886b1aab6714ee7c9ff122c8c802"
+
 minimalistic-assert@^1.0.0:
   version "1.0.0"
   resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3"
-- 
GitLab