View Source Mediasoup.Worker (mediasoup_elixir v0.14.4)
https://mediasoup.org/documentation/v3/mediasoup/api/#Worker
Summary
Functions
Returns a specification to start this module under a supervisor.
Closes the worker.
Tells whether the given Worker is closed on the local node.
Creates a new router. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-createRouter
Creates a new WebRTC server. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-createWebRtcServer
Dump internal stat for Worker.
Starts observing event.
Worker identifier.
Callback implementation for GenServer.init/1
.
Updates the worker settings in runtime. Just a subset of the worker settings can be updated. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-updateSettings
Types
@type event_type() :: :on_close | :on_dead
@type log_level() :: :debug | :warn | :error | :none
@type log_tag() ::
:info
| :ice
| :dtls
| :rtp
| :srtp
| :rtcp
| :rtx
| :bwe
| :score
| :simulcast
| :svc
| :sctp
| :message
@type start_link_opt() :: {:settings, Mediasoup.Worker.Settings.t() | map()}
@type t() :: pid()
@type update_option() :: %{optional(:logLevel) => log_level(), optional(:logTags) => [log_tag()]} | Mediasoup.Worker.UpdateableSettings.t()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Closes the worker.
Tells whether the given Worker is closed on the local node.
@spec create_router(t(), Mediasoup.Router.create_option()) :: {:ok, Mediasoup.Router.t()} | {:error}
Creates a new router. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-createRouter
Creates a new WebRTC server. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-createWebRtcServer
Dump internal stat for Worker.
@spec event(t(), pid(), event_types :: [event_type()]) :: {:ok} | {:error, :terminated}
Starts observing event.
Worker identifier.
Callback implementation for GenServer.init/1
.
@spec start_link([start_link_opt()]) :: :ignore | {:error, any()} | {:ok, pid()}
@spec update_settings(t(), update_option()) :: {:ok} | {:error}
Updates the worker settings in runtime. Just a subset of the worker settings can be updated. https://mediasoup.org/documentation/v3/mediasoup/api/#worker-updateSettings
@spec worker_count() :: non_neg_integer()