Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Post-Christmas update
Browse files Browse the repository at this point in the history
  • Loading branch information
koyuawsmbrtn committed Dec 24, 2023
1 parent d0ae30a commit 144e322
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/audioplayer.astro
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<svg viewBox="0 0 24 24" id="muteoff" color="white" style="position: absolute; top: 0; right: 0; margin: 1em; cursor: pointer;" onclick="document.getElementById('audio').muted = !document.getElementById('audio').muted;" width="2em" height="2em" astro-icon="mdi:volume-medium" data-astro-source-file="D:/code/web/node_modules/astro-icon/lib/Icon.astro" data-astro-source-loc="28:2"><path fill="currentColor" d="M5 9v6h4l5 5V4L9 9m9.5 3c0-1.77-1-3.29-2.5-4.03V16c1.5-.71 2.5-2.24 2.5-4z"></path></svg>
<svg viewBox="0 0 24 24" id="muteon" color="white" style="position: absolute; top: 0; right: 0; margin: 1em; cursor: pointer;" onclick="document.getElementById('audio').muted = !document.getElementById('audio').muted;" width="2em" height="2em" astro-icon="mdi:volume-off" data-astro-source-file="D:/code/web/node_modules/astro-icon/lib/Icon.astro" data-astro-source-loc="28:2"><path fill="currentColor" d="M12 4 9.91 6.09 12 8.18M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.26c-.67.51-1.42.93-2.25 1.17v2.07c1.38-.32 2.63-.95 3.68-1.81L19.73 21 21 19.73l-9-9M19 12c0 .94-.2 1.82-.54 2.64l1.51 1.51A8.916 8.916 0 0 0 21 12c0-4.28-3-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71m-2.5 0c0-1.77-1-3.29-2.5-4.03v2.21l2.45 2.45c.05-.2.05-.42.05-.63z"></path></svg>

<audio src="https://yt.koyu.space/latest_version?id=z6LmMCuGjfA&itag=140&local=true" id="audio" autoplay loop transition:persist></audio>
<audio src="https://yt.koyu.space/latest_version?id=XjhzXzaikpU&itag=140&local=true" id="audio" autoplay loop transition:persist></audio>
<script>
let mute = document.getElementById("mute");
console.log(mute);
let audio = document.getElementById("audio");
audio.volume = 0.25;
let didseek = false;
setInterval(function() {
audio.play();
if (audio.duration > 0 && !audio.paused && !didseek) {
audio.currentTime = Math.floor(Math.random() * audio.duration);
didseek = true;
}
}, 1000);
setInterval(function() {
if (audio.muted) {
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/base.astro
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import Snow from "../components/snow.astro";
<ViewTransitions />
</head>
<body>
<Snow />
<!-- <Snow /> -->
<Audioplayer />
<Banner />
<main>
Expand Down

0 comments on commit 144e322

Please sign in to comment.