This commit is contained in:
yumoqing 2024-09-11 14:05:13 +08:00
parent 5040c0713b
commit 4b3fd28b10

View File

@ -106,8 +106,10 @@ class LoopingVideoTrack(VideoStreamTrack):
self.iteration = 0
async def recv(self):
frame = await self.player.video.recv()
print(f'{self.__class__.__name__}, {self.player.video.readyState}')
if self.player.video.readyState != 'live':
self.player = MediaPlayer(self.player._file_path)
frame = await self.player.video.recv()
frame = await self.player.video.recv()
return frame