예제 #1
0
 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()
예제 #2
0
 def test_audio_and_video(self):
     recorder = MediaBlackhole()
     recorder.addTrack(AudioStreamTrack())
     recorder.addTrack(VideoStreamTrack())
     run(recorder.start())
     run(asyncio.sleep(2))
     run(recorder.stop())
예제 #3
0
    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())