Fix
Browse files
app.py
CHANGED
@@ -506,8 +506,8 @@ def app_sendonly_video():
|
|
506 |
|
507 |
image_place = st.empty()
|
508 |
|
509 |
-
|
510 |
-
|
511 |
try:
|
512 |
video_frame = webrtc_ctx.video_receiver.get_frame(timeout=1)
|
513 |
except queue.Empty:
|
@@ -516,6 +516,9 @@ def app_sendonly_video():
|
|
516 |
|
517 |
img_rgb = video_frame.to_ndarray(format="rgb24")
|
518 |
image_place.image(img_rgb)
|
|
|
|
|
|
|
519 |
|
520 |
|
521 |
def app_sendonly_audio():
|
|
|
506 |
|
507 |
image_place = st.empty()
|
508 |
|
509 |
+
while True:
|
510 |
+
if webrtc_ctx.video_receiver:
|
511 |
try:
|
512 |
video_frame = webrtc_ctx.video_receiver.get_frame(timeout=1)
|
513 |
except queue.Empty:
|
|
|
516 |
|
517 |
img_rgb = video_frame.to_ndarray(format="rgb24")
|
518 |
image_place.image(img_rgb)
|
519 |
+
else:
|
520 |
+
logger.warning("AudioReciver is not set. Abort.")
|
521 |
+
break
|
522 |
|
523 |
|
524 |
def app_sendonly_audio():
|