aboutsummaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
Diffstat (limited to 'pages')
-rw-r--r--pages/about.js29
-rw-r--r--pages/anime/watch/[...info].js44
2 files changed, 19 insertions, 54 deletions
diff --git a/pages/about.js b/pages/about.js
index 42690e0..55d7914 100644
--- a/pages/about.js
+++ b/pages/about.js
@@ -13,35 +13,6 @@ export default function About() {
<link rel="icon" href="/c.svg" />
</Head>
<Layout>
- {/* <div className="mb-[6rem] bg-[#121212] text-white flex min-h-screen w-screen flex-col justify-center gap-8 px-6 pt-nav lg:items-center lg:gap-14">
- <h1 className="place-items-start font-karla text-[3rem] font-bold">
- Hi !
- </h1>
- <div className="flex flex-col gap-3 font-roboto text-xl text-[#cdcdcd] lg:mx-52 lg:gap-10 lg:text-2xl">
- <div>
- <p className="inline-block font-extrabold text-[#ffffff]">
- Welcome to our website!
- </p>{" "}
-
- </div>
- <p>
-
- </p>
- <p>
-
- </p>
- <p>
- We are committed to providing a safe and secure environment for
- our users. Our website is regularly monitored to prevent any
- malicious activities, and we take proactive measures to ensure the
- safety of our community.
- </p>
- <p>
-
- </p>
- </div>
- </div> */}
-
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
diff --git a/pages/anime/watch/[...info].js b/pages/anime/watch/[...info].js
index 0d11684..682e252 100644
--- a/pages/anime/watch/[...info].js
+++ b/pages/anime/watch/[...info].js
@@ -8,12 +8,9 @@ import dynamic from "next/dynamic";
import { useNotification } from "../../../lib/useNotify";
-import { signIn } from "next-auth/react";
import { getServerSession } from "next-auth/next";
import { authOptions } from "../../api/auth/[...nextauth]";
-import AniList from "../../../components/media/aniList";
-
import Skeleton, { SkeletonTheme } from "react-loading-skeleton";
import "react-loading-skeleton/dist/skeleton.css";
@@ -259,28 +256,25 @@ export default function Info({ sessions, id, aniId, provider }) {
fetchData();
}, [id, aniId, provider, sessions]);
- const { Notification: NotificationComponent } = useNotification();
-
- const [open, setOpen] = useState(false);
- const [aniStatus, setAniStatus] = useState("");
- const [aniProgress, setAniProgress] = useState(parseInt(playingEpisode));
-
- const handleStatus = (e) => {
- setAniStatus(e.target.value);
- };
-
- const handleProgress = (e) => {
- const value = parseFloat(e.target.value);
- if (!isNaN(value) && value >= 0 && value <= data.totalEpisodes) {
- setAniProgress(value);
- }
- };
-
- const handleSubmit = (e) => {
- e.preventDefault();
- const formData = { status: aniStatus, progress: aniProgress };
- console.log(formData);
- };
+ useEffect(() => {
+ const mediaSession = navigator.mediaSession;
+ if (!mediaSession) return;
+
+ const artwork =
+ poster && poster.length > 0
+ ? [{ src: poster[0].image, type: "image/jpeg" }]
+ : undefined;
+
+ mediaSession.metadata = new MediaMetadata({
+ title: playingTitle,
+ artist: `Moopa ${
+ playingTitle === data?.title?.romaji
+ ? "- Episode " + playingEpisode
+ : `- ${data?.title?.romaji || data?.title?.english}`
+ }`,
+ artwork,
+ });
+ }, [poster, playingTitle, playingEpisode, data]);
return (
<>