<template>
<VueJanus v-if="rid" :room="rid" server="https://vid.w3ic.org/janus" :username="$store.state.name"></VueJanus>
</template>

<script>
    import VueJanus from "@/lib/VueJanus";
    export default {
        name: "RoomView",
        components: {VueJanus},
        data: () => ({
           rid:''
        }),
        mounted () {
            this.getRoom()
        },
        methods: {
            getRoom () {
                this.$axios.get(`room/${this.$route.params.id}`).then(response => {
                    this.rid = response.data.rid
                })
            }
        }
    }
</script>

<style scoped>

</style>
