From 565d68433b0bd19097048dc418073f3acffd95a9 Mon Sep 17 00:00:00 2001 From: Factiven Date: Tue, 9 May 2023 19:27:06 +0700 Subject: Update v3.5.5 --- README.md | 4 +- components/videoPlayer.js | 81 +++++++++++++++------------------------- lib/Artplayer.js | 5 +++ package.json | 2 +- pages/anime/watch/[...info].js | 7 +--- pages/dmca.js | 10 ++++- pages/manga/chapter/[chapter].js | 10 ++--- styles/globals.css | 2 +- 8 files changed, 54 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index f7ea700..cb9c373 100644 --- a/README.md +++ b/README.md @@ -116,9 +116,9 @@ This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md ## Contact Thank You for passing by!! -If you have any questions or feedback, please reach out to us at [contact@moopa.live](mailto:contact@moopa.live), or you can join our [discord sever](https://discord.gg/4xTGhr85BG). +If you have any questions or feedback, please reach out to us at [contact@moopa.live](mailto:contact@moopa.live?subject=[Moopa]%20-%20Your%20Subject), or you can join our [discord sever](https://discord.gg/4xTGhr85BG).
-or you can DM me on Discord ```CritenDust#3704```/```Factiven#9110```. (just contact me on one of these account) +or you can DM me on Discord `Factiven#9110`/`CritenDust#3704`. (just contact me on one of these account) ## Support This Project diff --git a/components/videoPlayer.js b/components/videoPlayer.js index 2a2ffb8..c879df6 100644 --- a/components/videoPlayer.js +++ b/components/videoPlayer.js @@ -35,25 +35,13 @@ export default function VideoPlayer({ source.quality === "144p" ); - const source = data.sources - .map((items) => ({ - html: items.quality, - url: `https://cors.moopa.my.id/${items.url}`, - })) - // url: `https://m3u8proxy.moopa.workers.dev/?url=${encodeURIComponent( - // items.url - // )}&referer=${encodeURIComponent(referer)}`, - // })) - .sort((a, b) => { - if (a.html === "default") return -1; - if (b.html === "default") return 1; - return 0; - }); + const source = data.sources.map((items) => ({ + default: items.quality === "default" ? true : false, + html: items.quality === "default" ? "auto" : items.quality, + url: `https://cors.moopa.my.id/${items.url}`, + })); const defUrl = `https://cors.moopa.my.id/${sumber.url}`; - // const defUrl = `https://m3u8proxy.moopa.workers.dev/?url=${encodeURIComponent( - // sumber.url - // )}&referer=${encodeURIComponent(referer)}`; setUrl(defUrl); setSource(source); @@ -131,60 +119,51 @@ export default function VideoPlayer({ currentTime <= op.interval.endTime ) { // Add the layer if it's not already added - if (!art.layers.op) { - art.layers.add({ + if (!art.controls["op"]) { + // Remove the other control if it's already added + if (art.controls["ed"]) { + art.controls.remove("ed"); + } + + // Add the control + art.controls.add({ name: "op", - html: ``, - tooltip: "Skip", - style: { - position: "absolute", - bottom: "68px", - right: "58px", - }, + position: "top", + html: '', click: function (...args) { art.seek = op.interval.endTime; }, }); } - // Show the layer - art.layers.show = true; - art.layers.op.style.display = "block"; - if (art.layers.ed) { - art.layers.ed.style.display = "none"; - } } else if ( ed && currentTime >= ed.interval.startTime && currentTime <= ed.interval.endTime ) { // Add the layer if it's not already added - if (!art.layers.ed) { - art.layers.add({ + if (!art.controls["ed"]) { + // Remove the other control if it's already added + if (art.controls["op"]) { + art.controls.remove("op"); + } + + // Add the control + art.controls.add({ name: "ed", - html: ``, - tooltip: "Skip", - style: { - position: "absolute", - bottom: "68px", - right: "58px", - }, + position: "top", + html: '', click: function (...args) { art.seek = ed.interval.endTime; }, }); } - // Show the layer - art.layers.show = true; - art.layers.ed.style.display = "block"; - if (art.layers.op) { - art.layers.op.style.display = "none"; - } } else { - if (art.layers.op) { - art.layers.op.style.display = "none"; + // Remove the controls if they're added + if (art.controls["op"]) { + art.controls.remove("op"); } - if (art.layers.ed) { - art.layers.ed.style.display = "none"; + if (art.controls["ed"]) { + art.controls.remove("ed"); } } }); diff --git a/lib/Artplayer.js b/lib/Artplayer.js index 33acf21..74f9acd 100644 --- a/lib/Artplayer.js +++ b/lib/Artplayer.js @@ -30,7 +30,12 @@ export default function Player({ option, getInstance, ...rest }) { fullscreen: true, hotkey: true, lock: true, + setting: true, + flip: true, + playbackRate: true, + aspectRatio: true, autoOrientation: true, + pip: true, theme: "#f97316", }); diff --git a/package.json b/package.json index d20a84e..4c718b2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moopa", - "version": "3.5.4", + "version": "3.5.5", "private": true, "scripts": { "dev": "next dev", diff --git a/pages/anime/watch/[...info].js b/pages/anime/watch/[...info].js index 3a779a5..13b9980 100644 --- a/pages/anime/watch/[...info].js +++ b/pages/anime/watch/[...info].js @@ -3,11 +3,8 @@ import Link from "next/link"; import { closestMatch } from "closest-match"; import Head from "next/head"; import { useEffect, useState } from "react"; -import Modal from "../../../components/modal"; import dynamic from "next/dynamic"; -import { useNotification } from "../../../lib/useNotify"; - import { getServerSession } from "next-auth/next"; import { authOptions } from "../../api/auth/[...nextauth]"; @@ -262,7 +259,7 @@ export default function Info({ sessions, id, aniId, provider }) { const artwork = poster && poster.length > 0 - ? [{ src: poster[0].image, type: "image/jpeg" }] + ? [{ src: poster[0].image, sizes: "512x512", type: "image/jpeg" }] : undefined; mediaSession.metadata = new MediaMetadata({ @@ -460,7 +457,7 @@ export default function Info({ sessions, id, aniId, provider }) {

