View Source Mediasoup.PipeTransport (mediasoup_elixir v0.14.0)
https://mediasoup.org/documentation/v3/mediasoup/api/#PipeTransport
Summary
Functions
Returns a specification to start this module under a supervisor.
Closes the PipeTransport.
Tells whether the given PipeTransport is closed on the local node.
Provides the pipe RTP transport with the remote parameters. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-connect
Instructs the router to send audio or video RTP (or SRTP depending on the transport class). This is the way to extract media from mediasoup. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-consume
Instructs the router to send data messages to the endpoint via SCTP protocol or directly to the Rust process if the transport is a DirectTransport. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-consumedata
Dump internal stat for PipeTransport.
Starts observing event.
Returns current RTC statistics of the pipe transport. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-getStats
PipeTransport identifier.
Instructs the router to receive audio or video RTP (or SRTP depending on the transport class). This is the way to inject media into mediasoup. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-produce
Instructs the router to receive data messages. Those messages can be delivered by an endpoint via SCTP protocol or can be directly sent from the Node.js application if the transport is a DirectTransport. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-producedata
Local SCTP parameters. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-sctpParameters
Current SCTP state. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-sctpState
Local SRTP parameters representing the crypto suite and key material used to encrypt sending RTP and SRTP. Those parameters must be given to the paired pipeTransport in the connect() method. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-srtpParameters
The transport tuple. It refers to both RTP and RTCP since pipe transports use RTCP-mux by design. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-tuple
Types
@type connect_option() :: %{ :ip => String.t(), :port => integer(), optional(:srtpParameters) => srtp_parameters_t() | nil }
@type event_type() :: :on_close | :on_sctp_state_change | :on_tuple
https://mediasoup.org/documentation/v3/mediasoup/api/#TransportTuple
@type sctp_parameters_t() :: map()
https://mediasoup.org/documentation/v3/mediasoup/sctp-parameters/#SctpParameters
@type srtp_parameters_t() :: map()
https://mediasoup.org/documentation/v3/mediasoup/srtp-parameters/#SrtpParameters
@type transport_stat() :: map()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec close(t()) :: :ok
Closes the PipeTransport.
Tells whether the given PipeTransport is closed on the local node.
@spec connect(t(), option :: connect_option()) :: {:ok} | {:error, String.t() | :terminated}
Provides the pipe RTP transport with the remote parameters. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-connect
@spec consume(t(), Mediasoup.Consumer.Options.t() | map()) :: {:ok, Mediasoup.Consumer.t()} | {:error, String.t() | :terminated}
Instructs the router to send audio or video RTP (or SRTP depending on the transport class). This is the way to extract media from mediasoup. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-consume
@spec consume_data(t(), Mediasoup.DataConsumer.Options.t() | map()) :: {:ok, Mediasoup.DataConsumer.t()} | {:error, String.t() | :terminated}
Instructs the router to send data messages to the endpoint via SCTP protocol or directly to the Rust process if the transport is a DirectTransport. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-consumedata
Dump internal stat for PipeTransport.
event(transport, listener, event_types \\ [:on_close, :on_sctp_state_change, :on_tuple])
View Source@spec event(t(), pid(), event_types :: [event_type()]) :: {:ok} | {:error, :terminated}
Starts observing event.
@spec get_stats(t()) :: [transport_stat()] | {:error, :terminated}
Returns current RTC statistics of the pipe transport. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-getStats
PipeTransport identifier.
@spec produce(t(), Mediasoup.Producer.Options.t() | map()) :: {:ok, Mediasoup.Producer.t()} | {:error, String.t() | :terminated}
Instructs the router to receive audio or video RTP (or SRTP depending on the transport class). This is the way to inject media into mediasoup. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-produce
@spec produce_data(t(), Mediasoup.DataProducer.Options.t() | map()) :: {:ok, Mediasoup.DataProducer.t()} | {:error, String.t() | :terminated}
Instructs the router to receive data messages. Those messages can be delivered by an endpoint via SCTP protocol or can be directly sent from the Node.js application if the transport is a DirectTransport. https://mediasoup.org/documentation/v3/mediasoup/api/#transport-producedata
@spec sctp_parameters(t()) :: sctp_parameters_t() | {:error, :terminated}
Local SCTP parameters. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-sctpParameters
Current SCTP state. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-sctpState
@spec srtp_parameters(t()) :: srtp_parameters_t() | {:error, :terminated}
Local SRTP parameters representing the crypto suite and key material used to encrypt sending RTP and SRTP. Those parameters must be given to the paired pipeTransport in the connect() method. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-srtpParameters
@spec tuple(t()) :: TransportTuple.t() | {:error, :terminated}
The transport tuple. It refers to both RTP and RTCP since pipe transports use RTCP-mux by design. https://mediasoup.org/documentation/v3/mediasoup/api/#pipeTransport-tuple