Membrane.RTC.Engine.Endpoint (Membrane RTC Engine v0.24.0)

View Source

Module representing RTC Engine's endpoint.

For specific information about possible endpoints, refer to the documentation of Membrane.RTC.Engine.

Summary

Types

t()

Module representing RTC Engine's endpoint.

Types

id()

@type id() :: any()

t()

@type t() :: %Membrane.RTC.Engine.Endpoint{
  id: id(),
  inbound_tracks: %{
    required(Membrane.RTC.Engine.Track.id()) => Membrane.RTC.Engine.Track.t()
  },
  metadata: any(),
  type: type()
}

Module representing RTC Engine's endpoint.

This module contains:

  • id - id of the endpoint.
  • type - type of the endpoint.
  • metadata - metadata of the endpoint, assigned when engine receives {:ready, metadata} message from the endpoint.
  • inbound_tracks - inbound tracks (received by the endpoint from "outside" of the engine) of the endpoint.

type()

@type type() :: module()

Functions

get_active_track_metadata(endpoint)

@spec get_active_track_metadata(endpoint :: t()) :: %{
  required(Membrane.RTC.Engine.Track.id()) => any()
}

get_active_tracks(endpoint)

@spec get_active_tracks(endpoint :: t()) :: [Membrane.RTC.Engine.Track.t()]

get_audio_tracks(endpoint)

@spec get_audio_tracks(endpoint :: t()) :: [Membrane.RTC.Engine.Track.t()]

get_track_by_id(endpoint, id)

@spec get_track_by_id(endpoint :: t(), id :: Membrane.RTC.Engine.Track.id()) ::
  Membrane.RTC.Engine.Track.t() | nil

get_tracks(endpoint)

@spec get_tracks(endpoint :: t()) :: [Membrane.RTC.Engine.Track.t()]

get_video_tracks(endpoint)

@spec get_video_tracks(endpoint :: t()) :: [Membrane.RTC.Engine.Track.t()]

new(id, type, inbound_tracks)

@spec new(
  id :: id(),
  type :: type(),
  inbound_tracks :: [Membrane.RTC.Engine.Track.t()]
) :: t()

update_track_disabled_variants(endpoint, track_id, value)

@spec update_track_disabled_variants(
  endpoint :: t(),
  track_id :: Membrane.RTC.Engine.Track.id(),
  disabled_variants :: [Membrane.RTC.Engine.Track.variant()]
) :: t()

update_track_encoding(endpoint, track_id, value)

@spec update_track_encoding(
  endpoint :: t(),
  track_id :: Membrane.RTC.Engine.Track.id(),
  encoding :: atom()
) :: t()

update_track_metadata(endpoint, track_id, metadata)

@spec update_track_metadata(
  endpoint :: t(),
  track_id :: Membrane.RTC.Engine.Track.id(),
  metadata :: any()
) :: t()