WIP, learning Vue

master
Özcan Oğuz 4 years ago
parent 47ebbeddc6
commit 6373ac00b6
  1. 16
      package-lock.json
  2. 6
      package.json
  3. 2
      public/index.html
  4. 71
      src/App.vue
  5. 12
      src/lib/PdfShare.vue
  6. 11
      src/lib/VueJanus.vue
  7. 1
      src/main.js

16
package-lock.json generated

@ -2355,6 +2355,11 @@
"integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=",
"dev": true "dev": true
}, },
"bootstrap": {
"version": "4.5.1",
"resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-4.5.1.tgz",
"integrity": "sha512-bxUooHBSbvefnIZfjD0LE8nfdPKrtiFy2sgrxQwUZ0UpFzpjVbVMUxaGIoo9XWT4B2LG1HX6UQg0UMOakT0prQ=="
},
"brace-expansion": { "brace-expansion": {
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
@ -6899,9 +6904,9 @@
} }
}, },
"jquery": { "jquery": {
"version": "3.4.1", "version": "3.5.1",
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz",
"integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==" "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg=="
}, },
"js-message": { "js-message": {
"version": "1.0.5", "version": "1.0.5",
@ -8390,6 +8395,11 @@
"ts-pnp": "^1.1.6" "ts-pnp": "^1.1.6"
} }
}, },
"popper.js": {
"version": "1.16.1",
"resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz",
"integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ=="
},
"portfinder": { "portfinder": {
"version": "1.0.25", "version": "1.0.25",
"resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz", "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.25.tgz",

@ -1,5 +1,5 @@
{ {
"name": "oydconf", "name": "albatross",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
@ -8,9 +8,11 @@
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
}, },
"dependencies": { "dependencies": {
"bootstrap": "^4.5.1",
"core-js": "^3.6.4", "core-js": "^3.6.4",
"jquery": "^3.4.1", "jquery": "^3.5.1",
"pdfjs-dist": "^2.3.200", "pdfjs-dist": "^2.3.200",
"popper.js": "^1.16.1",
"vue": "^2.6.11", "vue": "^2.6.11",
"vuetify": "^2.2.11", "vuetify": "^2.2.11",
"webrtc-adapter": "^7.5.1" "webrtc-adapter": "^7.5.1"

@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title>Albatross</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css">
</head> </head>

@ -1,12 +1,73 @@
<template> <template>
<v-app fill-height dark> <v-app>
<v-content fill-height > <v-app-bar
<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> app
<VueJanus v-if="start" server="https://vid.w3ic.org/janus" :room="room" :username="username"/> color="#ab0000"
</v-content> dark
>
<v-toolbar-title>Albatross</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn icon>
<v-icon>mdi-help</v-icon>
</v-btn>
</v-app-bar>
<v-container
class="fill-height"
fluid
>
<v-row
align="center"
justify="center"
v-if="!start"
>
<v-col
cols="12"
sm="8"
md="4"
>
<v-card class="elevation-12" >
<v-toolbar
color="#ab0000"
dark
flat
>
<v-toolbar-title>Login</v-toolbar-title>
<v-spacer></v-spacer>
<v-tooltip bottom>
<span>Source</span>
</v-tooltip>
</v-toolbar>
<v-card-text>
<v-form>
<v-text-field v-if="!start" v-model="username" label="Please enter your name"></v-text-field>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="#ab0000" v-if="!start" @click="startM">Start</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
<VueJanus v-if="start" server="https://vid.w3ic.org/janus" :room="room" :username="username"/>
</v-container>
<v-footer
color="#ffffff"
app
>
<v-col
class="text-center"
cols="12"
>
<strong>Özgür Yazılım Derneği</strong>
</v-col>
</v-footer>
</v-app> </v-app>
</template> </template>
<script> <script>
import VueJanus from "@/lib/VueJanus"; import VueJanus from "@/lib/VueJanus";

@ -1,6 +1,6 @@
<template> <template>
<div style="position: absolute;right: 0;bottom:0;width: 400px;border:1px solid #ccc"> <v-card class="d-inline-block mx-auto d-flex flex-row-reverse" v-if="show">
<v-container>
<v-row> <v-row>
<v-col cols="12" md="10"> <v-col cols="12" md="10">
<v-file-input ref="file" id="myfile" accept="pdf" label="Please select a file"></v-file-input> <v-file-input ref="file" id="myfile" accept="pdf" label="Please select a file"></v-file-input>
@ -20,7 +20,8 @@
<v-btn v-if="pdf && !loading" @click="stop">stop pdf share</v-btn> <v-btn v-if="pdf && !loading" @click="stop">stop pdf share</v-btn>
</v-col> </v-col>
</v-row> </v-row>
</div> </v-container>
</v-card>
</template> </template>
<script> <script>
@ -43,6 +44,7 @@ export default {
opaqueId:String opaqueId:String
}, },
data: () => ({ data: () => ({
show: true,
pdf: null, pdf: null,
pageNumber: 1, pageNumber: 1,
loading: true, loading: true,
@ -104,6 +106,7 @@ export default {
}, },
stop(){ stop(){
this.onstop();
var unpublish = { "request": "unpublish"}; var unpublish = { "request": "unpublish"};
this.pluginHandle.send({"message": unpublish}); this.pluginHandle.send({"message": unpublish});
@ -116,8 +119,9 @@ export default {
this.pageNumber = 1; this.pageNumber = 1;
this.loading = true; this.loading = true;
// callback // callback
this.onstop();
}, },
janusPluginError (error) { janusPluginError (error) {
console.log('error', error) console.log('error', error)

@ -1,5 +1,4 @@
<template> <template>
<v-container fill-height> <v-container fill-height>
<PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :onstop="stopSharePdf" :janus-init="janusInit" ></PdfShare> <PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :onstop="stopSharePdf" :janus-init="janusInit" ></PdfShare>
<v-dialog <v-dialog
@ -73,7 +72,7 @@
text text
@click="deviceSelectDialog = false" @click="deviceSelectDialog = false"
> >
Disagree Cancel
</v-btn> </v-btn>
<v-btn <v-btn
@ -81,7 +80,7 @@
text text
@click="selectDevice" @click="selectDevice"
> >
Agree OK
</v-btn> </v-btn>
</v-card-actions> </v-card-actions>
</v-card> </v-card>
@ -130,7 +129,7 @@
@click="sharePdf=true" @click="sharePdf=true"
> >
<v-icon>mdi-pdf-box</v-icon> <v-icon>mdi-pdf-box</v-icon>
</v-btn> </v-btn>
</template> </template>
<span>Toggle Share PDF</span> <span>Toggle Share PDF</span>
@ -151,7 +150,7 @@
<span>Toggle Theme</span> <span>Toggle Theme</span>
</v-tooltip> </v-tooltip>
<v-tooltip right> <v-tooltip right>
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn
@ -168,7 +167,7 @@
<span>Toggle Camera</span> <span>Toggle Camera</span>
</v-tooltip> </v-tooltip>
<v-tooltip right> <v-tooltip right>
<template v-slot:activator="{ on }"> <template v-slot:activator="{ on }">
<v-btn <v-btn

@ -4,7 +4,6 @@ import JanusPlugin from "@/plugins/janus"
import App from './App.vue' import App from './App.vue'
import vuetify from './plugins/vuetify'; import vuetify from './plugins/vuetify';
Vue.config.productionTip = false Vue.config.productionTip = false
console.log("janus is installed", Vue.$janus) console.log("janus is installed", Vue.$janus)
new Vue({ new Vue({

Loading…
Cancel
Save