fixed safari loading icon...again
This commit is contained in:
parent
bba8a8a641
commit
4c6d35f8d8
1 changed files with 20 additions and 4 deletions
|
@ -1,5 +1,3 @@
|
||||||
<script lang="ts" setup></script>
|
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<video
|
<video
|
||||||
alt="Loading"
|
alt="Loading"
|
||||||
|
@ -9,9 +7,27 @@
|
||||||
muted
|
muted
|
||||||
playsinline
|
playsinline
|
||||||
>
|
>
|
||||||
<source src="/assets/img/movie-loader.mov" type="video/quicktime" />
|
<source
|
||||||
<source src="/assets/img/movie-loader.webm" type="video/webm" />
|
v-if="supportsHEVC"
|
||||||
|
src="/assets/img/movie-loader.mov"
|
||||||
|
type="video/quicktime"
|
||||||
|
/>
|
||||||
|
<source v-else src="/assets/img/movie-loader.webm" type="video/webm" />
|
||||||
</video>
|
</video>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
const supportsHEVC = ref(false);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
|
||||||
|
|
||||||
|
// iOS devices also support HEVC
|
||||||
|
const isIOS =
|
||||||
|
/iPad|iPhone|iPod/.test(navigator.userAgent) && !(window as any).MSStream;
|
||||||
|
|
||||||
|
supportsHEVC.value = isSafari || isIOS;
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<style scoped></style>
|
<style scoped></style>
|
||||||
|
|
Loading…
Add table
Reference in a new issue