mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-26 20:06:17 +02:00
replaced iframe with share screen
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
{% extends "public.html" %} {% block page %}<q-page>
|
||||
<iframe
|
||||
<div
|
||||
width="100%"
|
||||
height="100%"
|
||||
id="iframe_main"
|
||||
src="/"
|
||||
class="fixed-bottom-left"
|
||||
>
|
||||
</iframe>
|
||||
></div>
|
||||
<video
|
||||
autoplay="true"
|
||||
id="videoElement"
|
||||
@@ -247,12 +246,22 @@
|
||||
}
|
||||
if (res[1] == 'true') {
|
||||
document.getElementById('videoElement').style.width = '20%'
|
||||
async function startCapture(displayMediaOptions) {
|
||||
let captureStream = null
|
||||
|
||||
try {
|
||||
captureStream = await navigator.mediaDevices.getDisplayMedia(
|
||||
displayMediaOptions
|
||||
)
|
||||
} catch (err) {
|
||||
console.error('Error: ' + err)
|
||||
}
|
||||
document.getElementById('iframe_main').src = captureStream
|
||||
}
|
||||
}
|
||||
if (res[1] == 'false') {
|
||||
document.getElementById('videoElement').style.width = '100%'
|
||||
}
|
||||
if (res[1].substring(0, 3) == 'htt') {
|
||||
document.getElementById('iframe_main').src = res[1]
|
||||
document.getElementById('iframe_main').src = null
|
||||
}
|
||||
console.log(res[2])
|
||||
if (res[2] != 'none') {
|
||||
|
@@ -24,35 +24,12 @@
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<q-btn
|
||||
disable
|
||||
class="q-mt-sm q-ml-sm"
|
||||
color="primary"
|
||||
@click="fullscreenToggle"
|
||||
label="Webcam size"
|
||||
label="Screen share"
|
||||
>
|
||||
<q-tooltip> Coming soon </q-tooltip></q-btn
|
||||
>
|
||||
</div>
|
||||
<div class="col">
|
||||
<q-input
|
||||
disable
|
||||
class="q-pt-sm"
|
||||
dense
|
||||
outlined
|
||||
bottom-slots
|
||||
v-model="iframe"
|
||||
label="iframe url"
|
||||
><q-tooltip> Coming soon </q-tooltip>
|
||||
<template v-slot:after>
|
||||
<q-btn
|
||||
round
|
||||
dense
|
||||
flat
|
||||
@click="iframeChange(iframe)"
|
||||
icon="send"
|
||||
/>
|
||||
</template>
|
||||
</q-input>
|
||||
</q-btn>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row q-pa-sm">
|
||||
|
Reference in New Issue
Block a user