Add WebRTC playback support: implement WebRTCPlayer component, update schema, database, playback types, and API endpoints to handle webrtc_url field and streaming logic

This commit is contained in:
Nikita
2025-12-21 18:34:06 -08:00
parent b9927d9807
commit 01102c6817
8 changed files with 179 additions and 7 deletions

View File

@@ -60,7 +60,10 @@ const serve = async ({
})
const playback = stream
? resolveStreamPlayback({ hlsUrl: stream.hls_url })
? resolveStreamPlayback({
hlsUrl: stream.hls_url,
webrtcUrl: stream.webrtc_url,
})
: null
const data = {
@@ -78,6 +81,7 @@ const serve = async ({
is_live: stream.is_live,
viewer_count: stream.viewer_count,
hls_url: stream.hls_url,
webrtc_url: stream.webrtc_url,
playback,
thumbnail_url: stream.thumbnail_url,
started_at: stream.started_at?.toISOString() ?? null,