bugfix
This commit is contained in:
parent
7199fcb0af
commit
ebc27fc306
@ -14,12 +14,11 @@ class MyAudioStreamTrack(AudioStreamTrack):
|
|||||||
self.source = source
|
self.source = source
|
||||||
|
|
||||||
async def recv(self):
|
async def recv(self):
|
||||||
print('MyAudioTrack::recv(): called')
|
|
||||||
|
|
||||||
if self.source is None:
|
if self.source is None:
|
||||||
return None
|
return None
|
||||||
f = await self.source.audio.recv()
|
f = await self.source.audio.recv()
|
||||||
while f is None:
|
while f is None:
|
||||||
|
print('MyAudioTrack::recv(): will reload source')
|
||||||
self.set_source(MyMediaPlayer(self.source._file_path))
|
self.set_source(MyMediaPlayer(self.source._file_path))
|
||||||
f = await self.source.audio.recv()
|
f = await self.source.audio.recv()
|
||||||
return f
|
return f
|
||||||
@ -33,11 +32,11 @@ class MyVideoStreamTrack(VideoStreamTrack):
|
|||||||
self.source = source
|
self.source = source
|
||||||
|
|
||||||
async def recv(self):
|
async def recv(self):
|
||||||
print('MyVideoTrack::recv(): called')
|
|
||||||
if self.source is None:
|
if self.source is None:
|
||||||
return None
|
return None
|
||||||
f = await self.source.video.recv()
|
f = await self.source.video.recv()
|
||||||
while f is None:
|
while f is None:
|
||||||
|
print('MyVideoTrack::recv(): will reload source')
|
||||||
self.set_source(MyMediaPlayer(self.source._file_path))
|
self.set_source(MyMediaPlayer(self.source._file_path))
|
||||||
f = await self.source.video.recv()
|
f = await self.source.video.recv()
|
||||||
return f
|
return f
|
||||||
|
Loading…
Reference in New Issue
Block a user