Packages
membrane_rtc_engine
0.18.0
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.19.0
0.18.0
0.17.1
0.17.0
0.16.0
0.15.1
0.15.0
0.14.2
0.14.1
0.14.0
0.13.0
0.12.1
0.12.0
0.11.0
0.10.3
0.10.2
0.10.1
0.10.0
0.9.1
0.9.0
0.8.2
0.8.1
0.8.0
0.7.0
0.6.0
0.5.1
0.5.0
0.4.1
0.4.0
0.3.2
0.3.1
0.3.0
0.2.0
0.1.0
0.1.0-alpha.2
0.1.0-alpha.1
0.1.0-alpha
Membrane RTC Engine and its client library
Current section
Files
Jump to
Current section
Files
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
* `reason` - reason of the request. It will be repeated in
`Membrane.RTC.Engine.Event.TrackVariantSwitched`. Defaults to `nil`.
"""
@type t() :: %__MODULE__{variant: Track.variant(), reason: atom() | nil}
@enforce_keys [:variant]
defstruct @enforce_keys ++ [reason: nil]
end