feat: single publisher

This commit is contained in:
Kieran 2023-11-08 17:36:04 +00:00
parent 7ca6a3bc6e
commit 224bf5c85c
Signed by: Kieran
GPG Key ID: DE71CEB3925BE941
25 changed files with 16 additions and 24 deletions

View File

@ -47,3 +47,5 @@ declare module "light-bolt11-decoder" {
value: string | Uint8Array | number | undefined;
}
}
declare const __SINGLE_PUBLISHER: string;

View File

@ -26,7 +26,7 @@ export function LiveVideoPlayer(props: VideoPlayerProps) {
const hls = new Hls({
enableWorker: true,
lowLatencyMode: true,
backBufferLength: 90
backBufferLength: 90,
});
hls.loadSource(streamCached);
hls.attachMedia(video.current);

View File

@ -17,9 +17,16 @@ export function useStreamsFeed(tag?: string) {
leaveOpen: true,
});
if (tag) {
rb.withFilter().kinds([LIVE_STREAM]).tag("t", [tag]).since(since);
rb.withFilter()
.kinds([LIVE_STREAM])
.tag("t", [tag])
.since(since)
.authors(__SINGLE_PUBLISHER ? [__SINGLE_PUBLISHER] : undefined);
} else {
rb.withFilter().kinds([LIVE_STREAM]).since(since);
rb.withFilter()
.kinds([LIVE_STREAM])
.since(since)
.authors(__SINGLE_PUBLISHER ? [__SINGLE_PUBLISHER] : undefined);
}
return rb;
}, [tag, since]);

View File

@ -55,7 +55,9 @@ export function LayoutPage() {
return (
<>
<NewStreamDialog btnClassName="btn btn-primary" />
{(!__SINGLE_PUBLISHER || __SINGLE_PUBLISHER === login.pubkey) && (
<NewStreamDialog btnClassName="btn btn-primary" />
)}
<Menu
menuClassName="ctx-menu"
menuButton={

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Зап Тревога"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "জ্যাপ অ্যালার্ট"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Alerta de Zap"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "هشدار زپ"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap-hälytys"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Alerte Zap"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Riadó"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "ザップアラート"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Alerta Zap"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Оповещение о запе"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Tahadhari ya Zap"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "Zap Alert"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "打闪提示"
}
}

View File

@ -418,4 +418,3 @@
"defaultMessage": "打閃提示"
}
}

View File

@ -61,6 +61,7 @@ const config = {
new webpack.DefinePlugin({
__XXX: process.env["__XXX"] || JSON.stringify(false),
__XXX_HOST: JSON.stringify("https://xxzap.com"),
__SINGLE_PUBLISHER: JSON.stringify(process.env.__SINGLE_PUBLISHER),
}),
isProduction
? new WorkboxPlugin.InjectManifest({