This project is an example of a simple golang media server implemented using Pion webrtc. It records video and audio from a browser client and streams it back.
Tested so far on the following browsers:
- macOS
- Firefox 108
- Chrome 108
- Safari 16
I encountered a few issues that required workarounds worth noting. You can read thru the code for more details:
- pion/webrtc#716
- https://stackoverflow.com/questions/47990094/failed-to-set-remote-video-description-send-parameters-on-native-ios
- The service merely stores the recorded video in memory for playback. Currently only the last stream will be recorded and played back. I need to restore
go mod tidy
go run ./... all
- Open a browser and go to
http://localhost:8083
. - Record a video at
http://localhost:8083/record
. - Hit the back button (or optionally disconnect and then hit the back button).
- Play the videos you recorded.
CXX=clang++ yarn global add create-react-app
yarn create react-app ui --template typescript
cd ui/
yarn add -D cra-build-watch