Skip to content

Commit cd9d873

Browse files
committed
clean up examples
1 parent 8f13bbd commit cd9d873

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

examples/local-audio/full_duplex.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def on_participant_disconnected(participant: rtc.RemoteParticipant):
9595
logging.info("published local microphone")
9696

9797
# Start playing mixed remote audio
98-
play_task = asyncio.create_task(player.play(mixer))
98+
asyncio.create_task(player.play(mixer))
9999

100100
# Run until Ctrl+C
101101
while True:

examples/local-audio/publish_mic.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import sys
33
import asyncio
44
import logging
5+
from dotenv import load_dotenv, find_dotenv
56

67
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "livekit-rtc")))
78

@@ -11,6 +12,9 @@
1112
async def main() -> None:
1213
logging.basicConfig(level=logging.INFO)
1314

15+
# Load environment variables from a .env file if present
16+
load_dotenv(find_dotenv())
17+
1418
url = os.getenv("LIVEKIT_URL")
1519
token = os.getenv("LIVEKIT_TOKEN")
1620
if not url or not token:

livekit-rtc/rust-sdks

Submodule rust-sdks updated 97 files

0 commit comments

Comments
 (0)