mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
流结束后回到初始状态
This commit is contained in:
@@ -107,7 +107,7 @@ with gr.Blocks(css=css) as demo:
|
|||||||
GeminiHandler(),
|
GeminiHandler(),
|
||||||
inputs=[webrtc],
|
inputs=[webrtc],
|
||||||
outputs=[webrtc],
|
outputs=[webrtc],
|
||||||
time_limit=90,
|
time_limit=150,
|
||||||
concurrency_limit=2,
|
concurrency_limit=2,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -260,7 +260,8 @@
|
|||||||
{#if show_local_video}
|
{#if show_local_video}
|
||||||
<div class="video-wrap" class:picinpic={show_local_video === 'picture-in-picture'} class:left-right={show_local_video === 'left-right'} class:hide={!webcam_accessed}>
|
<div class="video-wrap" class:picinpic={show_local_video === 'picture-in-picture'} class:left-right={show_local_video === 'left-right'} class:hide={!webcam_accessed}>
|
||||||
<video
|
<video
|
||||||
class="local-video"
|
class:local-video={stream_state === "open"}
|
||||||
|
class:remote-video={stream_state !== "open"}
|
||||||
bind:this={local_video_source}
|
bind:this={local_video_source}
|
||||||
class:hide={!webcam_accessed}
|
class:hide={!webcam_accessed}
|
||||||
autoplay={true}
|
autoplay={true}
|
||||||
@@ -270,7 +271,7 @@
|
|||||||
<video
|
<video
|
||||||
class="remote-video"
|
class="remote-video"
|
||||||
bind:this={video_source}
|
bind:this={video_source}
|
||||||
class:hide={!webcam_received}
|
class:hide={!webcam_received || stream_state != "open"}
|
||||||
class:flip={stream_state != "open" ||
|
class:flip={stream_state != "open" ||
|
||||||
(stream_state === "open" && include_audio)}
|
(stream_state === "open" && include_audio)}
|
||||||
autoplay={true}
|
autoplay={true}
|
||||||
|
|||||||
Reference in New Issue
Block a user