This commit is contained in:
yumoqing 2024-09-11 13:08:10 +08:00
parent 80aa2aa25f
commit 8f540565b7

View File

@ -11,6 +11,7 @@ class MyTrackBase(MediaStreamTrack):
self.reloaded = False
self.source = source
self.set_track()
print(f'{self.kind=}, {self.__class__.__name__}')
def set_track(self):
if self.kind == 'audio':
@ -33,7 +34,7 @@ class MyTrackBase(MediaStreamTrack):
return None
if self.track.readyState != 'live':
self.reload()
f = await self.source.audio.recv()
f = await self.track.recv()
return f