Specter
View SourceSpecter is a wrapper for webrtc.rs as an Elixir NIF, using Rustler.
This library is a low-level interface to the data structures and entities provided by Rust, with a minimal set of opinions.
Installation
def deps do
[
{:specter, "~> 0.1"}
]
endChecklist
- [x]
Specter.init/1takes (opts)- opts: (
ice_servers)
- opts: (
- [x]
Specter.config/1(ref), returningSpecter.Config.t() - [x]
Specter.new_media_engine/1(ref), returning UUID - [x]
Specter.new_registry/2(ref, uuid), returning UUID - [x]
Specter.new_api/3(ref, uuid, uuid), returning UUID- arg1: media engine uuid
- arg2: registry uuid
- [x]
Specter.PeerConnection.new/2(ref, uuid), returning UUID- arg1: api builder uuid
- [x]
Specter.PeerConnection.close/2(ref, uuid) - [x]
Specter.PeerConnection.set_remote_description/3(ref, uuid, json) - [x]
Specter.PeerConnection.create_offer/3(ref, uuid, opts)- opts: (
voice_activity_detection:bool,ice_restart:bool)
- opts: (
- [x]
Specter.PeerConnection.create_data_channel/3(ref, uuid, label) - [x]
Specter.PeerConnection.create_answer/3(ref, uuid, opts)- opts: (
voice_activity_detection:bool)
- opts: (
- [x]
Specter.PeerConnection.set_local_description/3(ref, uuid, json) - [x]
Specter.PeerConnection.current_local_description/2 - [x]
Specter.PeerConnection.pending_local_description/2 - [x]
Specter.PeerConnection.local_description/2 - [x]
pc.on_ice_candidatesends candidate to callback process - [x]
Specter.PeerConnection.add_ice_candidate/3(ref, uuid, string) - [x]
Specter.PeerConnection.current_remote_description/2 - [x]
Specter.PeerConnection.pending_remote_description/2 - [x]
Specter.PeerConnection.remote_description/2 - [x]
Specter.PeerConnection.ice_connection_state/2 - [x]
Specter.PeerConnection.ice_gathering_state/2 - [x]
Specter.PeerConnection.signaling_state/2 - [x]
Specter.PeerConnection.connection_state/2 - [x]
Specter.PeerConnection.get_stats/2 - [ ] pc state changes sent to Elixir pid
- [ ]
pc.gathering_complete_promisesends message to callback process- might not want to impement this
- [ ]
Specter.close(ref, uuid) - [ ] RTC metrics sent to Elixir
- [ ]
Specter.add_track(ref, uuid, ?) - [ ]
Specter.remove_track(ref, uuid, ?)
Development
Development of Specter depends on Elixir, Erlang, and Rust being available in the environment.
Suggested setup:
asdf plugin-add erlang
asdf plugin-add elixir
asdf plugin-add rust
bin/dev/doctor
CI will run tests and audit the repository, but to make sure all checks locally, the following commands can be run:
bin/dev/audit
bin/dev/test
The following script is encouraged to run all checks as a part of pushing commits:
bin/dev/shipit
References / Thank yous
This project is indebted to the following sites and references (at the very least).