Summary

Types

@type dataProducerType() :: String.t()

https://mediasoup.org/documentation/v3/mediasoup/api/#dataProducer-type "sctp" or "direct"

@type event_type() :: :on_close
Link to this type

sctpStreamParameters()

View Source
@type sctpStreamParameters() :: map()
@type t() :: %Mediasoup.DataProducer{
  id: String.t(),
  pid: pid(),
  sctp_stream_parameters: sctpStreamParameters(),
  type: dataProducerType()
}

Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

@spec close(t()) :: :ok
@spec closed?(t()) :: boolean()
Link to this function

event(data_producer, listener, event_types \\ [:on_close])

View Source
@spec event(t(), pid(), event_types :: [event_type()]) ::
  {:ok} | {:error, :terminated}
@spec id(t()) :: String.t()

Callback implementation for GenServer.init/1.

Link to this function

sctp_stream_parameters(map)

View Source
@spec sctp_stream_parameters(t()) :: sctpStreamParameters()
@spec struct_from_pid(pid()) :: t()
Link to this function

struct_from_pid_and_ref(pid, reference)

View Source
@spec type(t()) :: dataProducerType()