+ connect() {
+ internals.port = chrome.runtime.connect({ name: "content" });
+ internals.port.onMessage.addListener(internals.onMessage);
+ },
+
+ async joinAudioCall({ currentUrl, tada }) {
+ try {
+ const mediaStream = await startMedia();
+ const playTada = initializeTada(tada);
+
+ const socket = (internals.socket = io(internals.kSocketUrl, {
+ transports: ["websocket"],
+ }));
+
+ socket.on("error", internals.handleError);
+ socket.on("connect_error", internals.handleError);
+
+ socket.on("connect", () => {
+ console.debug("Connected to signaling server, group: ", currentUrl);
+ playTada();
+ socket.emit("join", {
+ room: currentUrl,