[Unreleased]
[0.1.0] - 2026-11-28
First release. Needs mob_dev 0.7.33 or later in the host app (cpp_archive
isolate_symbols, and the iOS link check that accepts mob_audio_io's C
interface).
MobWebrtc: peer connections on top ofex_webrtc, one API on iOS, Android and the host. Events reach the owner as{:mob_webrtc, peer, event}; descriptions and ICE candidates are JSON-shaped maps, the shapes a browser'sRTCPeerConnectionuses.{:ice_gathering_state, state}andMobWebrtc.local_description/1support signaling without trickle.ex_dtlsandex_libsrtpare statically linked ascpp_archiveNIFs (mob_webrtc_dtls,mob_webrtc_srtp) against a prebuilt libssl / libsrtp2 / libopus bundle (0.2.0, a GitHub release asset pinned by SHA-256 in the manifest) and the OTP runtime's libcrypto.- One DTLS key and certificate per app (
MobWebrtc.KeyCert), made at start, instead of an RSA-2048 key per peer. - Data channels:
MobWebrtc.create_data_channel/3(ordered and reliable unless asked otherwise) andsend_data/4, with owner events{:data_channel, %{ref: ref, label: label}}(a channel the remote side opened),{:data_channel_state, ref, state}and{:data, ref, binary}.send_data/4answers{:error, :not_open},{:error, :unknown_channel}or{:error, :too_large}(over 65,536 bytes) where ex_webrtc would drop the message or crash. Every peer needsex_sctp, linked as a static NIF the host enables inmob.exs(see the README). MobWebrtc.Audio: Opus audio between amob_audio_iostream and RTP (mob_webrtc_audio_nif, one C file for iOS and Android). The microphone (:mic_preset, default:voice) or a test tone is encoded natively and sent; received RTP is decoded into a playout buffer whose target follows the measured arrival jitter (its spread over the last 30 s plus 10 ms, 20–200 ms, not below 60 ms for the first 30 s), draining excess depth with a 2 ms crossfade.set_muted/2sends Opus silence frames with continuous timestamps, so unmuting is instant.stats/1reads back packet and frame counts, underruns, playout depth and target, jitter, and the level and dominant frequency of the audio received.- H264 decode into the
MobWebrtc.VideoViewnative view: VideoToolbox into anAVSampleBufferDisplayLayeron iOS,MediaCodecinto aSurfaceViewon Android, aspect-fit, with frames before an IDR or after a decode error dropped, counted and flaggedneeds_keyframe(:mob_webrtc_video_nif.video_stats/1). MobWebrtc.status/0readback,MobWebrtc.SelfTest(mix mob.selftest), andMobWebrtc.Engine.Fakefor host tests.