Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Rooms.vue
<template> | <template> | ||||
<div class="container" dusk="rooms-component"> | <div class="container" dusk="rooms-component"> | ||||
<div id="meet-rooms" class="card"> | <div id="meet-rooms" class="card"> | ||||
<div class="card-body"> | <div class="card-body"> | ||||
<div class="card-title">Voice & Video Conferencing <small><sup class="badge badge-primary">beta</sup></small></div> | <div class="card-title">Voice & Video Conferencing <small><sup class="badge badge-primary">beta</sup></small></div> | ||||
<div class="card-text"> | <div class="card-text"> | ||||
<p> | <p> | ||||
Welcome to our beta program for Voice & Video Conferencing. | Welcome to our beta program for Voice & Video Conferencing. | ||||
</p> | </p> | ||||
<p> | <p> | ||||
You have a room of your own at the URL below. This room is only open when you yourself are in | You have a room of your own at the URL below. This room is only open when you yourself are in | ||||
attendance. Use this URL to invite people to join you. | attendance. Use this URL to invite people to join you. | ||||
</p> | </p> | ||||
<p> | <p> | ||||
<a v-if="href" :href="href">{{ href }}</a> | <router-link v-if="href" :to="roomRoute">{{ href }}</router-link> | ||||
</p> | </p> | ||||
<p> | <p> | ||||
This is a work in progress and more features will be added over time. Current features include: | This is a work in progress and more features will be added over time. Current features include: | ||||
</p> | </p> | ||||
<p> | <p> | ||||
<dl> | <dl> | ||||
<dt>Screen Sharing</dt> | <dt>Screen Sharing</dt> | ||||
<dd> | <dd> | ||||
Show All 31 Lines | <template> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
export default { | export default { | ||||
data() { | data() { | ||||
return { | return { | ||||
rooms: [], | rooms: [], | ||||
href: '' | href: '', | ||||
roomRoute: '' | |||||
} | } | ||||
}, | }, | ||||
mounted() { | mounted() { | ||||
if (!this.$root.hasBeta('meet')) { | if (!this.$root.hasBeta('meet')) { | ||||
this.$root.errorPage(403) | this.$root.errorPage(403) | ||||
return | return | ||||
} | } | ||||
this.$root.startLoading() | this.$root.startLoading() | ||||
axios.get('/api/v4/openvidu/rooms') | axios.get('/api/v4/openvidu/rooms') | ||||
.then(response => { | .then(response => { | ||||
this.$root.stopLoading() | this.$root.stopLoading() | ||||
this.rooms = response.data.list | this.rooms = response.data.list | ||||
if (response.data.count) { | if (response.data.count) { | ||||
this.href = window.config['app.url'] + '/meet/' + encodeURI(this.rooms[0].name) | this.roomRoute = '/meet/' + encodeURI(this.rooms[0].name) | ||||
this.href = window.config['app.url'] + this.roomRoute | |||||
} | } | ||||
}) | }) | ||||
.catch(this.$root.errorHandler) | .catch(this.$root.errorHandler) | ||||
} | } | ||||
} | } | ||||
</script> | </script> |