feat: single publisher

This commit is contained in:
2023-11-08 17:36:04 +00:00
parent 7ca6a3bc6e
commit 224bf5c85c
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; 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({ const hls = new Hls({
enableWorker: true, enableWorker: true,
lowLatencyMode: true, lowLatencyMode: true,
backBufferLength: 90 backBufferLength: 90,
}); });
hls.loadSource(streamCached); hls.loadSource(streamCached);
hls.attachMedia(video.current); hls.attachMedia(video.current);

View File

@ -17,9 +17,16 @@ export function useStreamsFeed(tag?: string) {
leaveOpen: true, leaveOpen: true,
}); });
if (tag) { 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 { } else {
rb.withFilter().kinds([LIVE_STREAM]).since(since); rb.withFilter()
.kinds([LIVE_STREAM])
.since(since)
.authors(__SINGLE_PUBLISHER ? [__SINGLE_PUBLISHER] : undefined);
} }
return rb; return rb;
}, [tag, since]); }, [tag, since]);

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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