Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ SPDX-FileCopyrightText = "2024 Nextcloud GmbH and Nextcloud contributors"
SPDX-License-Identifier = "AGPL-3.0-or-later"

[[annotations]]
path = ["img/Nextcloud.mp4", "img/Nextcloud.webm", "img/Nextcloud.webp", "img/nextcloudLogo.svg"]
path = ["img/Nextcloud.mp4", "img/Nextcloud.webm", "img/Nextcloud.webp", "img/Nextcloud-preload.webp", "img/nextcloudLogo.svg"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2019 Nextcloud GmbH"
SPDX-License-Identifier = "LicenseRef-NextcloudTrademarks"
Expand Down
Binary file added img/Nextcloud-preload.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions js/firstrunwizard-about.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DTs7pwwW.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-PlfVmTTk-DeUS7lrD.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-EKlYWjzp.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as u}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";import{s as i}from"./index-EKlYWjzp.chunk.mjs";document.addEventListener("DOMContentLoaded",function(){const e=()=>document.querySelector("#firstrunwizard_about"),t=()=>{e().addEventListener("click",async function(o){o.stopPropagation(),o.preventDefault();const n=document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0,{open:r}=await u(async()=>{const{open:a}=await import("./main-DTs7pwwW.chunk.mjs");return{open:a}},__vite__mapDeps([0,1,2]),import.meta.url);r(n),OC.hideMenus(()=>!1)})};e()?t():i("core:user-menu:mounted",t)});
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-k0fVWr1s.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-PlfVmTTk-DeUS7lrD.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-EKlYWjzp.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as u}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";import{s as i}from"./index-EKlYWjzp.chunk.mjs";document.addEventListener("DOMContentLoaded",function(){const e=()=>document.querySelector("#firstrunwizard_about"),t=()=>{e().addEventListener("click",async function(o){o.stopPropagation(),o.preventDefault();const n=document.querySelector('[aria-controls="header-menu-user-menu"]')??void 0,{open:r}=await u(async()=>{const{open:a}=await import("./main-k0fVWr1s.chunk.mjs");return{open:a}},__vite__mapDeps([0,1,2]),import.meta.url);r(n),OC.hideMenus(()=>!1)})};e()?t():i("core:user-menu:mounted",t)});
//# sourceMappingURL=firstrunwizard-about.mjs.map
4 changes: 2 additions & 2 deletions js/firstrunwizard-activate.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-DTs7pwwW.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-PlfVmTTk-DeUS7lrD.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-EKlYWjzp.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as t}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";document.addEventListener("DOMContentLoaded",async function(){(await t(()=>import("./main-DTs7pwwW.chunk.mjs"),__vite__mapDeps([0,1,2]),import.meta.url)).open()});
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('firstrunwizard', '', 'js/main-k0fVWr1s.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/NcModal-PlfVmTTk-DeUS7lrD.chunk.mjs'),window.OC.filePath('firstrunwizard', '', 'js/index-EKlYWjzp.chunk.mjs')])))=>i.map(i=>d[i]);
import{_ as t}from"./modulepreload-polyfill-CBWYtosv.chunk.mjs";document.addEventListener("DOMContentLoaded",async function(){(await t(()=>import("./main-k0fVWr1s.chunk.mjs"),__vite__mapDeps([0,1,2]),import.meta.url)).open()});
//# sourceMappingURL=firstrunwizard-activate.mjs.map
13 changes: 0 additions & 13 deletions js/main-DTs7pwwW.chunk.mjs

This file was deleted.

13 changes: 13 additions & 0 deletions js/main-k0fVWr1s.chunk.mjs

Large diffs are not rendered by default.

File renamed without changes.

Large diffs are not rendered by default.

32 changes: 24 additions & 8 deletions src/components/pages/IntroAnimation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
playsinline
autoplay
muted
@ended="handleEnded">
:poster="videoPoster"
@ended="handleEnded"
@play="videoStarted = true">
<source :src="videoWebm" type="video/webm">
<source :src="videoMp4" type="video/mp4">
{{ videoFallbackText }}
Expand All @@ -22,25 +24,39 @@
<script setup lang="ts">
import { translate as t } from '@nextcloud/l10n'
import { imagePath } from '@nextcloud/router'
import { onMounted, useTemplateRef } from 'vue'
import { computed, onMounted, ref, useTemplateRef } from 'vue'

const emit = defineEmits<{
(e: 'next'): void
}>()

const videoMp4 = imagePath('firstrunwizard', 'Nextcloud.mp4')
const videoWebm = imagePath('firstrunwizard', 'Nextcloud.webm')
const videoFallbackImage = imagePath('firstrunwizard', 'Nextcloud.webp')
const videoFallbackImagePre = imagePath('firstrunwizard', 'Nextcloud-preload.webp') // first frame of the video
const videoFallbackImage = imagePath('firstrunwizard', 'Nextcloud.webp') // best visual fallback image of the video
const videoFallbackText = t('firstrunwizard', 'Welcome to {cloudName}!', { cloudName: window.OC.theme.name })

const videoElement = useTemplateRef('video')

const autoPlayDisabled = ref(false)
const videoStarted = ref(false)
const videoPoster = computed(() => (autoPlayDisabled.value || videoStarted.value) ? videoFallbackImage : videoFallbackImagePre)

onMounted(() => {
// check if the browser allows auto play - otherwise we need to skip this
if (navigator.getAutoplayPolicy && navigator.getAutoplayPolicy(videoElement.value) === 'disallowed') {
videoElement.value!.poster = videoFallbackImage
window.setTimeout(handleEnded, 2500)
}
autoPlayDisabled.value = 'getAutoplayPolicy' in navigator
// @ts-expect-error -- firefox experimental API
&& navigator.getAutoplayPolicy(videoElement.value) === 'disallowed'

window.setTimeout(() => {
if (!videoStarted.value || autoPlayDisabled) {
// skip to the end after showing the fallback image for a short time
window.setTimeout(handleEnded, 1700)
}
if (!videoStarted.value) {
// video has not started playing within 800ms - probably due to browser restrictions
videoStarted.value = true
}
}, 800)
})

/**
Expand Down
Loading