Release v0.4: Add PornHub support / Server-side streaming / Plyr.js / Video srcset #96

Merged
lamacchinadesiderante merged 18 commits from feature/pornhub-support into develop 2024-05-25 11:46:42 +00:00
5 changed files with 19 additions and 23 deletions
Showing only changes of commit 6efe6582a5 - Show all commits

View File

@ -2,13 +2,7 @@
"Header": {
"title": "Proxy Raye",
"description": "A proxy for porn websites",
"disclaimer_0": "Genital sexuality is only one of the many possible conceptions of sexuality",
"disclaimer_1": "Platform capitalism makes money on desire flow. Proxies avoid this to happen.",
"disclaimer_2": "Platform capitalism is narcissism-driven",
"disclaimer_3": "Pornhub annoying elements (like ads) are put there intentionally to make you upgrade to premium",
"disclaimer_4": "You're going to masturbate on someone else's imaginary",
"disclaimer_5": "No banners or annoying popups. You can jerk off with no hassle!",
"disclaimer_6": "You're choosing image over imagination. What if they're not in antithesis?"
"disclaimer_pornhub": "Warning: PornHub support is experimental. If video player freezes, try reloading the page after a few seconds."
},
"NotFound": {
"uh_oh": "Uh Oh...",

View File

@ -2,13 +2,7 @@
"Header": {
"title": "Proxy Raye",
"description": "Un proxy per i siti porno",
"disclaimer_0": "Quella genitale è solo una delle possibili concezioni della sessualità.",
"disclaimer_1": "Le piattaforme monetizzano i flussi di desiderio. I proxy impediscono che questo accada.",
"disclaimer_2": "Le piattaforme si alimentano del narcisisismo degli utenti.",
"disclaimer_3": "Gli elementi di disturbo su PornHub sono messi lì a posta per farti passare alla versione Premium.",
"disclaimer_4": "Stai per masturbarti sull'immaginario di qualcun altro.",
"disclaimer_5": "Niente banner o popup fastidiosi. Puoi masturbarti in santa pace.",
"disclaimer_6": "Stai preferendo l'immagine all'immaginazione. E se immagine e immaginazione non fossero in antitesi?"
"disclaimer_pornhub": "Attenzione: il supporto per PornHub è sperimentale. Se il player si blocca, provare a ricaricare la pagina dopo qualche secondo."
},
"NotFound": {
"uh_oh": "Uh Oh...",

View File

@ -29,6 +29,6 @@ export default async function VideoPage({ params }: { params: { platform: Platfo
}
return <Layout>
<Video id={id} data={data} related={related}/>
<Video platform={platform} id={id} data={data} related={related}/>
</Layout>
}

View File

@ -3,19 +3,22 @@ import React from 'react';
import style from './Disclaimer.module.scss'
import { useTranslations } from 'next-intl';
import { Platforms } from '@/meta/settings';
const Disclaimer: React.FC = () => {
interface Props {
platform: Platforms
}
const MAX_DISCLAIMER_NO = 6
const Disclaimer: React.FC<Props> = (props) => {
const { platform } = props;
const t = useTranslations('Header');
const getRandomArbitrary = (max: number) => {
return Math.floor( Math.random() * max);
}
return (
<div className={style.messageBox}>{t(`disclaimer_${getRandomArbitrary(MAX_DISCLAIMER_NO)}`)}</div>
<>
{platform == Platforms.pornhub && <div className={style.messageBox}>{t(`disclaimer_pornhub`)}</div>}
</>
);
};

View File

@ -9,21 +9,26 @@ import SearchBar from '@/components/Layout/SearchBar';
import Results from '@/components/Layout/Results';
import { GalleryData, VideoData } from '@/meta/data';
import { Platforms } from '@/meta/settings';
import Disclaimer from '@/components/Layout/Header/Disclaimer';
import { platform } from 'os';
interface Props {
id: string
data: VideoData
related: GalleryData[]
platform: Platforms
}
const Video: React.FC<Props> = (props) => {
const { data, related } = props;
const { data, related, platform } = props;
return (
<>
<Header />
<Disclaimer platform={platform} />
{data.srcSet ? <PlyrJS data={data} /> : <VideoJS data={data} />}
<SearchBar />
{related && <Results data={related} />}