View Source Mediasoup.PlainTransport (mediasoup_elixir v0.14.4)
https://mediasoup.org/documentation/v3/mediasoup/api/#PlainTransport
Summary
Functions
Returns a specification to start this module under a supervisor.
Closes the PlainTransport.
Tells whether the given PlainTransport is closed on the local node.
Provides the plain transport with the endpoint parameters. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-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
Starts observing event.
Returns current RTC statistics of the WebRTC transport. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-getStats
PlainTransport 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
Local SCTP parameters. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-sctpParameters
Current SCTP state. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-sctpState
Local SRTP parameters representing the crypto suite and key material used to encrypt sending RTP and SRTP. Note that, if comedia mode is set, these local SRTP parameters may change after calling connect() with the remote SRTP parameters (to override the local SRTP crypto suite with the one given in connect(). https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-srtpParameters
The transport tuple. If RTCP-mux is enabled (rtcpMux is set), this tuple refers to both RTP and RTCP. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-tuple
Types
@type connect_option() :: map()
@type create_option() :: map() | Mediasoup.PlainTransport.Options.t()
@type event_type() :: :on_close | :on_tuple | :on_sctp_state_change
@type transport_stat() :: map()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
@spec close(t()) :: :ok
Closes the PlainTransport.
Tells whether the given PlainTransport is closed on the local node.
@spec connect(t(), connect_option()) :: {:ok} | {:error, String.t() | :terminated}
Provides the plain transport with the endpoint parameters. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-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
event(transport, listener, event_types \\ [:on_close, :on_tuple, :on_sctp_state_change])
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 WebRTC transport. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-getStats
PlainTransport 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
Local SCTP parameters. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-sctpParameters
Current SCTP state. Or undefined if SCTP is not enabled. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-sctpState
Local SRTP parameters representing the crypto suite and key material used to encrypt sending RTP and SRTP. Note that, if comedia mode is set, these local SRTP parameters may change after calling connect() with the remote SRTP parameters (to override the local SRTP crypto suite with the one given in connect(). https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-srtpParameters
@spec tuple(t()) :: TransportTuple.t() | {:error, :terminated}
The transport tuple. If RTCP-mux is enabled (rtcpMux is set), this tuple refers to both RTP and RTCP. https://mediasoup.org/documentation/v3/mediasoup/api/#plainTransport-tuple