Current section

Files

Jump to
membrane_rtc_engine lib membrane_rtc_engine events request_track_variant.ex
Raw

lib/membrane_rtc_engine/events/request_track_variant.ex

defmodule Membrane.RTC.Engine.Event.RequestTrackVariant do
@moduledoc """
Event for changing track variant that is currently being received.
Sending this event will cause the engine to send a keyframe request
event to the track origin. Once the engine receives a keyframe
for the requested track variant, it will start forwarding it to
the requester.
If the requested track variant becomes inactive before being delivered
it has to be re-requested when it becomes active again.
See also `Membrane.RTC.Engine.Event.TrackVariantSwitched`.
"""
alias Membrane.RTC.Engine.Track
@derive Membrane.EventProtocol
@typedoc """
Type describing RequestTrackVariant event.
* `variant` - track variant to receive
"""
@type t() :: %__MODULE__{variant: Track.variant()}
@enforce_keys [:variant]
defstruct @enforce_keys
end