fixed muted in projects

This commit is contained in:
liyunze 2025-06-06 23:08:24 +10:00
parent 5095a79758
commit bcceb6c99b
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts"> <script lang="ts">
import { onMount } from "svelte"; import { onMount } from "svelte";
// import Socials from "../elements/Socials.svelte"; import Socials from "../elements/Socials.svelte";
// Roles // Roles
let roles = $state(["Developer", "Streamer", "Content creator", "Student"]); let roles = $state(["Developer", "Streamer", "Content creator", "Student"]);
@ -159,7 +159,7 @@
<b>data science</b>. <b>data science</b>.
</p> </p>
<div class="mt-5 flex flex-row items-center justify-center"> <div class="mt-5 flex flex-row items-center justify-center">
<!-- <Socials /> --> <Socials />
</div> </div>
</div> </div>
</div> </div>

View file

@ -24,10 +24,13 @@
video.addEventListener("mouseenter", () => { video.addEventListener("mouseenter", () => {
if (userInteracted) { if (userInteracted) {
video.volume = 0.2; video.volume = 0.2;
} else { video.muted = false;
video.muted = true;
}
video.play(); video.play();
} else {
video.volume = 0;
video.muted = true;
video.play();
}
}); });
video.addEventListener("mouseleave", () => { video.addEventListener("mouseleave", () => {