|
|
@ -15,6 +15,11 @@ |
|
|
|
<v-btn v-if="pdf && !loading" :disabled="pageNumber ==1" @click="prevPage" icon><v-icon>mdi-chevron-left</v-icon></v-btn> |
|
|
|
<v-btn v-if="pdf && !loading" :disabled="pageNumber ==1" @click="prevPage" icon><v-icon>mdi-chevron-left</v-icon></v-btn> |
|
|
|
<span v-if="pdf && !loading">{{pageNumber}} / {{pdf.numPages}}</span> |
|
|
|
<span v-if="pdf && !loading">{{pageNumber}} / {{pdf.numPages}}</span> |
|
|
|
<v-btn v-if="pdf && !loading" :disabled="pdf.numPages == pageNumber" @click="nextPage" icon><v-icon>mdi-chevron-right</v-icon></v-btn> |
|
|
|
<v-btn v-if="pdf && !loading" :disabled="pdf.numPages == pageNumber" @click="nextPage" icon><v-icon>mdi-chevron-right</v-icon></v-btn> |
|
|
|
|
|
|
|
<v-row> |
|
|
|
|
|
|
|
<v-col cols="12" md="12"> |
|
|
|
|
|
|
|
<v-btn v-if="pdf && !loading" @click="stop">stop pdf share</v-btn> |
|
|
|
|
|
|
|
</v-col> |
|
|
|
|
|
|
|
</v-row> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
@ -31,6 +36,7 @@ export default { |
|
|
|
name: "PdfShare", |
|
|
|
name: "PdfShare", |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
janusInit: Object, |
|
|
|
janusInit: Object, |
|
|
|
|
|
|
|
onstop: Function, |
|
|
|
username: String, |
|
|
|
username: String, |
|
|
|
myrivid: Number, |
|
|
|
myrivid: Number, |
|
|
|
room: Number, |
|
|
|
room: Number, |
|
|
@ -95,6 +101,21 @@ export default { |
|
|
|
pluginHandle.send({"message": register}); |
|
|
|
pluginHandle.send({"message": register}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
stop(){ |
|
|
|
|
|
|
|
var unpublish = { "request": "unpublish"}; |
|
|
|
|
|
|
|
this.pluginHandle.send({"message": unpublish}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.pluginHandle.detach(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// reset |
|
|
|
|
|
|
|
this.pluginHandle = null; |
|
|
|
|
|
|
|
this.pdf = null; |
|
|
|
|
|
|
|
this.pageNumber = 1; |
|
|
|
|
|
|
|
this.loading = true; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// callback |
|
|
|
|
|
|
|
this.onstop(); |
|
|
|
|
|
|
|
}, |
|
|
|
janusPluginError (error) { |
|
|
|
janusPluginError (error) { |
|
|
|
console.log('error', error) |
|
|
|
console.log('error', error) |
|
|
|
}, |
|
|
|
}, |
|
|
|