a Python extension that provides bindings to WebRTC M92
Project description
A Python extension that provides bindings to WebRTC M92
Examples
•
Documentation
•
PyPI
Python WebRTC
Let's use the native WebRTC with strict compatibility and fully implemented stuff!
This project follows the W3C specification with some modifications and additions to make it work better with Python applications, with useful APIs like programmatic audio and video.
DISCLAIMER
This project is still under development and isn't ready for any serious use. In the current stage, it's possible to establish connection and work with audio, but many interfaces and methods not implemented yet.
You can easily check status of methods and interfaces availability here.
Snippet
import asyncio
import webrtc
async def main():
pc = webrtc.RTCPeerConnection()
stream = webrtc.get_user_media()
for track in stream.get_tracks():
pc.add_track(track, stream)
audio_source = webrtc.RTCAudioSource()
track = audio_source.create_track()
pc.add_track(track)
local_sdp = await pc.create_offer()
print(local_sdp.sdp)
if __name__ == '__main__':
asyncio.run(main())
Requirements
Pre-built wheels:
- Python 3.7 or higher
- pip 21 or higher
- And compatible platform:
Linux | macOS | Windows | |||||
---|---|---|---|---|---|---|---|
armv7l | arm64 | x86_64 | Intel | Apple Silicon | 64bit | ||
Python | 3.7 | N/A | N/A | ✅ | ✅ | N/A | ✅ |
3.8 | N/A | N/A | ✅ | ✅ | ✅ | ✅ | |
3.9 | N/A | N/A | ✅ | ✅ | ✅ | ✅ | |
3.10 | N/A | N/A | ✅ | ✅ | ✅ | ✅ |
Building from sources (sdist):
- ~15 GB of free disk space
- CMake 3.14 or higher
- GCC 7.5 or higher
- glibc 2.18 or higher
- ARM toolchain (ARM only)
Full building instruction will be present later
Installing
Pre-built wheel:
pip3 install --pre wrtc
Build from sources:
pip3 install --pre wrtc --no-binary wrtc
Documentation
The documentation is live at readthedocs.io.
Getting help
You can get help in several ways:
- Report bugs, request new features by creating an issue.
- Ask questions by starting a discussion.
Contributing
Contributions of any sizes are welcome.
Special thanks to
- Authors of node-webrtc.
License
The python-webrtc
is published under the BSD 3-Clause License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for wrtc-0.0.0.dev9-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c5c70d841c366e8c98ba244739e899a11ec25b7b8820249f2d862ae22e7f373 |
|
MD5 | 646565e34bbec7d1acda236da52fd4a0 |
|
BLAKE2b-256 | 9a0f5e363c718bd4c953c5eddeaf9475fa7033e377290ff0c020d753a0f67a16 |
Hashes for wrtc-0.0.0.dev9-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79f454e0b90dafdcc3477899e67286deb724601877632395607b39b6fa1fb26e |
|
MD5 | f7a4502bc2ff48e44b1f6fa43f403974 |
|
BLAKE2b-256 | 0cac2b9d14c33e8559e57c516e84df0c371297287576fed1b1035baf0e671d39 |
Hashes for wrtc-0.0.0.dev9-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fde21931e0b85ef59c896d13127bb14e06910a2a9f48ec7bd3d652af7125d278 |
|
MD5 | 684eaf1e5bb43322bb3d8a4fe726b0d6 |
|
BLAKE2b-256 | c8b23375bf820da65f82781de6a788f70a3d93c5f34f6a04d6ff9e19e58bd19c |
Hashes for wrtc-0.0.0.dev9-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e798c05d100a51d4d0c6b20a0a47c0731e9893dc9e5b078abef944e88721cb34 |
|
MD5 | 1fd566e0530aebdb63fa0073b0ad5aa1 |
|
BLAKE2b-256 | 8e8c6338a29c377a5ff58cecde39d575b5bc1686984ac4d9f99670e4b73c0471 |
Hashes for wrtc-0.0.0.dev9-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae86119560e409951fe01eba2a07af4a19fb5c9891ccda06e858dbb3d850a412 |
|
MD5 | 514cf77ef991846dd8dd7e17ced1d8de |
|
BLAKE2b-256 | 736d4c228c739d46b7771734d2f03b8d8c357e333de9e8c928cec57cca24fe5a |
Hashes for wrtc-0.0.0.dev9-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 465148c0d45c20f9461d2db70b33f70fe58375aaf76417eaee60af5388fe50a0 |
|
MD5 | b4bcc09d11906892a5824021e91f53bf |
|
BLAKE2b-256 | 6689773c85cb87d9008e457b5fa5453f8882cdba080b2c84f6fdae079f3e34c6 |
Hashes for wrtc-0.0.0.dev9-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce61001215746b41feff84a8a14283106b4d8479efc32b79ddc3e37e70b0ed12 |
|
MD5 | 73e73fb8f7a3a18ba12139b71f0553c7 |
|
BLAKE2b-256 | 747b4879894d3d692b4c0341045f6d7e5896fcc2eeb8b63d79985280b822a360 |
Hashes for wrtc-0.0.0.dev9-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1417d962d2712c9d27108a62e022d11a908bc7e6589ac283e578136168fce672 |
|
MD5 | 3a19f23d78684dc131ca3997d720f099 |
|
BLAKE2b-256 | 91651841254e6ba5a877e18834190832ad6f8f93693042e3ca63072f1a61b21f |
Hashes for wrtc-0.0.0.dev9-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdb4d63b5d08419fca8cacff52ca922d6a1ee9cab91c23577b37ce9cefd63ad |
|
MD5 | b1eea6d37d6844edf7bfc4b188dec977 |
|
BLAKE2b-256 | 705cf5bb837d4b76675bcd23ec12e7e8c963c98df0d9a28ab078a344eeeaa246 |
Hashes for wrtc-0.0.0.dev9-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d9458754124f8b800720cab154be457a38d1256eab13d9c29fa31e9a4562f9f |
|
MD5 | a15970bc446660e7d98cba77f4df1cdf |
|
BLAKE2b-256 | 6c89579c941d6a1364b4ca186343fd3b8dd883227a71fe0dd2879a74c12fd35e |
Hashes for wrtc-0.0.0.dev9-cp38-cp38-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e145f8e7494b67a838e63ba36b5846f23e3f39d474f839e2617188335f632d42 |
|
MD5 | 64c48985f0de2385678157b5c4660752 |
|
BLAKE2b-256 | 7566812a8b7673b151dd78831489ae3fc9fc4834d6ad3b3ef303cf5c61c9998f |
Hashes for wrtc-0.0.0.dev9-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d168ba88801bd3dbe32753ee567b805c91000b521aec1e41adb79083aef6ed3 |
|
MD5 | c4297457a4f0974161311c164eebe1d4 |
|
BLAKE2b-256 | cfb9073a49b4dbc26c6fca282f81b429aed34003680f6f46c732e4a0efca03b0 |
Hashes for wrtc-0.0.0.dev9-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51076e25580bc72442a6a3ce3b4e44e707445470a30db1819d28e848b716fca0 |
|
MD5 | 07919262d60a27c4b23050a8e7f5e9df |
|
BLAKE2b-256 | ae22418b3a7976896798b5e926c5295a5c19167f9243ccbdc6c7132c20f7ac50 |
Hashes for wrtc-0.0.0.dev9-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c90556b9cd1697a87ebc1b2cbf953c1b3f5560c4b0c84ef2f4ad26e1d73ed06b |
|
MD5 | fcdcbe270f069bbdb21eb2a59428c40d |
|
BLAKE2b-256 | 4cdb3cd124fcfb94d940e523f3640eda0181c23aa3727a62e9e739e6bc624b64 |
Hashes for wrtc-0.0.0.dev9-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c725f161c974f3cae6dad579daefae0f5e5132b293af4e90897654eb0bdab53 |
|
MD5 | c17baf86af3d5bc1e5af1576a23cad32 |
|
BLAKE2b-256 | 79f1a33277acafb9a62de29828b5cae8aea8fb16d88c9002285abd943a4e6430 |