|
|
@ -43,10 +43,11 @@ export default { |
|
|
|
opaqueId:String |
|
|
|
opaqueId:String |
|
|
|
}, |
|
|
|
}, |
|
|
|
data: () => ({ |
|
|
|
data: () => ({ |
|
|
|
pdf:null, |
|
|
|
pdf: null, |
|
|
|
pageNumber:1, |
|
|
|
pageNumber: 1, |
|
|
|
loading:true, |
|
|
|
loading: true, |
|
|
|
pluginHandle: null |
|
|
|
pluginHandle: null, |
|
|
|
|
|
|
|
intervalId: null |
|
|
|
}), |
|
|
|
}), |
|
|
|
mounted () { |
|
|
|
mounted () { |
|
|
|
pdfjsLib.GlobalWorkerOptions.workerSrc = "/pdf.worker.js" |
|
|
|
pdfjsLib.GlobalWorkerOptions.workerSrc = "/pdf.worker.js" |
|
|
@ -73,8 +74,9 @@ export default { |
|
|
|
|
|
|
|
|
|
|
|
var renderTask = page.render(renderContext); |
|
|
|
var renderTask = page.render(renderContext); |
|
|
|
renderTask.promise.then( () => { |
|
|
|
renderTask.promise.then( () => { |
|
|
|
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
|
|
|
|
if (!this.pluginHandle) { |
|
|
|
if (!this.pluginHandle) { |
|
|
|
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( |
|
|
@ -108,6 +110,7 @@ export default { |
|
|
|
this.pluginHandle.detach(); |
|
|
|
this.pluginHandle.detach(); |
|
|
|
|
|
|
|
|
|
|
|
// reset |
|
|
|
// reset |
|
|
|
|
|
|
|
clearInterval(this.intervalId); |
|
|
|
this.pluginHandle = null; |
|
|
|
this.pluginHandle = null; |
|
|
|
this.pdf = null; |
|
|
|
this.pdf = null; |
|
|
|
this.pageNumber = 1; |
|
|
|
this.pageNumber = 1; |
|
|
@ -208,7 +211,7 @@ export default { |
|
|
|
// var pageNumber = 1; |
|
|
|
// var pageNumber = 1; |
|
|
|
this.pdf = pdf |
|
|
|
this.pdf = pdf |
|
|
|
this.loading = true |
|
|
|
this.loading = true |
|
|
|
setInterval(this.pdfTimer, 1000/15) |
|
|
|
this.intervalId = setInterval(this.pdfTimer, 1000/15) |
|
|
|
this.renderPage(1) |
|
|
|
this.renderPage(1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|