MobWebrtc.SelfTest (mob_webrtc v0.1.0)

Copy Markdown View Source

The plugin's on-device proof (Mob.Plugin.SelfTest), run by mix mob.selftest. Each step needs a real answer from native code:

  1. both static NIFs (ex_dtls, ex_libsrtp) loaded;
  2. a DTLS-SRTP handshake between two in-memory ExDTLS peers agrees on a profile and on the keying material;
  3. ExLibSRTP protects an RTP packet with those keys and the other side unprotects it to the same bytes;
  4. two MobWebrtc peers in this BEAM connect over real UDP on the device's interfaces, and an RTP packet sent on one arrives on the other.

No hardware or user action is needed, so it never skips.