Stream Video to one user and receive audio from the user
Solution 1:
Once published live stream to SRS, over RTMP by OBS, FFmpeg or other encoder, you could play the stream on other devices.
Generally there are serval players, on both H5 or mobile:
- HLS, about 5~10s latency, easy to play, you only need a H5 video tag, or hls.js.
- HTTP-FLV, about 1~3s latency, also very easy, please use flv.js player.
- WebRTC, about 0.5~1s latency, it's realtime, but be careful, especially on your mobile browser.
Note that all H5 native js player works perfect with MSE except iOS Safari browser. For iOS Safari, it's possible to play the HTTP-FLV by WASM also, please read link for details.
On mobile(iOS/Android) platform, it's OK to use ijkplayer which use FFmpeg, and there is some wraps like fijkplayer for flutter.
Solution 2:
Given the latency requirements it sounds like a real time focused solution leveraging RTSP, Web RTC or similar would be a good approach.
Using something like this as close to standard as possible with video only in one direction and audio only in the other direction (or both if you need it) seems like it might be the easiest approach.
I think you may find this much easier and quicker than starting from scratch yourself, especially to get the best quality within a given latency budget as this is a core consideration of WebRTC.
There are existing Web RTC Android and iOS clients which you can build on - more are available all the time so worth searching but some examples:
- (Main WebRTC site including a Codelabs)
- https://github.com/stasel/WebRTC-iOS (iOS repository example)
- https://medium.com/@shivammaindola07/step-by-step-guide-to-build-webrtc-native-android-app-47898caa1594 (example Android implementation)