A track published by a remote participant.
More...
#include <remote_track_publication.h>
|
|
| RemoteTrackPublication (const proto::OwnedTrackPublication &owned) |
| | Note, this RemoteTrackPublication is constructed internally only; safe to accept proto::OwnedTrackPublication.
|
| |
| bool | subscribed () const noexcept |
| | Returns the locally recorded subscription state.
|
| |
| void | setSubscribed (const bool subscribed) |
| | Changes the desired subscription state for this publication.
|
| |
| bool | enabled () const noexcept |
| | Returns whether media delivery is enabled for this publication.
|
| |
| bool | setEnabled (const bool enabled) |
| | Enables or disables media delivery for this publication.
|
| |
| VideoQuality | videoQuality () const noexcept |
| | Returns the requested maximum simulcast quality.
|
| |
| bool | setVideoQuality (const VideoQuality quality) |
| | Requests the maximum simulcast quality to receive.
|
| |
| bool | setVideoDimensions (const std::uint32_t width, const std::uint32_t height) |
| | Requests the maximum video dimensions to receive for this publication.
|
| |
|
| TrackPublication (const TrackPublication &)=delete |
| |
|
TrackPublication & | operator= (const TrackPublication &)=delete |
| |
|
| TrackPublication (TrackPublication &&) noexcept=default |
| |
|
TrackPublication & | operator= (TrackPublication &&) noexcept=default |
| |
|
const std::string & | sid () const noexcept |
| |
|
const std::string & | name () const noexcept |
| |
|
TrackKind | kind () const noexcept |
| |
|
TrackSource | source () const noexcept |
| |
|
bool | simulcasted () const noexcept |
| |
|
std::uint32_t | width () const noexcept |
| |
|
std::uint32_t | height () const noexcept |
| |
|
const std::string & | mimeType () const noexcept |
| |
|
bool | muted () const noexcept |
| |
|
void | setMuted (bool muted) noexcept |
| |
|
EncryptionType | encryptionType () const noexcept |
| |
|
const std::vector< AudioTrackFeature > & | audioFeatures () const noexcept |
| |
|
uintptr_t | ffiHandleId () const noexcept |
| | Underlying FFI handle value.
|
| |
|
std::shared_ptr< Track > | track () const noexcept |
| | Associated Track (if attached).
|
| |
|
void | setTrack (const std::shared_ptr< Track > &track) noexcept |
| |
|
|
| TrackPublication (FfiHandle handle, std::string sid, std::string name, TrackKind kind, TrackSource source, bool simulcasted, std::uint32_t width, std::uint32_t height, std::string mime_type, bool muted, EncryptionType encryption_type, std::vector< AudioTrackFeature > audio_features) |
| |
|
FfiHandle | handle_ |
| |
|
std::shared_ptr< Track > | track_ |
| |
|
std::string | sid_ |
| |
|
std::string | name_ |
| |
|
TrackKind | kind_ |
| |
|
TrackSource | source_ |
| |
|
bool | simulcasted_ {false} |
| |
|
std::uint32_t | width_ {0} |
| |
|
std::uint32_t | height_ {0} |
| |
|
std::string | mime_type_ |
| |
|
bool | muted_ {false} |
| |
|
EncryptionType | encryption_type_ |
| |
|
std::vector< AudioTrackFeature > | audio_features_ |
| |
A track published by a remote participant.
◆ enabled()
| bool livekit::RemoteTrackPublication::enabled |
( |
| ) |
const |
|
inlinenoexcept |
Returns whether media delivery is enabled for this publication.
- Returns
- True if media delivery is enabled.
◆ setEnabled()
| bool livekit::RemoteTrackPublication::setEnabled |
( |
const bool |
enabled | ) |
|
Enables or disables media delivery for this publication.
Disabling a subscribed publication reduces bandwidth without changing its desired subscription state.
- Parameters
-
| enabled | True to enable media delivery; false to disable it. |
- Returns
- True if an update was sent; false if the state is unchanged or the publication is not subscribed.
- Exceptions
-
| std::runtime_error | if the publication has an invalid FFI handle or the FFI request fails. |
◆ setSubscribed()
| void livekit::RemoteTrackPublication::setSubscribed |
( |
const bool |
subscribed | ) |
|
Changes the desired subscription state for this publication.
- Parameters
-
| subscribed | True to subscribe; false to unsubscribe. |
- Exceptions
-
| std::runtime_error | if the publication has an invalid FFI handle or the FFI request fails. |
◆ setVideoDimensions()
| bool livekit::RemoteTrackPublication::setVideoDimensions |
( |
const std::uint32_t |
width, |
|
|
const std::uint32_t |
height |
|
) |
| |
Requests the maximum video dimensions to receive for this publication.
The server selects the closest available simulcast or scalable-video layer. This overrides a previous call to setVideoQuality(). Repeating the current dimensions does not send another request.
- Parameters
-
| width | Requested maximum width in pixels. Must be greater than zero. |
| height | Requested maximum height in pixels. Must be greater than zero. |
- Returns
- True if an update was sent; false if the dimensions are unchanged or the publication is not a subscribed video track.
- Exceptions
-
| std::runtime_error | if the publication has an invalid FFI handle or the FFI request fails. |
◆ setVideoQuality()
| bool livekit::RemoteTrackPublication::setVideoQuality |
( |
const VideoQuality |
quality | ) |
|
Requests the maximum simulcast quality to receive.
This overrides a previous call to setVideoDimensions().
- Parameters
-
| quality | Maximum acceptable simulcast quality. |
- Returns
- True if an update was sent; false if the quality is unchanged or the publication is not a subscribed, simulcasted video track.
- Exceptions
-
| std::runtime_error | if the publication has an invalid FFI handle or the FFI request fails. |
◆ subscribed()
| bool livekit::RemoteTrackPublication::subscribed |
( |
| ) |
const |
|
inlinenoexcept |
Returns the locally recorded subscription state.
- Returns
- True if the publication is marked as subscribed.
◆ videoQuality()
| VideoQuality livekit::RemoteTrackPublication::videoQuality |
( |
| ) |
const |
|
inlinenoexcept |
Returns the requested maximum simulcast quality.
- Returns
- The requested quality, or
VideoQuality::HIGH when dimensions are preferred.
The documentation for this class was generated from the following file: