From 0fdd1e0daebd1e2fd6cdb82e7631f2d95502ed94 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 11 Sep 2024 14:59:09 +0800 Subject: [PATCH] bugfix --- rtcllm/aav.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtcllm/aav.py b/rtcllm/aav.py index 9d03c80..7f16026 100644 --- a/rtcllm/aav.py +++ b/rtcllm/aav.py @@ -1,7 +1,7 @@ import random from traceback import print_exc from aiortc.contrib.media import MediaBlackhole, MediaPlayer, MediaRecorder, MediaRelay -from aiortc import MediaStreamTrack, VideoStreamTrack, AudioStreamTrack +from aiortc import MediaStreamTrack, VideoStreamTrack, AudioStreamTrack, MediaStreamError class MyMediaPlayer(MediaPlayer): pass @@ -47,6 +47,7 @@ class MyAudioStreamTrack(AudioStreamTrack): try: return await self._recv() except MediaStreamError: + print(f'{self.__class__.__name__} reach ended of the media ...') self.source_reload() return await self._recv() except Exception as e: @@ -84,6 +85,7 @@ class MyVideoStreamTrack(VideoStreamTrack): try: return await self._recv() except MediaStreamError: + print(f'{self.__class__.__name__} reach ended of the media ...') self.source_reload() return self._recv() except Exception as e: