diff --git a/apps/web/src/app/(ui)/(protected)/api/mediamtx/publish/route.ts b/apps/web/src/app/(ui)/(protected)/api/mediamtx/publish/route.ts index fbb0ad7..9c28684 100644 --- a/apps/web/src/app/(ui)/(protected)/api/mediamtx/publish/route.ts +++ b/apps/web/src/app/(ui)/(protected)/api/mediamtx/publish/route.ts @@ -28,6 +28,7 @@ export async function POST(request: NextRequest) { owner: { include: { ban: true }, }, + streamInfo: true, }, }); @@ -47,6 +48,10 @@ export async function POST(request: NextRequest) { } } + if (channel?.streamInfo[0].isLive) { + return new Response('stream already live', { status: 403 }); + } + return new Response('youre in yay', { status: 200 }); } } else if (action === 'read' && protocol === 'hls') { diff --git a/apps/web/src/components/app/StreamPlayer/StreamPlayer.tsx b/apps/web/src/components/app/StreamPlayer/StreamPlayer.tsx index bb1b983..9338639 100644 --- a/apps/web/src/components/app/StreamPlayer/StreamPlayer.tsx +++ b/apps/web/src/components/app/StreamPlayer/StreamPlayer.tsx @@ -7,8 +7,6 @@ import { MediaLoadingIndicator, MediaControlBar, MediaPlayButton, - MediaSeekBackwardButton, - MediaSeekForwardButton, MediaMuteButton, MediaVolumeRange, MediaFullscreenButton,