mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-17 06:30:50 +01:00
try to make audio play
This commit is contained in:
@ -1,33 +1,46 @@
|
||||
<template>
|
||||
<div class="w-full h-full overflow-scroll bg-red-300">
|
||||
<div>
|
||||
<div class="w-full h-full overflow-scroll">
|
||||
<!-- <div>
|
||||
{{ iframeSrc }}
|
||||
</div>
|
||||
</div> -->
|
||||
<iframe
|
||||
v-if="iframeSrc"
|
||||
class="w-full h-full"
|
||||
@load=""
|
||||
ref="iFrameRef"
|
||||
:src="iframeSrc"
|
||||
:src="iframeIndex"
|
||||
sandbox="allow-scripts allow-same-origin"
|
||||
allow="autoplay; speaker-selection; encrypted-media;"
|
||||
>
|
||||
</iframe>
|
||||
<!-- <p v-else>{{ t("loading") }}</p> -->
|
||||
<audio controls :src="audioTest">
|
||||
Dein Browser unterstützt das Audio-Element nicht.
|
||||
</audio>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
name: "haexExtension",
|
||||
});
|
||||
name: 'haexExtension',
|
||||
})
|
||||
|
||||
const { t } = useI18n();
|
||||
const iframeRef = useTemplateRef("iFrameRef");
|
||||
const { t } = useI18n()
|
||||
const iframeRef = useTemplateRef('iFrameRef')
|
||||
const { extensionEntry: iframeSrc, currentExtension } = storeToRefs(
|
||||
useExtensionsStore()
|
||||
)
|
||||
const audioTest = computed(() => `${iframeSrc.value}/sounds/music/demo.mp3`)
|
||||
watch(audioTest, () => console.log('audioTest', audioTest.value), {
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
const { extensionEntry: iframeSrc, currentExtension } = storeToRefs(useExtensionsStore());
|
||||
const extensionStore = useExtensionsStore();
|
||||
const iframeIndex = computed(() => `${iframeSrc.value}/index.html`)
|
||||
const extensionStore = useExtensionsStore()
|
||||
|
||||
watch(iframeSrc, () => console.log("iframeSrc", iframeSrc.value), { immediate: true });
|
||||
watch(iframeSrc, () => console.log('iframeSrc', iframeSrc.value), {
|
||||
immediate: true,
|
||||
})
|
||||
|
||||
onMounted(async () => {
|
||||
/* const minfest = await extensionStore.readManifestFileAsync(
|
||||
@ -35,7 +48,7 @@ onMounted(async () => {
|
||||
currentExtension.value!.version
|
||||
);
|
||||
console.log("manifest", minfest, extensionStore.extensionEntry); */
|
||||
});
|
||||
})
|
||||
</script>
|
||||
|
||||
<i18n lang="yaml">
|
||||
|
||||
Reference in New Issue
Block a user