From 95947c5fb8e550e130716bdadd66150ef311603b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Wed, 11 Sep 2024 13:01:41 +0800 Subject: [PATCH] bugfix --- rtcllm/aav.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/rtcllm/aav.py b/rtcllm/aav.py index 373319e..4b5b658 100644 --- a/rtcllm/aav.py +++ b/rtcllm/aav.py @@ -5,8 +5,9 @@ from aiortc import VideoStreamTrack, AudioStreamTrack class MyMediaPlayer(MediaPlayer): pass -class MyTrackBase: +class MyTrackBase(MediaStreamTrack): def __init__(self, source=None): + super().__init__() self.reloaded = False self.source = source self.set_track() @@ -38,12 +39,8 @@ class MyTrackBase: return f -class MyAudioStreamTrack(AudioStreamTrack, MyTrackBase): - def __init__(self, source=None): - AudioStreamTrack.__init__(self) - MyTrackBase.__init__(self, source=source) +class MyAudioStreamTrack(MyTrackBase): + kind = 'audio' class MyVideoStreamTrack(VideoStreamTrack, MyTrackBase): - def __init__(self, source=None): - VideoStreamTrack.__init__(self) - MyTrackBase.__init__(self, source=source) + kind = 'video'