bugfix
This commit is contained in:
parent
4b3fd28b10
commit
46dbb582dd
@ -102,14 +102,14 @@ class LoopingVideoTrack(VideoStreamTrack):
|
|||||||
"""
|
"""
|
||||||
def __init__(self, filename):
|
def __init__(self, filename):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.player = MediaPlayer(filename)
|
self.player = MyMediaPlayer(filename)
|
||||||
self.iteration = 0
|
self.iteration = 0
|
||||||
|
|
||||||
async def recv(self):
|
async def recv(self):
|
||||||
frame = await self.player.video.recv()
|
frame = await self.player.video.recv()
|
||||||
print(f'{self.__class__.__name__}, {self.player.video.readyState}')
|
print(f'{self.__class__.__name__}, {self.player.video.readyState}')
|
||||||
if self.player.video.readyState != 'live':
|
if self.player.video.readyState != 'live':
|
||||||
self.player = MediaPlayer(self.player._file_path)
|
self.player = MyMediaPlayer(self.player._file_path)
|
||||||
frame = await self.player.video.recv()
|
frame = await self.player.video.recv()
|
||||||
return frame
|
return frame
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user