Up Next

-
+
{data ? ( data.episodes.length > 0 ? ( data.episodes.some( diff --git a/pages/dmca.js b/pages/dmca.js index eeed80c..f306054 100644 --- a/pages/dmca.js +++ b/pages/dmca.js @@ -91,8 +91,14 @@ export default function DMCA() { downloading/uploading of movies. We only post links that are available on the internet. If you believe that any content on our website infringes upon your intellectual property rights and - you hold the copyright for that content, please report it to - factiven@gmail.com and the content will be immediately removed. + you hold the copyright for that content, please report it to{" "} + + contact@moopa.live + {" "} + and the content will be immediately removed.

diff --git a/pages/manga/chapter/[chapter].js b/pages/manga/chapter/[chapter].js index eea14c0..14f04ca 100644 --- a/pages/manga/chapter/[chapter].js +++ b/pages/manga/chapter/[chapter].js @@ -98,7 +98,7 @@ export default function Test({ title, id, aniId, data, provider }) { setData(datas); } else { const dat = data.map((item) => ({ - img: `https://cors.moopa.my.id/?url=${encodeURIComponent( + img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent( item.img )}&referer=${encodeURIComponent(item.headerForImage.Referer)}`, page: item.page, @@ -151,7 +151,7 @@ export default function Test({ title, id, aniId, data, provider }) { setData(datas); } else { const dat = data.map((item) => ({ - img: `https://cors.moopa.my.id/?url=${encodeURIComponent( + img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent( item.img )}&referer=${encodeURIComponent(item.headerForImage.Referer)}`, page: item.page, @@ -234,7 +234,7 @@ export default function Test({ title, id, aniId, data, provider }) { setData(datas); } else { const dat = data.map((item) => ({ - img: `https://cors.moopa.my.id/?url=${encodeURIComponent( + img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent( item.img )}&referer=${encodeURIComponent(item.headerForImage.Referer)}`, page: item.page, @@ -283,7 +283,7 @@ export default function Test({ title, id, aniId, data, provider }) { setData(datas); } else { const dat = data.map((item) => ({ - img: `https://cors.moopa.my.id/?url=${encodeURIComponent( + img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent( item.img )}&referer=${encodeURIComponent(item.headerForImage.Referer)}`, page: item.page, @@ -441,7 +441,7 @@ export async function getServerSideProps(context) { const data = results.data; const dat = data.map((item) => ({ - img: `https://cors.moopa.my.id/?url=${encodeURIComponent( + img: `https://api.consumet.org/utils/image-proxy?url=${encodeURIComponent( item.img )}&referer=${encodeURIComponent(item.headerForImage.Referer)}`, page: item.page, diff --git a/styles/globals.css b/styles/globals.css index a26fbf3..e6d07e2 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -139,7 +139,7 @@ button { } .skip-button { - @apply bg-white xs:w-28 xs:h-9 w-24 h-7 -right-8 -bottom-7 rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black md:static absolute xs:-right-6 xs:-bottom-5 xs:text-[15px] text-xs md:text-sm; + @apply bg-white xs:w-28 xs:h-9 w-24 h-7 -top-12 right-[2%] rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black absolute xs:text-[15px] text-xs md:text-sm; } .lds-ellipsis { -- cgit v1.2.3