def test_audio_remove_track(self): recorder = MediaBlackhole() track = AudioStreamTrack() recorder.addTrack(track) recorder.start() run(asyncio.sleep(1)) recorder.removeTrack(track) run(asyncio.sleep(1)) recorder.stop()
def test_audio_and_video(self): recorder = MediaBlackhole() recorder.addTrack(AudioStreamTrack()) recorder.addTrack(VideoStreamTrack()) run(recorder.start()) run(asyncio.sleep(2)) run(recorder.stop())
def test_video_ended(self): track = VideoStreamTrack() recorder = MediaBlackhole() recorder.addTrack(track) run(recorder.start()) run(asyncio.sleep(1)) track.stop() run(asyncio.sleep(1)) run(recorder.stop())