mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-24 10:54:04 +08:00
Fix webcam when streaming=True
(#6865)
* show webcam when streaming value is true * add story * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
parent
e974cf045c
commit
15c97c6d34
6
.changeset/nine-forks-raise.md
Normal file
6
.changeset/nine-forks-raise.md
Normal file
@ -0,0 +1,6 @@
|
||||
---
|
||||
"@gradio/image": patch
|
||||
"gradio": patch
|
||||
---
|
||||
|
||||
fix:Fix webcam when `streaming=True`
|
@ -84,3 +84,18 @@
|
||||
interactive: true
|
||||
}}
|
||||
/>
|
||||
|
||||
<Story
|
||||
name="interactive webcam with streaming"
|
||||
args={{
|
||||
sources: ["webcam"],
|
||||
show_download_button: true,
|
||||
interactive: true,
|
||||
value: {
|
||||
path: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
||||
url: "https://gradio-builds.s3.amazonaws.com/demo-files/ghepardo-primo-piano.jpg",
|
||||
orig_name: "cheetah.jpg"
|
||||
},
|
||||
streaming: true
|
||||
}}
|
||||
/>
|
||||
|
@ -122,7 +122,7 @@
|
||||
<slot />
|
||||
{/if}
|
||||
</Upload>
|
||||
{#if active_source === "webcam" && !value}
|
||||
{#if active_source === "webcam" && (streaming || (!streaming && !value))}
|
||||
<Webcam
|
||||
on:capture={(e) => handle_save(e.detail)}
|
||||
on:stream={(e) => handle_save(e.detail)}
|
||||
|
Loading…
Reference in New Issue
Block a user