|
|
|
@ -43,10 +43,11 @@ export default { |
|
|
|
|
opaqueId:String |
|
|
|
|
}, |
|
|
|
|
data: () => ({ |
|
|
|
|
pdf:null, |
|
|
|
|
pageNumber:1, |
|
|
|
|
loading:true, |
|
|
|
|
pluginHandle: null |
|
|
|
|
pdf: null, |
|
|
|
|
pageNumber: 1, |
|
|
|
|
loading: true, |
|
|
|
|
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( () => { |
|
|
|
|
this.loading = false |
|
|
|
|
|
|
|
|
|
if (!this.pluginHandle) { |
|
|
|
|
this.loading = false |
|
|
|
|
// 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) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|