change load location

change volume slider showing
share-pdf
Mustafa Yontar 5 years ago
parent 2313f40b46
commit ff33fef820
  1. 10
      src/lib/PdfShare.vue
  2. 8
      src/lib/RemoteFeed.vue
  3. 12
      src/lib/VueJanus.vue

@ -1,13 +1,11 @@
<template> <template>
<div> <div style="position: absolute;right: 0;bottom:0">
<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>
<v-btn @click="loadFile">load file</v-btn> <v-btn @click="loadFile">load file</v-btn>
<canvas id="mypdfview"></canvas> <canvas style="zoom:0.3" id="mypdfview"></canvas>
<v-btn @click="prevPage">Prev</v-btn> <v-btn @click="prevPage">Prev</v-btn>
<span v-if="pdf && !loading">{{pdf.numPages}}</span> <span v-if="pdf && !loading">{{pdf.numPages}}</span>
<v-btn @click="nextPage">Next</v-btn> <v-btn @click="nextPage">Next</v-btn>
<video class="rounded centered" id="pdfvid" width="100%" height="100%" autoplay
playsinline muted="muted"/>
</div> </div>
</template> </template>
@ -60,9 +58,9 @@ export default {
var renderTask = page.render(renderContext); var renderTask = page.render(renderContext);
renderTask.promise.then( () => { renderTask.promise.then( () => {
if (this.loading) { if (!this.pluginHandle) {
this.loading = false this.loading = false
document.getElementById('pdfvid').srcObject = document.getElementById('mypdfview').captureStream(60) // document.getElementById('pdfvid').srcObject = document.getElementById('mypdfview').captureStream(60)
this.janusInit.attach( this.janusInit.attach(
{ {

@ -1,14 +1,15 @@
<template> <template>
<div class="vid_main"> <div class="vid_main" @mouseleave="showaction = false" @mouseover="showaction = true"
>
<video ref="feed_video" width="100%" height="100%" autoplay playsinline/> <video ref="feed_video" width="100%" height="100%" autoplay playsinline/>
<div class="info">{{ bitrate }}</div> <div class="info">{{ bitrate }}</div>
<div class="infoSlow">Slow Connection</div> <div class="infoSlow">Slow Connection</div>
<div class="actions"> <div class="actions" v-show="showaction">
<v-slider <v-slider
v-model="volume" v-model="volume"
:min="0" :min="0"
:max="100" :max="100"
light dark
></v-slider> ></v-slider>
</div> </div>
</div> </div>
@ -30,6 +31,7 @@
bitrateTimer: null, bitrateTimer: null,
muted: false, muted: false,
bitrate: 0, bitrate: 0,
showaction: false,
volume: 100 volume: 100
}), }),
watch: { watch: {

@ -2,7 +2,8 @@
<v-container> <v-container>
<v-btn @click="deviceSelectDialog = true">change</v-btn> <v-btn @click="deviceSelectDialog = true">change</v-btn>
<v-btn @click="screenShare">share a screen</v-btn> <v-btn @click="screenShare">share a screen</v-btn>
<PdfShare :username="username" :opaque-id="opaqueId" :room="room" :janus-init="janusInit" ></PdfShare> <v-btn @click="sharePdf=true">share a pdf</v-btn>
<PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :janus-init="janusInit" ></PdfShare>
<v-dialog <v-dialog
v-model="mozillaAlert" v-model="mozillaAlert"
@ -122,6 +123,7 @@
selectedAudio: null, selectedAudio: null,
started: false, started: false,
mozillaAlert: false, mozillaAlert: false,
sharePdf: false,
janusScreenShareHandle: null, janusScreenShareHandle: null,
chromeAlert: false, chromeAlert: false,
videoDevices: [], videoDevices: [],
@ -141,6 +143,7 @@
error: function (error) { error: function (error) {
this.$janus.error(error); this.$janus.error(error);
}, },
webrtcState: this.webrtcState,
destroyed: function () { destroyed: function () {
window.location.reload(); window.location.reload();
} }
@ -148,6 +151,10 @@
}, },
methods: { methods: {
webrtcState (on) {
this.pluginHandle.send({"message": { "request": "configure", "bitrate": 512*1000 }});
console.log(on, "webrt")
},
janusPluginSuccessScreen (pluginHandle) { janusPluginSuccessScreen (pluginHandle) {
this.janusScreenShareHandle = pluginHandle this.janusScreenShareHandle = pluginHandle
this.$janus.log("Plugin attached! (" + this.pluginHandle.getPlugin() + ", id=" + this.pluginHandle.getId() + ")"); this.$janus.log("Plugin attached! (" + this.pluginHandle.getPlugin() + ", id=" + this.pluginHandle.getId() + ")");
@ -337,9 +344,6 @@
} }
}) })
}, },
webrtcState (on) {
this.$janus.log("Janus says our WebRTC PeerConnection is " + (on ? "up" : "down") + " now");
},
mediaState (medium, on) { mediaState (medium, on) {
this.$janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium); this.$janus.log("Janus " + (on ? "started" : "stopped") + " receiving our " + medium);
}, },

Loading…
Cancel
Save