Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Meet/Room.vue
Show First 20 Lines • Show All 284 Lines • ▼ Show 20 Lines | export default { | ||||
beforeDestroy() { | beforeDestroy() { | ||||
clearTimeout(roomRequest) | clearTimeout(roomRequest) | ||||
if (this.meet) { | if (this.meet) { | ||||
this.meet.leaveRoom() | this.meet.leaveRoom() | ||||
} | } | ||||
delete axios.defaults.headers.common[authHeader] | delete axios.defaults.headers.common[authHeader] | ||||
$(document.body).off('keydown.meet') | |||||
}, | }, | ||||
methods: { | methods: { | ||||
authSuccess() { | authSuccess() { | ||||
// The user authentication succeeded, we still don't know it's really the room owner | // The user authentication succeeded, we still don't know it's really the room owner | ||||
this.initSession() | this.initSession() | ||||
$('#meet-setup').removeClass('hidden') | $('#meet-setup').removeClass('hidden') | ||||
$('#meet-auth').addClass('hidden') | $('#meet-auth').addClass('hidden') | ||||
▲ Show 20 Lines • Show All 217 Lines • ▼ Show 20 Lines | export default { | ||||
} | } | ||||
this.session.onDismiss = connId => { this.dismissParticipant(connId) } | this.session.onDismiss = connId => { this.dismissParticipant(connId) } | ||||
this.session.onSessionDataUpdate = data => { this.updateSession(data) } | this.session.onSessionDataUpdate = data => { this.updateSession(data) } | ||||
this.session.onConnectionChange = (connId, data) => { this.updateParticipant(connId, data) } | this.session.onConnectionChange = (connId, data) => { this.updateParticipant(connId, data) } | ||||
this.session.onJoinRequest = data => { this.joinRequest(data) } | this.session.onJoinRequest = data => { this.joinRequest(data) } | ||||
this.session.onMediaSetup = () => { this.setupMedia() } | this.session.onMediaSetup = () => { this.setupMedia() } | ||||
this.meet.joinRoom(this.session) | this.meet.joinRoom(this.session) | ||||
this.keyboardShortcuts() | |||||
}, | |||||
keyboardShortcuts() { | |||||
$(document.body).on('keydown.meet', e => { | |||||
if ($(e.target).is('select,input,textarea')) { | |||||
return | |||||
} | |||||
// Self-Mute with 'm' key | |||||
if (e.key == 'm' || e.key == 'M') { | |||||
if ($('#meet-session-menu').find('.link-audio:not(:disabled)').length) { | |||||
this.switchSound() | |||||
} | |||||
} | |||||
}) | |||||
}, | }, | ||||
logout() { | logout() { | ||||
const logout = () => { | const logout = () => { | ||||
this.meet.leaveRoom() | this.meet.leaveRoom() | ||||
this.meet = null | this.meet = null | ||||
this.$router.push({ name: 'dashboard' }) | this.$router.push({ name: 'dashboard' }) | ||||
} | } | ||||
▲ Show 20 Lines • Show All 200 Lines • Show Last 20 Lines |