Open whitphx opened 1 year ago
However, with the current API, the players and the recorders are automatically stopped or closed by the webrtc_streamer()
component.
Removing these APIs also gets rid of this advantage.
-> Keep them and also add the track-based API for verbose usage? --> Only the recorder can automatically be stopped by the "stop"event emitted from the upstream track?
webrtc_streamer
has many different I/O types which makes its API complex. We should get rid of some APIs so that both the API and its implementation get simpler.Input
Currently
webrtc_streamer
supports 2 input types:player_factory
ctx.source_video_track
andctx.source_audio_track
And #731 may also be here.
The
source_*_track
should be the unified input API, and the player-based API should be removed fromwebrtc_streamer()
. Instead, the developers will manually connect the player object to the input tracks.Output
Currently
webrtc_streamer
supports 3 output types:in_recorder_factory
andout_recorder_factory
ctx.video_receiver
andctx.audio_receiver
ctx.output_video_track
andctx.output_audio_track
At least, like the player API above, the recorder API should be removed from
webrtc_streamer()
so that the developers manually connect the output tracks to the recorder object.The receiver objects are kind of special, but they may also be unified with the output track-based API.