<template>
  <v-app>
    <v-content>
      <v-text-field  v-if="!start" v-model="username" label="please enter name"></v-text-field> <v-btn v-if="!start" @click="startM">Start</v-btn>
      <VueJanus v-if="start" server="https://vid.w3ic.org/janus" :room="room" :username="username"/>
    </v-content>
  </v-app>
</template>

<script>
import VueJanus from "@/lib/VueJanus";

export default {
  name: 'App',

  components: {
    VueJanus
  },

  data: () => ({
    test: ' ',
    room:1234,
    username: '',
    start:false
  }),
  mounted () {
  },
  methods: {
    startM () {
      if (this.username) {
        this.start = true
      }
    }
  }
};
</script>
