mirror of
https://github.com/HumanAIGC-Engineering/gradio-webrtc.git
synced 2026-02-05 18:09:23 +08:00
fix bugs + release version 0.0.4
This commit is contained in:
@@ -369,6 +369,10 @@ class WebRTC(Component):
|
||||
):
|
||||
from gradio.blocks import Block
|
||||
|
||||
if inputs is None:
|
||||
inputs = []
|
||||
if outputs is None:
|
||||
outputs = []
|
||||
if isinstance(inputs, Block):
|
||||
inputs = [inputs]
|
||||
if isinstance(outputs, Block):
|
||||
@@ -404,7 +408,7 @@ class WebRTC(Component):
|
||||
js=js,
|
||||
)
|
||||
elif self.mode == "receive":
|
||||
if self in cast(list[Block], inputs):
|
||||
if isinstance(inputs, list) and self in cast(list[Block], inputs):
|
||||
raise ValueError(
|
||||
"In the receive mode stream event, the WebRTC component cannot be an input."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user