Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Meet/Room.vue
Show First 20 Lines • Show All 168 Lines • ▼ Show 20 Lines | <script> | ||||
// Register additional icons | // Register additional icons | ||||
import { library } from '@fortawesome/fontawesome-svg-core' | import { library } from '@fortawesome/fontawesome-svg-core' | ||||
import { | import { | ||||
faAlignLeft, | faAlignLeft, | ||||
faCog, | faCog, | ||||
faCompress, | faCompress, | ||||
faCrown, | |||||
faDesktop, | faDesktop, | ||||
faExpand, | faExpand, | ||||
faMicrophone, | faMicrophone, | ||||
faPowerOff, | faPowerOff, | ||||
faUser, | faUser, | ||||
faShieldAlt, | faShieldAlt, | ||||
faVideo, | faVideo, | ||||
faVolumeMute | faVolumeMute | ||||
} from '@fortawesome/free-solid-svg-icons' | } from '@fortawesome/free-solid-svg-icons' | ||||
// Register only these icons we need | // Register only these icons we need | ||||
library.add( | library.add( | ||||
faAlignLeft, | faAlignLeft, | ||||
faCog, | faCog, | ||||
faCompress, | faCompress, | ||||
faCrown, | |||||
faDesktop, | faDesktop, | ||||
faExpand, | faExpand, | ||||
faMicrophone, | faMicrophone, | ||||
faPowerOff, | faPowerOff, | ||||
faUser, | faUser, | ||||
faShieldAlt, | faShieldAlt, | ||||
faVideo, | faVideo, | ||||
faVolumeMute | faVolumeMute | ||||
) | ) | ||||
let roomRequest | let roomRequest | ||||
const authHeader = 'X-Meet-Auth-Token' | |||||
export default { | export default { | ||||
components: { | components: { | ||||
LogonForm, | LogonForm, | ||||
SessionSecurityOptions, | SessionSecurityOptions, | ||||
StatusMessage | StatusMessage | ||||
}, | }, | ||||
data() { | data() { | ||||
Show All 37 Lines | export default { | ||||
this.setupSession() | this.setupSession() | ||||
}, | }, | ||||
beforeDestroy() { | beforeDestroy() { | ||||
clearTimeout(roomRequest) | clearTimeout(roomRequest) | ||||
if (this.meet) { | if (this.meet) { | ||||
this.meet.leaveRoom() | this.meet.leaveRoom() | ||||
} | } | ||||
delete axios.defaults.headers.common[authHeader] | |||||
}, | }, | ||||
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 All 29 Lines | export default { | ||||
} | } | ||||
this.roomState = 'ready' | this.roomState = 'ready' | ||||
this.session = response.data | this.session = response.data | ||||
if (init) { | if (init) { | ||||
this.joinSession() | this.joinSession() | ||||
} | } | ||||
if (this.session.authToken) { | |||||
axios.defaults.headers.common[authHeader] = this.session.authToken | |||||
} | |||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
if (!error.response) { | if (!error.response) { | ||||
console.error(error) | console.error(error) | ||||
return | return | ||||
} | } | ||||
const data = error.response.data || {} | const data = error.response.data || {} | ||||
▲ Show 20 Lines • Show All 359 Lines • Show Last 20 Lines |