update
This commit is contained in:
parent
18a0a7e6e2
commit
fdb30540db
2 changed files with 46 additions and 10 deletions
|
@ -61,11 +61,11 @@ let { data: subs } = await supabase
|
||||||
<div class="sidebar-top-start">
|
<div class="sidebar-top-start">
|
||||||
<a href='/'><img src="/images/logo/MinPluto - Logo.png"/></a>
|
<a href='/'><img src="/images/logo/MinPluto - Logo.png"/></a>
|
||||||
<div>
|
<div>
|
||||||
{Guest ?
|
<!-- {Guest ?
|
||||||
<a title="Login" href="/login"><LogIn/></a>
|
<a title="Login" href="/login"><LogIn/></a>
|
||||||
:
|
:
|
||||||
<a title="Log Out" href="/api/auth/logout"><LogOut/></a>
|
<a title="Log Out" href="/api/auth/logout"><LogOut/></a>
|
||||||
}
|
} -->
|
||||||
<a title="Settings" href="#"><Settings/></a>
|
<a title="Settings" href="#"><Settings/></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -2,14 +2,51 @@
|
||||||
import { t, changeLanguage } from "i18next";
|
import { t, changeLanguage } from "i18next";
|
||||||
import Embed from "@layouts/Embed.astro";
|
import Embed from "@layouts/Embed.astro";
|
||||||
import "@styles/video.scss";
|
import "@styles/video.scss";
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
|
import { DEFAULT_MEDIA_DATA_PROXY, DEFAULT_IMAGE_PROXY, SERVER_DOMAIN } from '@utils/GetConfig'
|
||||||
|
|
||||||
|
// Components
|
||||||
|
import { Zorn } from "@minpluto/zorn"
|
||||||
|
|
||||||
// Fetch
|
// Fetch
|
||||||
const SWV = Astro.url.href.split("embed/").pop();
|
const SWV = Astro.url.href.split("embed/").pop();
|
||||||
const video = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/videos/" + SWV).then((response) => response.json());
|
const video = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/videos/" + SWV).then((response) => response.json());
|
||||||
|
|
||||||
|
// Quality Check
|
||||||
|
const EightKCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=571')
|
||||||
|
if (EightKCheck.status == 200) {
|
||||||
|
var EightK = true
|
||||||
|
} else {
|
||||||
|
var EightK = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const FourKCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=313')
|
||||||
|
if (FourKCheck.status == 200) {
|
||||||
|
var FourK = true
|
||||||
|
} else {
|
||||||
|
var FourK = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const TenEightyCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=303')
|
||||||
|
if (TenEightyCheck.status == 200) {
|
||||||
|
var TenEighty = true
|
||||||
|
} else {
|
||||||
|
var TenEighty = false
|
||||||
|
}
|
||||||
|
|
||||||
|
const ThreeSixtyCheck = await fetch(DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=134')
|
||||||
|
if (ThreeSixtyCheck.status == 200) {var ThreeSixty = true}
|
||||||
|
|
||||||
|
if (EightK === true) { // 571
|
||||||
|
var Quality = '571'
|
||||||
|
} else if (FourK === true) { // 313
|
||||||
|
var Quality = '313'
|
||||||
|
} else if (TenEighty === true) { // 137
|
||||||
|
var Quality = '303'
|
||||||
|
} else if (ThreeSixty === true) { // 134
|
||||||
|
var Quality = '134'
|
||||||
|
}
|
||||||
---
|
---
|
||||||
|
|
||||||
<Embed
|
<Embed
|
||||||
|
@ -20,14 +57,13 @@ const video = await fetch(DEFAULT_MEDIA_DATA_PROXY + "/api/v1/videos/" + SWV).th
|
||||||
EmbedTitle={video.title}
|
EmbedTitle={video.title}
|
||||||
>
|
>
|
||||||
<div class="video-container">
|
<div class="video-container">
|
||||||
<video
|
<Zorn
|
||||||
class="zorn-player"
|
Poster={DEFAULT_IMAGE_PROXY + '/https://i.ytimg.com/vi/' + video.videoId + '/maxresdefault.jpg'}
|
||||||
autoplay
|
Video={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=' + Quality + '&local=true'}
|
||||||
poster={DEFAULT_IMAGE_PROXY + '/https://i.ytimg.com/vi/' + video.videoId + '/maxresdefault.jpg'}
|
Audio={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=140'}
|
||||||
video-title={video.title}
|
VideoAttributes="muted"
|
||||||
src={DEFAULT_MEDIA_DATA_PROXY + '/latest_version?id=' + video.videoId + '&itag=22&local=true'}
|
AudioAttributes=""
|
||||||
>
|
/>
|
||||||
</video>
|
|
||||||
</div>
|
</div>
|
||||||
</Embed>
|
</Embed>
|
||||||
|
|
||||||
|
|
Reference in a new issue