From f10b6e1314a39a19d91e27187699a61ba156c2bc Mon Sep 17 00:00:00 2001 From: Ajay Ghanwat Date: Thu, 2 Oct 2025 19:54:58 +0530 Subject: [PATCH] New WebRTC Component Changes --- src/components/WebRtcPlayer.astro | 271 +++++++++++++++++++----------- src/global.d.ts | 4 - 2 files changed, 172 insertions(+), 103 deletions(-) diff --git a/src/components/WebRtcPlayer.astro b/src/components/WebRtcPlayer.astro index 7f4f560..db219c9 100644 --- a/src/components/WebRtcPlayer.astro +++ b/src/components/WebRtcPlayer.astro @@ -4,6 +4,7 @@ import { cn } from "../utils/cn"; interface Props extends HTMLAttributes<"div"> { streamUrl: string; + iceServers?: any[]; poster?: string; checkStreamFn?: string; retryInterval?: number; @@ -11,6 +12,7 @@ interface Props extends HTMLAttributes<"div"> { const { streamUrl, + iceServers = [], poster, class: className, checkStreamFn, @@ -124,122 +126,193 @@ const { - diff --git a/src/global.d.ts b/src/global.d.ts index 69827ac..fe2fb7c 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -1,6 +1,3 @@ - -import { WebRTCPlayer } from "@eyevinn/webrtc-player"; - declare global { interface Window { schema: any; @@ -8,7 +5,6 @@ declare global { upload: any; myModal_open: any; myModal_close: any; - WebRTCPlayer: typeof WebRTCPlayer } }