Large refactoring + cancel when either SRT or WebRTC fails/disconnects + ease of use
Hey Folks 👋 ,
I'm using Donut to learn (thank you 🙇 ) more about web rtc and srt. This PR is a huge one, and I'm not sure you feel the same about the project's direction, so feel free to close this pull request. _(I can keep experimenting on my fork 😃 )_
You can test this PR by following the instructions.
```
git clone https://github.com/leandromoreira/donut
cd donut
make run # Make sure to have docker-compose/docker installed
# Open http://localhost:8080, click on [Connect] check if it works
```
If it's working, you might want to check the main changes:
- Install the [fx library](https://github.com/uber-go/fx) providing dependency injection and build/factory patterns
- Extract the core logic (web rtc, srt, streaming, h264, eia608) into controllers
- Introduce a simple architecture:
- `request --> [server] --> [router] --> [handler] --> [controller]`
- Introduce a FAQ section
TBH, the only real (beyond moving code around) contributions/changes are:
- Make it easier to run/experiment locally with docker-compose
- If either the SRT or WebRTC gets disconnected/failed, it closes all related resources
- Add more documentation/faq/how_it_works/...
My current goals are:
- to bring the player to the repo (making it easier to experiment),
- support audio,
- and play with transcoding media to expand the supported browsers.
Thanks
cc @Sean-Der
合并状态:已合并 合并于 2024-02-04 关闭于 2024-02-04 3 条评论