Docker support #2, Fixes #4, dynamic imports

This commit is contained in:
Shiny Nematoda 2022-07-29 19:21:59 +00:00
parent 2838030839
commit 7273fcabc8
No known key found for this signature in database
GPG key ID: 6506D50F5613A42D
10 changed files with 696 additions and 246 deletions

View file

@ -68,8 +68,11 @@ const Play = key => {
watch(
() => show.sync,
() => {
import('https://unpkg.com/peerjs@1.3.2/dist/peerjs.min.js');
async () => {
const { Peer } = await import('peerjs');
window.Peer = Peer;
if (show.sync === true) {
sync.peer = new Peer('hyp-' + Math.random().toString(36).substr(2));
@ -173,8 +176,7 @@ onMounted(List);
</div>
<div v-else-if="sync.type == 'rec'">
<pre>ID:</pre>
<pre>{{ sync.id }}</pre>
<pre>ID: {{ sync.id }}</pre>
</div>
</template>