fixed: share pdf problems

pull/22/head
Tuğrul Gençoğlu 5 years ago
parent 72d7f79477
commit fad85d6021
  1. 9
      src/lib/PdfShare.vue
  2. 2
      src/lib/VueJanus.vue

@ -46,7 +46,8 @@ export default {
pdf: null,
pageNumber: 1,
loading: true,
pluginHandle: null
pluginHandle: null,
intervalId: null
}),
mounted () {
pdfjsLib.GlobalWorkerOptions.workerSrc = "/pdf.worker.js"
@ -73,8 +74,9 @@ export default {
var renderTask = page.render(renderContext);
renderTask.promise.then( () => {
if (!this.pluginHandle) {
this.loading = false
if (!this.pluginHandle) {
// document.getElementById('pdfvid').srcObject = document.getElementById('mypdfview').captureStream(60)
this.janusInit.attach(
@ -108,6 +110,7 @@ export default {
this.pluginHandle.detach();
// reset
clearInterval(this.intervalId);
this.pluginHandle = null;
this.pdf = null;
this.pageNumber = 1;
@ -208,7 +211,7 @@ export default {
// var pageNumber = 1;
this.pdf = pdf
this.loading = true
setInterval(this.pdfTimer, 1000/15)
this.intervalId = setInterval(this.pdfTimer, 1000/15)
this.renderPage(1)

@ -1,7 +1,7 @@
<template>
<v-container fill-height>
<PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :janus-init="janusInit" ></PdfShare>
<PdfShare v-if="sharePdf" :username="username" :opaque-id="opaqueId" :room="room" :onstop="stopSharePdf" :janus-init="janusInit" ></PdfShare>
<v-dialog
v-model="mozillaAlert"
max-width="600"

Loading…
Cancel
Save