Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Meet/Room.vue
Show First 20 Lines • Show All 206 Lines • ▼ Show 20 Lines | export default { | ||||
requestId: this.requestId(), | requestId: this.requestId(), | ||||
role: this.camera || this.microphone ? 'PUBLISHER' : 'SUBSCRIBER' | role: this.camera || this.microphone ? 'PUBLISHER' : 'SUBSCRIBER' | ||||
} | } | ||||
$('#setup-password,#setup-nickname').removeClass('is-invalid') | $('#setup-password,#setup-nickname').removeClass('is-invalid') | ||||
axios.post('/api/v4/openvidu/rooms/' + this.room, this.post, { ignoreErrors: true }) | axios.post('/api/v4/openvidu/rooms/' + this.room, this.post, { ignoreErrors: true }) | ||||
.then(response => { | .then(response => { | ||||
// Response data contains: session, token and shareToken | |||||
this.roomState = 'ready' | this.roomState = 'ready' | ||||
this.session = response.data | this.session = response.data | ||||
if (init) { | if (init) { | ||||
this.joinSession() | this.joinSession() | ||||
} | } | ||||
}) | }) | ||||
.catch(error => { | .catch(error => { | ||||
if (!error.response) { | |||||
console.error(error) | |||||
return | |||||
} | |||||
const data = error.response.data || {} | const data = error.response.data || {} | ||||
if (data.code) { | if (data.code) { | ||||
this.roomState = data.code | this.roomState = data.code | ||||
} else { | } else { | ||||
this.roomState = error.response.status | this.roomState = error.response.status | ||||
} | } | ||||
▲ Show 20 Lines • Show All 294 Lines • Show Last 20 Lines |