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: