From 2595f2ff5a8ebca18193668b1899a0f1130b9146 Mon Sep 17 00:00:00 2001 From: Giang Minh Date: Thu, 15 Feb 2024 22:57:51 +0700 Subject: [PATCH] chore: update docs, README --- README.md | 240 ++++++------------ docs/getting-started/installation/README.md | 23 +- .../installation/single-zone.md | 47 ++-- docs/getting-started/quick-start/rtmp.md | 8 +- .../getting-started/quick-start/webrtc-sdk.md | 22 +- docs/getting-started/quick-start/whip-whep.md | 41 ++- 6 files changed, 177 insertions(+), 204 deletions(-) diff --git a/README.md b/README.md index 52db5c40..c44b61e4 100644 --- a/README.md +++ b/README.md @@ -5,15 +5,15 @@ - - - + + + + + + + License: MIT @@ -24,7 +24,7 @@ # Decentralized Ultra-Low Latency Streaming Server -A decentralized media server designed to handle media streaming on a global scale, making it suitable for large-scale applications but with minimal cost. It is designed with [SAN-I/O](https://sans-io.readthedocs.io/) in mind. +A decentralized media server designed to handle media streaming on a global scale, making it suitable for large-scale applications but with minimal cost. It is developed by 8xFF, a group of independent developers who are passionate about building a new generation of media server and network infrastructure with decentralization in mind. While we have received support from various companies and individuals, we are not affiliated with any specific company. 8xFF is a community-driven project, and we welcome anyone interested in contributing to join us. For a deep dive into the technical aspects of network architecture, please refer to our [Smart-Routing](https://github.com/8xFF/atm0s-sdn/blob/master/docs/smart_routing.md) @@ -33,195 +33,117 @@ For a deep dive into the technical aspects of network architecture, please refer (Above is a demo video of the version used by Bluesea Network) -## Features - - 🚀 Powered by Rust with memory safety and performance. - - High availability by being fully decentralized, with no central controller. - - 🛰️ Multi-zone support, high scalability. - - Support encodings: H264, Vp8, Vp9, H265 (Coming soon), AV1 (Coming soon) - - Cross-platform: Linux, macOS, Windows. - - Decentralized WebRTC SFU (Selective Forwarding Unit) - - Modern, full-featured client SDKs - - [x] [Vanilla JavaScript](https://github.com/8xFF/atm0s-media-sdk-js) - - [x] [Rust](WIP) - - [x] [React](https://github.com/8xFF/atm0s-media-sdk-react) - - [x] [React Native](WIP) - - [ ] Flutter - - [ ] iOS Native - - [ ] Android Native - - Easy to deploy: single binary, Docker, or Kubernetes - - Advanced features including: - - [x] Audio Mix-Minus (WIP) - - [x] Simulcast/SVC - - [x] SFU - - [x] SFU Cascading (each stream is a global PubSub channel, similar to [Cloudflare interconnected network](https://blog.cloudflare.com/announcing-cloudflare-calls/)) - - [ ] Recording - - [x] RTMP - - [x] SIP (WIP) - - [x] WebRTC - - [x] Whip/Whep - -## Getting started -To get started, you can either: -- Start from Docker +## Project Status: Alpha -```bash -docker run --net=host 8xff/atm0s-media-server:latest -``` +This project is currently in the alpha stage of development. It is actively being developed and may undergo significant changes, including changes to the API. The primary focus at this stage is to make the project stable and reliable. -- Download prebuild +Our goals for this project can be summarized as follows: -```bash -wget https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-apple-darwin -``` +- **Goal 1**: Cluster: Create a global decentralized media server cluster with multiple zones, support both SDKs for flexible and mainstream protocols (RTMP, SIP, SRT) for compatibility. +- **Goal 2**: Market: Develop a sharing marketplace for the media server, enabling resource sharing and monetization. This will help scale the media server cluster during peak times and reduce costs during off-peak times. In the feature marketplace fees will be used to fund the development of the project. +- **Goal 3**: P2P Network: Establish a network between users, where servers only act as fallbacks. This approach aims to significantly reduce infrastructure costs and scale to infinity. -- Build from source +Our primary focus is currently on Goal 1. For details on the current phase plan, please refer to our [Roadmap](https://github.com/8xFF/atm0s-media-server/issues/69). -``` -cargo build --release --package atm0s-media-server -``` -- Or using Helm chart +Goals 2 and 3 are in the research phase. For more information, you can visit this [Repository](https://github.com/giangndm/decentralized-p2p-streaming). -```bash -helm repo add 8xff https://8xff.github.io/helm -helm repo update -helm install atm0s-media-stack 8xff/atm0s-media-stack --set gateway.host={host}.{example.com} --namespace atm0s-media --create-namespace -``` - -### Prepare access token - -Any HTTP Request to any server will require an access token. These can be generated using the `token-generate` service's API. -By default, without specifying the cluster `secret`, you can use these pre-generated tokens for the default secret. - -- WHIP: `eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOiJwdWJsaXNoZXIiLCJwcm90b2NvbCI6IldoaXAiLCJwdWJsaXNoIjp0cnVlLCJzdWJzY3JpYmUiOmZhbHNlLCJ0cyI6MTcwMzc1MjI5NDEyMn0.EfRZK7eHMZ-TCG23-jst8TAKVfbiQhX21cxB2mSznAM` - -- WHEP: `eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOm51bGwsInByb3RvY29sIjoiV2hlcCIsInB1Ymxpc2giOmZhbHNlLCJzdWJzY3JpYmUiOnRydWUsInRzIjoxNzAzNzUyMzE1NTgyfQ.6XS0gyZWJ699BUN0rXtlLH-0SvgtMXJeXIDtJomxnig` - -- RTMP: `eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOiJydG1wIiwicHJvdG9jb2wiOiJSdG1wIiwicHVibGlzaCI6dHJ1ZSwic3Vic2NyaWJlIjpmYWxzZSwidHMiOjE3MDM3NTIzMzU2OTV9.Gj0uCxPwqsFfMFLX8Cufrsyhtb7vedNp3GeUtKQCk3s` - -- SDK: `eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOm51bGwsInByb3RvY29sIjoiV2VicnRjIiwicHVibGlzaCI6dHJ1ZSwic3Vic2NyaWJlIjp0cnVlLCJ0cyI6MTcwMzc1MjM1NTI2NH0.llwwbSwVTsyFgL_jYCdoPNVdOiC2jbtNb4uxxE-PU7A` - -Or create with token-generate APIs. To do this, you will need to start the `token-generate` service by: - -``` -atm0s-media-server --http-port 3100 token-generate -``` +## Features -After that, you can go to http://localhost:3100/ui/ to access the Swagger dashboard, from there you can choose the appropriate API to generate a token by yourself. +- 🚀 Powered by Rust with memory safety and performance. +- High availability by being fully decentralized, with no central controller. +- 🛰️ Multi-zone support, high scalability. +- Support encodings: H264, Vp8, Vp9, H265 (Coming soon), AV1 (Coming soon) +- Cross-platform: Linux, macOS, Windows. +- Decentralized WebRTC SFU (Selective Forwarding Unit) +- Modern, full-featured client SDKs + - [x] [Vanilla JavaScript](https://github.com/8xFF/atm0s-media-sdk-js) + - [x] [Rust](WIP) + - [x] [React](https://github.com/8xFF/atm0s-media-sdk-react) + - [x] [React Native](WIP) + - [ ] Flutter + - [ ] iOS Native + - [ ] Android Native +- Easy to deploy: single binary, Docker, or Kubernetes +- Advanced features including: + - [x] Audio Mix-Minus (WIP) + - [x] Simulcast/SVC + - [x] SFU + - [x] SFU Cascading (each stream is a global PubSub channel, similar to [Cloudflare interconnected network](https://blog.cloudflare.com/announcing-cloudflare-calls/)) + - [ ] Recording + - [x] RTMP + - [x] SIP (WIP) + - [x] WebRTC + - [x] Whip/Whep + +## Resources + +- [Summary](./docs/summary.md) +- [Getting Started](./docs/getting-started/README.md) +- [User Guide](./docs/user-guide/README.md) +- [Contributor Guide](./docs/contributor-guide/README.md) +- [RFCs](https://github.com/8xff/RFCs) +- [FAQ](./docs/getting-started/faq.md) + +## Quick Start + +- From Docker -The default cluster secret is `insecure`, you can specify your own cluster secret using the flag `--secret` or with env `SECRET`. For example: ```bash -atm0s-media-server --http-port 3000 --secret supersecret gateway +docker run --net=host ghcr.io/8xff/atm0s-media-server:master:master --help ``` -### Start a webrtc node only +- Download prebuild + +| OS | Arch | Link | +| ----- | ------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| MacOS | aarch64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-apple-darwin) | +| MacOS | x86_64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-apple-darwin) | +| Linux | aarch64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-unknown-linux-gnu) | +| Linux | x86_64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-gnu) | +| Linux | aarch64 musl | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-unknown-linux-musl) | +| Linux | x86_64 musl | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-musl) | -For simple testing, we can start a single node which supports Webrtc for testing with Whip and Whep +- Build from source ``` -atm0s-media-server --http-port 3200 webrtc +cargo build --release --package atm0s-media-server +./target/release/atm0s-media-server --help ``` -After that, we can access `http://localhost:3000/samples` to see all embedded samples - -### Start entire cluster +Run first WebRTC node: -In cluster mode, each module needs to be on a separate node. This setup can run on a single machine or multiple machines, whether they are connected via a public or private network. - -The Gateway node routes user traffic to the most suitable media server node. ```bash -atm0s-media-server --node-id 10 --sdn-port 10010 --http-port 3000 gateway +atm0s-media-server --http-port 3001 --zone-index=101 webrtc ``` -Afterward, the gateway prints out its address in the format: 10@/ip4/127.0.0.1/udp/10010/ip4/127.0.0.1/tcp/10010. This address serves as the seed node for other nodes joining the cluster. +After node1 started it will print out the node address like `101@/ip4/192.168.1.10/udp/10101/ip4/192.168.1.10/tcp/10101`, you can use it as a seed node for other nodes. -The WebRTC node serves users with either an SDK or a Whip, Whep client. -```bash -atm0s-media-server --node-id 21 --http-port 3001 --seeds ABOVE_GATEWAY_ADDR webrtc -``` +Run second WebRTC node: -The RTMP node serves users with an RTMP broadcaster such as OBS or Streamyard. ```bash -atm0s-media-server --node-id 30 --seeds ABOVE_GATEWAY_ADDR rtmp +atm0s-media-server --http-port 3002 --zone-index=102 --seeds FIRST_NODE_ADDR webrtc ``` -The SIP module serves users with a SIP endpoint for integration with telephone providers. -```bash -atm0s-media-server --node-id 40 --seeds ABOVE_GATEWAY_ADDR sip -``` +Now two nodes will form a cluster and can be used for media streaming. -You can now access the sample page at the URL: http://localhost:3000/samples/webrtc/. There, you will find two pages: Whip Broadcast and Whep Viewer. +First media-server: http://localhost:3001/samples/whip/whip.html -Please note that the inner-gateway selects nodes based on usage, routing to the same media-server instance until it reaches high usage. For testing media exchange between systems, you can start more than one WebRTC module as needed. +Second media-server: http://localhost:3002/samples/whep/whep.html -``` -atm0s-media-server --node-id 22 --http-port 3002 --seeds ABOVE_GATEWAY_ADDR webrtc -atm0s-media-server --node-id 23 --http-port 3003 --seeds ABOVE_GATEWAY_ADDR webrtc -``` - -Afterward, you can directly access the samples on each WebRTC node: - -First media-server: http://localhost:3001/samples/ -Second media-server: http://localhost:3002/samples/ -Third media-server: http://localhost:3003/samples/ +You can use [Pregenerated-Token](./docs/getting-started/quick-start/whip-whep.md) to publish and play stream. ![Demo Screen](./docs/imgs/demo-screen.jpg) -Each node also exposes a metric dashboard here: - -- Gateway: http://localhost:3000/dashboard/ -- Media1: http://localhost:3001/dashboard/ -- Media2: http://localhost:3002/dashboard/ -- Media3: http://localhost:3003/dashboard/ +Each node also has embedded monitoring page at `http://localhost:3001/dashboard/` and `http://localhost:3002/dashboard/` ![Monitoring](./docs/imgs/demo-monitor.png) -### Start RTMP session - -Instead of publishing with the Whip client, we can use any RTMP client, such as OBS, to publish to the following stream: - -- Server: `rtmp://RTMP_NODE_IP:1935/live` -- Stream Key: `above generated rtmp token` - -The stream codec should be configured with h264, without B-frames, and with the ultra-low latency option, as shown in the screenshot below. - -![Monitoring](./docs/imgs/demo-rtmp-config.png) - -### Testing with remote server - -Some samples required access to microphone and camera permission, therefore it need to run with https if you want to test with some remote servers. We have 2 options for that: - -- Running gateway or media-server under a reverse proxy like NGINX for providing https -- Start gateway or media-server with `--http-tls` for switching to self-signed https server. - -## Live Demos - - - SDK demos: [TBA]() - - Gather.io Clone: [TBA]() - - Meeting Sample: [TBA]() - - Broadcasting Sample: [TBA]() - -## Docs - -WIP - -## Architecture - -- Global Gateway -- Inner zone gateway -- Media Server -- Connector (connect to custom logic) - -TODO: Diagram - ## Contributing + The project is continuously being improved and updated. We are always looking for ways to make it better, whether that's through optimizing performance, adding new features, or fixing bugs. We welcome contributions from the community and are always looking for new ideas and suggestions. If you find it interesting or believe it could be helpful, we welcome your contributions to the codebase or consider starring the repository to show your support and motivate our team! For more information, you can join our [Discord channel](https://discord.gg/qXr5zxsJWp) -## Roadmap -The first version will be released together with [our Overlay Network](https://github.com/8xFF/atm0s-sdn). -Details on our roadmap can be seen [Roadmap](https://github.com/8xFF/atm0s-media-server/issues/69). - ## License This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. diff --git a/docs/getting-started/installation/README.md b/docs/getting-started/installation/README.md index c7e47c24..f08ecdba 100644 --- a/docs/getting-started/installation/README.md +++ b/docs/getting-started/installation/README.md @@ -1,6 +1,6 @@ # Installation -To install, you can either: +To install, you can either: - Install from Docker @@ -10,19 +10,14 @@ docker run --net=host ghcr.io/8xff/atm0s-media-server:master:master --help - Download prebuild -```bash -wget -``` - -| OS | Arch | Link | -| --- | --- | --- | -| MacOS | aarch64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-apple-darwin) | -| MacOS | x86_64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-apple-darwin) | -| Linux | aarch64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-unknown-linux-gnu) | -| Linux | x86_64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-gnu) | +| OS | Arch | Link | +| ----- | ------------ | ----------------------------------------------------------------------------------------------------------------------------- | +| MacOS | aarch64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-apple-darwin) | +| MacOS | x86_64 | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-apple-darwin) | +| Linux | aarch64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-unknown-linux-gnu) | +| Linux | x86_64 gnu | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-gnu) | | Linux | aarch64 musl | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-aarch64-unknown-linux-musl) | -| Linux | x86_64 musl | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-musl) | - +| Linux | x86_64 musl | [Download](https://github.com/8xFF/atm0s-media-server/releases/download/latest/atm0s-media-server-x86_64-unknown-linux-musl) | - Build from source @@ -39,4 +34,4 @@ Depend on your need, we have some topology to install atm0s-media-server: Or you can use some tools to deploy atm0s-media-server: - [Kubernetes](./kubernetes.md) -- [Docker Compose](./docker-compose.md) \ No newline at end of file +- [Docker Compose](./docker-compose.md) diff --git a/docs/getting-started/installation/single-zone.md b/docs/getting-started/installation/single-zone.md index 867cca81..36108bfe 100644 --- a/docs/getting-started/installation/single-zone.md +++ b/docs/getting-started/installation/single-zone.md @@ -25,13 +25,13 @@ The architecture of a single zone cluster is as follows: Example we have a node index rules like: -| Node type | Index range | -| --- | --- | -| Gateway | [0; 10) | -| SIP | [10; 60) | -| RTMP | [60; 90) | -| Connector | [90; 100) | -| WebRTC | [100 to 255] | +| Node type | Index range | +| --------- | ------------ | +| Gateway | [0; 10) | +| SIP | [10; 60) | +| RTMP | [60; 90) | +| Connector | [90; 100) | +| WebRTC | [100 to 255] | ## Deploy some gateway nodes @@ -45,7 +45,7 @@ docker run -d --name atm0s-media-gateway-1 \ --http-port=8080 \ --sdn-port=10010 \ --zone-index=1 \ - --secret=your-secret \ + --secret=insecure \ gateway ``` @@ -56,7 +56,7 @@ docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --http-port=8080 \ --zone-index=2 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ gateway ``` @@ -71,7 +71,7 @@ WebRTC 1: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=100 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ webrtc ``` @@ -82,7 +82,7 @@ WebRTC 2: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=101 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ webrtc ``` @@ -97,7 +97,7 @@ SIP 1: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=10 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ sip \ --addr SERVER_IP:5060 @@ -109,7 +109,7 @@ SIP 1: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=11 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ sip \ --addr SERVER_IP:5060 @@ -125,7 +125,7 @@ Rtmp 1: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=60 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ sip \ --addr SERVER_IP:5060 @@ -137,7 +137,7 @@ Rtmp 2: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=60 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ sip \ --addr SERVER_IP:5060 @@ -153,12 +153,25 @@ Connector 1: docker run -d --name atm0s-media-gateway-1 \ --net=host ghcr.io/8xff/atm0s-media-gateway:master \ --zone-index=60 \ - --secret=your-secret \ + --secret=insecure \ --seeds FIRST_GATEWAY_ADDR \ connector \ --mq-uri nats://NATS_IP:4222 ``` +## Monitoring + +Each cluster nodes will expose a dashboard and prometheus metrics, you can use it to monitor your cluster. + +Example bellow is gateway node dashboard: `gateway_url/dashboard/` + +![Monitoring](../../imgs/demo-monitor.png) + ## Testing your cluster -Now let testing your cluster by some embded samples or sdk samples \ No newline at end of file +Some samples required access to microphone and camera permission, therefore it need to run with https if you want to test with some remote servers. We have 2 options for that: + +- Running gateway under a reverse proxy like NGINX for providing https +- Start gateway with `--http-tls` for switching to self-signed https server. + +Now let testing your cluster by some embded samples or sdk samples, more info at [Quick Start](../quick-start/README.md) diff --git a/docs/getting-started/quick-start/rtmp.md b/docs/getting-started/quick-start/rtmp.md index b626dda2..a412013f 100644 --- a/docs/getting-started/quick-start/rtmp.md +++ b/docs/getting-started/quick-start/rtmp.md @@ -11,4 +11,10 @@ URL: `rtmp://{gateway}/live/{token}` Demo configuration for OBS: -![Config OBS](../../imgs/demo-rtmp-config.png) \ No newline at end of file +![Config OBS](../../imgs/demo-rtmp-config.png) + +Pregenerated token for default secret and room `demo`, peer `publisher`: + +```jwt +eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOiJydG1wIiwicHJvdG9jb2wiOiJSdG1wIiwicHVibGlzaCI6dHJ1ZSwic3Vic2NyaWJlIjpmYWxzZSwidHMiOjE3MDM3NTIzMzU2OTV9.Gj0uCxPwqsFfMFLX8Cufrsyhtb7vedNp3GeUtKQCk3s +``` diff --git a/docs/getting-started/quick-start/webrtc-sdk.md b/docs/getting-started/quick-start/webrtc-sdk.md index 957c0933..083023d4 100644 --- a/docs/getting-started/quick-start/webrtc-sdk.md +++ b/docs/getting-started/quick-start/webrtc-sdk.md @@ -2,11 +2,17 @@ WebRTC is the most flexible way to interact with the cluster. In this method, we will interact with senders, consumers, and we can create applications with multiple streams. This method is suitable for most use cases. The details can be refer to [8xFF-RFC-0005](https://github.com/8xFF/rfcs/pull/5) -| SDK | Status | Link | -| --- | --- | --- | -| JavaScript | Alpha | [atm0s-media-sdk-js](https://github.com/8xFF/atm0s-media-sdk-js) | -| React | Alpha | [atm0s-media-sdk-react](https://github.com/8xFF/atm0s-media-sdk-react) | -| React Native | WIP | | -| Flutter | TODO | | -| Android | TODO | | -| iOS | TODO | | \ No newline at end of file +| SDK | Status | Link | +| ------------ | ------ | ---------------------------------------------------------------------- | +| JavaScript | Alpha | [atm0s-media-sdk-js](https://github.com/8xFF/atm0s-media-sdk-js) | +| React | Alpha | [atm0s-media-sdk-react](https://github.com/8xFF/atm0s-media-sdk-react) | +| React Native | WIP | | +| Flutter | TODO | | +| Android | TODO | | +| iOS | TODO | | + +### Pregenerated token for default secret and room `demo`, any peer: + +```jwt +eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOm51bGwsInByb3RvY29sIjoiV2VicnRjIiwicHVibGlzaCI6dHJ1ZSwic3Vic2NyaWJlIjp0cnVlLCJ0cyI6MTcwMzc1MjM1NTI2NH0.llwwbSwVTsyFgL_jYCdoPNVdOiC2jbtNb4uxxE-PU7A +``` diff --git a/docs/getting-started/quick-start/whip-whep.md b/docs/getting-started/quick-start/whip-whep.md index dedd5e1a..ebe789c1 100644 --- a/docs/getting-started/quick-start/whip-whep.md +++ b/docs/getting-started/quick-start/whip-whep.md @@ -7,8 +7,39 @@ After prepare token, you can access to media server by using Whip or Whep. SDKs compatible: -| SDK | Status | Link | -| --- | --- | --- | -| medooze/whip-whep-js | TODO | [Repo](https://github.com/medooze/whip-whep-js) | -| Eyevinn/whip | TODO | [Repo](https://github.com/Eyevinn/whip) | -| Eyevinn/webrtc-player | TODO | [Repo](https://github.com/Eyevinn/webrtc-player) | \ No newline at end of file +| SDK | Status | Link | +| --------------------- | ------ | ------------------------------------------------ | +| medooze/whip-whep-js | TODO | [Repo](https://github.com/medooze/whip-whep-js) | +| Eyevinn/whip | TODO | [Repo](https://github.com/Eyevinn/whip) | +| Eyevinn/webrtc-player | TODO | [Repo](https://github.com/Eyevinn/webrtc-player) | + +We embed some simple examples to show how to use Whip to publish and play a stream and Whep to play a stream. + +![Demo Screen](../../imgs/demo-screen.jpg) + +## Whip Sample + +Access from gateway: `{gateway}/samples/webrtc/whip.html` +Access from webrtc media server: `{gateway}/samples/whip.html` + +Whip sample required access to microphone and camera permission, therefore it need to run with https if you want to test with some remote servers. We have 2 options for that: + +- Running gateway or media-server under a reverse proxy like NGINX for providing https +- Start gateway or media-server with `--http-tls` for switching to self-signed https server. + +If you don't sepecifc cluster secret, you can use the following pregenerated token to publish to room `demo`, peer `publisher`: + +```jwt +eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOiJwdWJsaXNoZXIiLCJwcm90b2NvbCI6IldoaXAiLCJwdWJsaXNoIjp0cnVlLCJzdWJzY3JpYmUiOmZhbHNlLCJ0cyI6MTcwMzc1MjI5NDEyMn0.EfRZK7eHMZ-TCG23-jst8TAKVfbiQhX21cxB2mSznAM +``` + +## Whep Sample + +Access from gateway: `{gateway}/samples/webrtc/whep.html` +Access from webrtc media server: `{gateway}/samples/whep.html` + +If you don't sepecifc cluster secret, you can use the following pregenerated token to publish to room `demo`, peer not specific: + +```jwt +eyJhbGciOiJIUzI1NiJ9.eyJyb29tIjoiZGVtbyIsInBlZXIiOm51bGwsInByb3RvY29sIjoiV2hlcCIsInB1Ymxpc2giOmZhbHNlLCJzdWJzY3JpYmUiOnRydWUsInRzIjoxNzAzNzUyMzE1NTgyfQ.6XS0gyZWJ699BUN0rXtlLH-0SvgtMXJeXIDtJomxnig +```