// console.log("BareRTC!"); // WebRTC configuration. const configuration = { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }; const FileUploadMaxSize = 1024 * 1024 * 8; // 8 MB function setModalImage(url) { let $modalImg = document.querySelector("#modalImage"), $modal = document.querySelector("#photo-modal"); $modalImg.src = url; $modal.classList.add("is-active"); return false; } const app = Vue.createApp({ delimiters: ['[[', ']]'], data() { return { // busy: false, // TODO: not used disconnect: false, // don't try to reconnect (e.g. kicked) windowFocused: true, // browser tab is active windowFocusedAt: new Date(), // Disconnect spamming: don't retry too many times. disconnectLimit: 8, disconnectCount: 0, // Website configuration provided by chat.html template. config: { channels: PublicChannels, website: WebsiteURL, permitNSFW: PermitNSFW, sounds: { available: SoundEffects, settings: DefaultSounds, ready: false, audioContext: null, audioTracks: {}, } }, // User JWT settings if available. jwt: { token: UserJWTToken, valid: UserJWTValid, claims: UserJWTClaims }, channel: "lobby", username: "", //"test", autoLogin: false, // e.g. from JWT auth message: "", typingNotifDebounce: null, // WebSocket connection. ws: { conn: null, connected: false, }, // Who List for the room. whoList: [], whoMap: {}, // map username to wholist entry // My video feed. webcam: { busy: false, active: false, elem: null, //