fix broken things
parent
a514241bee
commit
1bf13d9776
|
@ -386,7 +386,7 @@ export const logEventToChat = async (event) => {
|
|||
event.colour,
|
||||
document.createTextNode("left")
|
||||
);
|
||||
for(let kissed in kisses) delete kisses[kissed][user]
|
||||
for (let kissed in kisses) delete kisses[kissed][user];
|
||||
break;
|
||||
}
|
||||
case "ChatMessage": {
|
||||
|
@ -475,7 +475,7 @@ const beep = () => {
|
|||
|
||||
let viewers = [];
|
||||
|
||||
export const updateViewerList = (viewers) => {
|
||||
export const updateViewerList = (_viewers) => {
|
||||
viewers = _viewers;
|
||||
const listContainer = document.querySelector("#viewer-list");
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ export default class ReconnectingWebSocket {
|
|||
this._lastConnect = 0;
|
||||
this._socket = null;
|
||||
this._unsent = [];
|
||||
this._connect(true);
|
||||
}
|
||||
_connect(first) {
|
||||
if (this._socket)
|
||||
|
@ -26,9 +25,9 @@ export default class ReconnectingWebSocket {
|
|||
}
|
||||
this._socket.addEventListener("close", () => this._reconnect());
|
||||
this._socket.addEventListener("error", () => this._reconnect());
|
||||
this._socket.addEventListener("message", ({ data }) =>
|
||||
this._eventTarget.dispatchEvent(new MessageEvent("message", { data }))
|
||||
);
|
||||
this._socket.addEventListener("message", ({ data }) => {
|
||||
this._eventTarget.dispatchEvent(new MessageEvent("message", { data }));
|
||||
});
|
||||
this._socket.addEventListener("open", (e) => {
|
||||
if (first) this._eventTarget.dispatchEvent(new Event("open"));
|
||||
if (this._reconnecting)
|
||||
|
|
|
@ -71,7 +71,6 @@ const setupIncomingEvents = (video, socket) => {
|
|||
socket.addEventListener("message", async (messageEvent) => {
|
||||
try {
|
||||
const event = JSON.parse(messageEvent.data);
|
||||
|
||||
if (!event.reflected) {
|
||||
switch (event.op) {
|
||||
case "SetPlaying":
|
||||
|
|
Loading…
Reference in New Issue