Skip to content

Commit

Permalink
Merge pull request #298 from networked-aframe/multi-streams
Browse files Browse the repository at this point in the history
Additional changes for Multiple video streams for the easyrtc adapter
  • Loading branch information
vincentfretin committed Oct 31, 2021
2 parents 00501a7 + 296f492 commit 265ee37
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 27 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ List of the supported adapters:
| Adapter | Description | Supports Audio/Video | WebSockets or WebRTC | How to start |
| -------- | ----------- | ------------- | ----------- | ---------- |
| wseasyrtc | DEFAULT - Uses the [open-easyrtc](https://github.com/open-easyrtc/open-easyrtc) library | No | WebSockets | `npm run dev` |
| easyrtc | Uses the [open-easyrtc](https://github.com/open-easyrtc/open-easyrtc) library | Audio and Camera (no screen share) | WebRTC | `npm run dev` |
| janus | Uses the [Janus WebRTC server](https://github.com/meetecho/janus-gateway) and [janus-plugin-sfu](https://github.com/mozilla/janus-plugin-sfu) | Audio and Video (camera or screen share) | WebRTC | See [naf-janus-adapter](https://github.com/networked-aframe/naf-janus-adapter/tree/3.0.x) |
| easyrtc | Uses the [open-easyrtc](https://github.com/open-easyrtc/open-easyrtc) library | Audio and Video (camera and screen share) | WebRTC | `npm run dev` |
| janus | Uses the [Janus WebRTC server](https://github.com/meetecho/janus-gateway) and [janus-plugin-sfu](https://github.com/mozilla/janus-plugin-sfu) | Audio and Video (camera OR screen share) | WebRTC | See [naf-janus-adapter](https://github.com/networked-aframe/naf-janus-adapter/tree/3.0.x) |
| socketio | SocketIO implementation without external library (work in progress, currently no maintainer) | No | WebSockets | `npm run dev-socketio` |
| webrtc | Native WebRTC implementation without external library (work in progress, currently no maintainer) | Audio | WebRTC | `npm run dev-socketio` |
| Firebase | [Firebase](https://firebase.google.com/) for WebRTC signalling (currently no maintainer) | No | WebRTC | See [naf-firebase-adapter](https://github.com/networked-aframe/naf-firebase-adapter) |
Expand Down Expand Up @@ -417,6 +417,24 @@ NAF.connection.adapter.enableCamera(enabled)

where `enabled` is `true` or `false`.

With the easyrtc adapter, you can add an additional video track like a screen
share with the `addLocalMediaStream` and `removeLocalMediaStream` API:

```javascript
navigator.mediaDevices.getDisplayMedia().then((stream) => {
NAF.connection.adapter.addLocalMediaStream(stream, "screen");
});
```

```javascript
NAF.connection.adapter.removeLocalMediaStream("screen");
```

See the [Multi Streams](https://github.com/networked-aframe/networked-aframe/blob/master/examples/basic-multi-streams.html) example
that uses a second plane with `networked-video-source="streamName: screen"` to
show the screen share to the other participants.
Be sure to look at the comments at the end of the html file of this example for known issues.

### Misc

```javascript
Expand Down

0 comments on commit 265ee37

Please sign in to comment.