From 3323ef28a87043d6f9d88c532ec9d011737cc3cc Mon Sep 17 00:00:00 2001 From: Freddy Boulton Date: Mon, 24 Feb 2025 01:30:45 -0500 Subject: [PATCH] Tweak (#66) * thanks * title fix * version bump --------- Co-authored-by: Freddy Boulton --- backend/fastrtc/stream.py | 12 +++++++----- docs/index.md | 3 +++ pyproject.toml | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/backend/fastrtc/stream.py b/backend/fastrtc/stream.py index 1baddc8..af8792d 100644 --- a/backend/fastrtc/stream.py +++ b/backend/fastrtc/stream.py @@ -185,7 +185,7 @@ class Stream(WebRTCConnectionMixin): gr.HTML( f"""

- {ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} + {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}

""" ) @@ -224,7 +224,7 @@ class Stream(WebRTCConnectionMixin): gr.HTML( f"""

- {ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} + {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}

""" ) @@ -264,7 +264,7 @@ class Stream(WebRTCConnectionMixin): gr.HTML( f"""

- {ui_args.get("title", "Video Streaming (Powered by WebRTC ⚡️)")} + {ui_args.get("title", "Video Streaming (Powered by FastRTC ⚡️)")}

""" ) @@ -301,9 +301,9 @@ class Stream(WebRTCConnectionMixin): elif self.modality == "audio" and self.mode == "receive": with gr.Blocks() as demo: gr.HTML( - """ + f"""

- FastAPI (Powered by WebRTC ⚡️) + {ui_args.get("title", "Audio Streaming (Powered by FastRTC ⚡️)")}

""" ) @@ -466,6 +466,8 @@ class Stream(WebRTCConnectionMixin): inputs=additional_output_components, outputs=additional_output_components, ) + else: + raise ValueError(f"Invalid modality: {self.modality} and mode: {self.mode}") return demo @property diff --git a/docs/index.md b/docs/index.md index ef9a9f0..e412cc9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -16,6 +16,9 @@ The Real-Time Communication Library for Python. Turn any python function into a real-time audio and video stream over WebRTC or WebSockets. + + + ## Installation ```bash diff --git a/pyproject.toml b/pyproject.toml index 6b22948..eadfa5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ build-backend = "hatchling.build" [project] name = "fastrtc" -version = "0.0.3.post9" +version = "0.0.3.post11" description = "The realtime communication library for Python" readme = "README.md" license = "apache-2.0"