({})}
onswipe={onSwipe}
>
{// vidstack is missing some types for svelte5 event syntax: onauto-play-fail
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
/* @ts-ignore */ undefined}
{
onControlsChange?.({ controlsVisible: e.detail as boolean });
}}
muted={forceMuted || $videoViewerMuted}
onauto-play-fail={async (e: MediaAutoPlayFailEvent) => {
if (e.detail.error.name === 'NotAllowedError') {
forceMuted = true;
try {
await tick();
await player?.play();
} catch (error) {
handleError(error, $t('errors.unable_to_play_video'));
}
}
}}
onvolume-change={(e: MediaVolumeChangeEvent) => {
if (forceMuted && !e.detail.muted && e.detail.volume > 0) {
forceMuted = false;
}
if (!forceMuted) {
$videoViewerVolume = e.detail.volume;
$videoViewerMuted = e.detail.muted;
}
}}
onended={onVideoEnded}
onstarted={() => {
if (!forceMuted) {
player!.volume = $videoViewerVolume;
player!.muted = $videoViewerMuted;
}
onVideoStarted();
}}
>
{#if isFaceEditMode.value}
{/if}