MedEx.RTCProvider behaviour (med_ex v0.2.0)

Copy Markdown View Source

Optional RTC port. The legacy facade remains base-owned and preserves %MedEx.Preview{pid, track_id}, with pid the real ExWebRTC peer. A provider neither starts nor owns authoritative recording. Legacy provider is fixed for the VM lifetime; a new provider-aware API may use richer handles.

Summary

Types

peer()

@type peer() :: %{:pid => pid(), :track_id => term(), optional(atom()) => term()}

Callbacks

answer(binary, keyword)

@callback answer(binary(), keyword()) :: {:ok, peer(), binary()} | {:error, term()}

close(peer)

@callback close(peer()) :: :ok

send_opus(peer, binary, non_neg_integer, non_neg_integer)

@callback send_opus(peer(), binary(), non_neg_integer(), non_neg_integer()) :: :ok