webrtc-direct-client 0.2.0

Browser WASM client for WebRTC Direct, connect to a server using only its address and DTLS fingerprint
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#[derive(thiserror::Error, Debug)]
pub enum WebRtcError {
    #[error("browser API unavailable: {0}")]
    BrowserApi(String),
    #[error("js: {0}")]
    Js(String),
}
impl From<JsValue> for WebRtcError {
    fn from(val: JsValue) -> Self {
        WebRtcError::Js(format!("{:?}", val))
    }
}

use wasm_bindgen::prelude::*;