|
| 1 | +# WebRTC In PHP |
| 2 | + |
| 3 | +[](https://php.net/) |
| 4 | +[](LICENSE) |
| 5 | + |
| 6 | +This package provides a complete WebRTC implementation written entirely in PHP, including support for ICE, DTLS, SRTP, SCTP, RTP, and data channels. Designed for real-time audio, video, and data communication, it enables peer-to-peer connectivity without relying on external WebRTC libraries. Built with modular components and fully asynchronous using ReactPHP. |
| 7 | + |
| 8 | +### Please Note: |
| 9 | + |
| 10 | +We've been working on this repository and many other PHP WebRTC-related ones |
| 11 | +(**such as ICE, RTP, RTCP, and more than 22 others**) |
| 12 | +for a long time privately(in our git server) before making them open source(**We released our packages only after they have been fully tested and thoroughly debugged**). |
| 13 | +Originally, there was a long commit history that reflected all our work. |
| 14 | + |
| 15 | +However, we decided to **remove that history** in the initial public commit to **protect our privacy**. The original commits included details like our **working hours based on commit times and counts**, as well as our **personal email addresses**, which we did not feel comfortable sharing publicly. |
| 16 | + |
| 17 | +**Removing the history helps us keep that information private and stay a bit safer from potential security risks.** |
| 18 | + |
| 19 | + |
| 20 | +## Features |
| 21 | + |
| 22 | +- Full peer-to-peer WebRTC stack in native PHP |
| 23 | +- Implements ICE for NAT traversal and candidate negotiation |
| 24 | +- Secure communication via DTLS and SRTP |
| 25 | +- Reliable data transfer with SCTP and support for data channels |
| 26 | +- RTP/RTCP handling for real-time audio and video streaming |
| 27 | +- Modular design with support for custom signaling implementations |
| 28 | +- Built on top of ReactPHP for asynchronous, non-blocking performance |
| 29 | + |
| 30 | + |
| 31 | +## Requirements |
| 32 | + |
| 33 | +- PHP ≥ 8.4 with FFI and GMP extension enabled |
| 34 | +- OpenSSL development libraries |
| 35 | +- Srtp development libraries |
| 36 | +- Linux environment (Windows/macOS support planned) |
| 37 | + - **Windows users:** Use [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) or Docker Desktop. |
| 38 | + *Note: Native Windows support is planned for an upcoming releases (in a few months.).* |
| 39 | + |
| 40 | + - **macOS users:** Use an emulator like [UTM](https://mac.getutm.app/) or run the project using Docker. |
| 41 | + *Note: Native macOS support is coming in a few months.* |
| 42 | +- FFmpeg/libav shared libraries (libavcodec, libavfilter, etc.) |
| 43 | + - Compatible with FFmpeg **version 7.1.1** |
| 44 | +- libopus development libraries |
| 45 | +- libvpx development libraries |
| 46 | + - Compatible with libvpx **version 1.15.0** |
| 47 | + |
| 48 | +## Documentation |
| 49 | + |
| 50 | +This package is part of the PHP WebRTC library. For complete documentation, examples, and API reference, visit: |
| 51 | + |
| 52 | +[PHP WebRTC Documentation](https://www.quasarstream.com/php-webrtc) |
| 53 | + |
| 54 | +## Credits |
| 55 | + |
| 56 | +### Authors |
| 57 | + |
| 58 | +- **Amin Yazdanpanah** |
| 59 | + - Website: [aminyazdanpanah.com](https://www.aminyazdanpanah.com) |
| 60 | + - Email: [github@aminyazdanpanah.com](mailto:github@aminyazdanpanah.com) |
| 61 | + |
| 62 | +- **Sana Moniri** |
| 63 | + - GtiHub: [sanamoniri](https://github.com/sanamoniri) |
| 64 | + |
| 65 | +## Reporting Issues |
| 66 | + |
| 67 | +Found a bug? Please report it on our [issues](https://github.com/php-webrtc/webrtc/issues). |
| 68 | + |
| 69 | +## Contributors |
| 70 | + |
| 71 | +Your contribution is crucial to our success, regardless of its size. We appreciate your support and encourage you to |
| 72 | +read our **[CONTRIBUTING](https://github.com/php-webrtc/webrtc/blob/master/CONTRIBUTING.md)** |
| 73 | +guide for detailed instructions on how to get involved. Together, we can make a significant impact. |
| 74 | + |
| 75 | +## License |
| 76 | + |
| 77 | +BSD 3-Clause License. See [LICENSE](LICENSE) for details. |
| 78 | + |
| 79 | +## References |
| 80 | + |
| 81 | +- [WebRTC Overview](https://webrtc.org/) |
0 commit comments