added prelude & cleaned imports (#27)
* wip * wip * wip * wip * wip * wip
This commit is contained in:
+7
-17
@@ -1,12 +1,6 @@
|
||||
use self::participant::ConnectionQuality;
|
||||
use self::room_session::{ConnectionState, RoomSession, SessionHandle};
|
||||
use crate::proto::data_packet;
|
||||
use crate::room::id::TrackSid;
|
||||
use crate::room::participant::remote_participant::RemoteParticipant;
|
||||
use crate::room::participant::Participant;
|
||||
use crate::room::publication::RemoteTrackPublication;
|
||||
use crate::room::publication::TrackPublication;
|
||||
use crate::room::track::remote_track::RemoteTrackHandle;
|
||||
use crate::prelude::*;
|
||||
use crate::participant::ConnectionQuality;
|
||||
use crate::proto;
|
||||
use crate::rtc_engine::EngineError;
|
||||
use std::fmt::Debug;
|
||||
use std::sync::Arc;
|
||||
@@ -21,6 +15,8 @@ pub mod publication;
|
||||
pub mod room_session;
|
||||
pub mod track;
|
||||
|
||||
pub use room_session::*;
|
||||
|
||||
pub type RoomEvents = mpsc::UnboundedReceiver<RoomEvent>;
|
||||
pub type RoomEmitter = mpsc::UnboundedSender<RoomEvent>;
|
||||
pub type RoomResult<T> = Result<T, RoomError>;
|
||||
@@ -33,12 +29,6 @@ pub enum RoomError {
|
||||
Internal(String),
|
||||
}
|
||||
|
||||
#[derive(Error, Debug, Clone)]
|
||||
pub enum TrackError {
|
||||
#[error("could not find published track with sid: {0}")]
|
||||
TrackNotFound(String),
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum RoomEvent {
|
||||
ParticipantConnected(Arc<RemoteParticipant>),
|
||||
@@ -62,7 +52,7 @@ pub enum RoomEvent {
|
||||
participant: Arc<RemoteParticipant>,
|
||||
},
|
||||
TrackSubscriptionFailed {
|
||||
error: TrackError,
|
||||
error: track::TrackError,
|
||||
sid: TrackSid,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
},
|
||||
@@ -83,7 +73,7 @@ pub enum RoomEvent {
|
||||
},
|
||||
DataReceived {
|
||||
payload: Arc<Vec<u8>>,
|
||||
kind: data_packet::Kind,
|
||||
kind: proto::data_packet::Kind,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
},
|
||||
ConnectionStateChanged(ConnectionState),
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
use super::ConnectionQuality;
|
||||
use crate::proto::{data_packet, DataPacket, ParticipantInfo, UserPacket};
|
||||
use crate::room::id::{ParticipantIdentity, ParticipantSid, TrackSid};
|
||||
use crate::room::participant::{
|
||||
impl_participant_trait, ParticipantEvent, ParticipantInternalTrait, ParticipantShared,
|
||||
ParticipantTrait,
|
||||
use super::{
|
||||
impl_participant_trait, ConnectionQuality, ParticipantInternalTrait, ParticipantShared,
|
||||
};
|
||||
use crate::room::publication::TrackPublication;
|
||||
use crate::room::RoomError;
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use crate::publication::TrackPublication;
|
||||
use crate::rtc_engine::RTCEngine;
|
||||
use parking_lot::RwLockReadGuard;
|
||||
use std::collections::HashMap;
|
||||
@@ -37,11 +34,11 @@ impl LocalParticipant {
|
||||
pub async fn publish_data(
|
||||
&self,
|
||||
data: &[u8],
|
||||
kind: data_packet::Kind,
|
||||
kind: proto::data_packet::Kind,
|
||||
) -> Result<(), RoomError> {
|
||||
let data = DataPacket {
|
||||
let data = proto::DataPacket {
|
||||
kind: kind as i32,
|
||||
value: Some(data_packet::Value::User(UserPacket {
|
||||
value: Some(proto::data_packet::Value::User(proto::UserPacket {
|
||||
participant_sid: self.sid().to_string(),
|
||||
payload: data.to_vec(),
|
||||
destination_sids: vec![],
|
||||
@@ -56,7 +53,7 @@ impl LocalParticipant {
|
||||
}
|
||||
|
||||
impl ParticipantInternalTrait for LocalParticipant {
|
||||
fn update_info(self: &Arc<Self>, info: ParticipantInfo, _emit_events: bool) {
|
||||
fn update_info(self: &Arc<Self>, info: proto::ParticipantInfo, _emit_events: bool) {
|
||||
self.shared.update_info(info);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,23 +1,19 @@
|
||||
use super::publication::RemoteTrackPublication;
|
||||
use super::TrackError;
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use crate::proto::ParticipantInfo;
|
||||
use crate::room::id::{ParticipantIdentity, ParticipantSid, TrackSid};
|
||||
use crate::room::participant::local_participant::LocalParticipant;
|
||||
use crate::room::participant::remote_participant::RemoteParticipant;
|
||||
use crate::room::publication::{TrackPublication, TrackPublicationTrait};
|
||||
use crate::room::track::remote_track::RemoteTrackHandle;
|
||||
use crate::track::TrackError;
|
||||
use livekit_utils::enum_dispatch;
|
||||
use livekit_utils::observer::Dispatcher;
|
||||
use parking_lot::{Mutex, RwLock, RwLockReadGuard};
|
||||
use proto::data_packet;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU32, AtomicU8, Ordering};
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
pub mod local_participant;
|
||||
pub mod remote_participant;
|
||||
mod local_participant;
|
||||
mod remote_participant;
|
||||
|
||||
pub use local_participant::*;
|
||||
pub use remote_participant::*;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum ParticipantEvent {
|
||||
@@ -41,7 +37,7 @@ pub enum ParticipantEvent {
|
||||
},
|
||||
DataReceived {
|
||||
payload: Arc<Vec<u8>>,
|
||||
kind: data_packet::Kind,
|
||||
kind: proto::data_packet::Kind,
|
||||
},
|
||||
SpeakingChanged {
|
||||
speaking: bool,
|
||||
@@ -120,7 +116,7 @@ impl ParticipantShared {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) fn update_info(&self, info: ParticipantInfo) {
|
||||
pub(crate) fn update_info(&self, info: proto::ParticipantInfo) {
|
||||
*self.sid.lock() = info.sid.into();
|
||||
*self.identity.lock() = info.identity.into();
|
||||
*self.name.lock() = info.name;
|
||||
@@ -154,7 +150,7 @@ pub(crate) trait ParticipantInternalTrait {
|
||||
fn set_speaking(&self, speaking: bool);
|
||||
fn set_audio_level(&self, level: f32);
|
||||
fn set_connection_quality(&self, quality: ConnectionQuality);
|
||||
fn update_info(self: &Arc<Self>, info: ParticipantInfo, emit_events: bool);
|
||||
fn update_info(self: &Arc<Self>, info: proto::ParticipantInfo, emit_events: bool);
|
||||
}
|
||||
|
||||
pub trait ParticipantTrait {
|
||||
@@ -180,7 +176,7 @@ pub enum Participant {
|
||||
impl Participant {
|
||||
enum_dispatch!(
|
||||
[Local, Remote]
|
||||
fnc!(pub(crate), update_info, &Self, [info: ParticipantInfo, emit_events: bool], ());
|
||||
fnc!(pub(crate), update_info, &Self, [info: proto::ParticipantInfo, emit_events: bool], ());
|
||||
fnc!(pub(crate), set_speaking, &Self, [speaking: bool], ());
|
||||
fnc!(pub(crate), set_audio_level, &Self, [audio_level: f32], ());
|
||||
fnc!(pub(crate), set_connection_quality, &Self, [quality: ConnectionQuality], ());
|
||||
|
||||
@@ -1,19 +1,11 @@
|
||||
use super::ConnectionQuality;
|
||||
use crate::proto::{data_packet, DataPacket, ParticipantInfo, UserPacket};
|
||||
use crate::room::id::{ParticipantIdentity, ParticipantSid, TrackSid};
|
||||
use crate::room::participant::{
|
||||
impl_participant_trait, ParticipantEvent, ParticipantInternalTrait, ParticipantShared,
|
||||
ParticipantTrait,
|
||||
use super::{
|
||||
impl_participant_trait, ConnectionQuality, ParticipantInternalTrait, ParticipantShared,
|
||||
};
|
||||
use crate::room::publication::{
|
||||
RemoteTrackPublication, TrackPublication, TrackPublicationInternalTrait, TrackPublicationTrait,
|
||||
};
|
||||
use crate::room::track::remote_audio_track::RemoteAudioTrack;
|
||||
use crate::room::track::remote_track::RemoteTrackHandle;
|
||||
use crate::room::track::remote_video_track::RemoteVideoTrack;
|
||||
use crate::room::track::{TrackKind, TrackTrait};
|
||||
use crate::room::TrackError;
|
||||
use livekit_webrtc::media_stream::MediaStreamTrackHandle;
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use crate::publication::TrackPublicationInternalTrait;
|
||||
use crate::track::TrackError;
|
||||
use livekit_webrtc::prelude::*;
|
||||
use parking_lot::RwLockReadGuard;
|
||||
use std::collections::HashMap;
|
||||
use std::collections::HashSet;
|
||||
@@ -55,7 +47,7 @@ impl RemoteParticipant {
|
||||
|
||||
/// Called by the RoomSession when receiving data by the RTCSession
|
||||
/// It is just used to emit the Data event on the participant dispatcher.
|
||||
pub(crate) fn on_data_received(&self, data: Arc<Vec<u8>>, kind: data_packet::Kind) {
|
||||
pub(crate) fn on_data_received(&self, data: Arc<Vec<u8>>, kind: proto::data_packet::Kind) {
|
||||
self.shared
|
||||
.dispatcher
|
||||
.lock()
|
||||
@@ -172,7 +164,7 @@ impl RemoteParticipant {
|
||||
}
|
||||
|
||||
impl ParticipantInternalTrait for RemoteParticipant {
|
||||
fn update_info(self: &Arc<Self>, info: ParticipantInfo, emit_events: bool) {
|
||||
fn update_info(self: &Arc<Self>, info: proto::ParticipantInfo, emit_events: bool) {
|
||||
self.shared.update_info(info.clone());
|
||||
|
||||
let mut valid_tracks = HashSet::<TrackSid>::new();
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
use crate::proto::TrackType;
|
||||
use crate::proto::{TrackInfo, TrackSource as ProtoTrackSource};
|
||||
use crate::room::id::ParticipantSid;
|
||||
use crate::room::id::TrackSid;
|
||||
use crate::room::track::local_track::LocalTrackHandle;
|
||||
use crate::room::track::remote_track::RemoteTrackHandle;
|
||||
use crate::room::track::{TrackHandle, TrackKind, TrackSource, TrackTrait};
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use livekit_utils::enum_dispatch;
|
||||
use livekit_utils::observer::Dispatcher;
|
||||
use parking_lot::Mutex;
|
||||
@@ -16,7 +11,7 @@ use super::track::{TrackDimension, TrackEvent};
|
||||
|
||||
pub(crate) trait TrackPublicationInternalTrait {
|
||||
fn update_track(&self, track: Option<TrackHandle>);
|
||||
fn update_info(&self, info: TrackInfo);
|
||||
fn update_info(&self, info: proto::TrackInfo);
|
||||
}
|
||||
|
||||
pub trait TrackPublicationTrait {
|
||||
@@ -46,7 +41,7 @@ pub(super) struct TrackPublicationShared {
|
||||
|
||||
impl TrackPublicationShared {
|
||||
pub fn new(
|
||||
info: TrackInfo,
|
||||
info: proto::TrackInfo,
|
||||
participant: ParticipantSid,
|
||||
track: Option<TrackHandle>,
|
||||
) -> Arc<Self> {
|
||||
@@ -54,9 +49,11 @@ impl TrackPublicationShared {
|
||||
track: Mutex::new(track),
|
||||
name: Mutex::new(info.name),
|
||||
sid: Mutex::new(info.sid.into()),
|
||||
kind: AtomicU8::new(TrackKind::from(TrackType::from_i32(info.r#type).unwrap()) as u8),
|
||||
kind: AtomicU8::new(
|
||||
TrackKind::from(proto::TrackType::from_i32(info.r#type).unwrap()) as u8,
|
||||
),
|
||||
source: AtomicU8::new(TrackSource::from(
|
||||
ProtoTrackSource::from_i32(info.source).unwrap(),
|
||||
proto::TrackSource::from_i32(info.source).unwrap(),
|
||||
) as u8),
|
||||
simulcasted: AtomicBool::new(info.simulcast),
|
||||
dimension: Mutex::new(TrackDimension(info.width, info.height)),
|
||||
@@ -106,17 +103,17 @@ impl TrackPublicationShared {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn update_info(&self, info: TrackInfo) {
|
||||
pub fn update_info(&self, info: proto::TrackInfo) {
|
||||
*self.name.lock() = info.name;
|
||||
*self.sid.lock() = info.sid.into();
|
||||
*self.dimension.lock() = TrackDimension(info.width, info.height);
|
||||
*self.mime_type.lock() = info.mime_type;
|
||||
self.kind.store(
|
||||
TrackKind::from(TrackType::from_i32(info.r#type).unwrap()) as u8,
|
||||
TrackKind::from(proto::TrackType::from_i32(info.r#type).unwrap()) as u8,
|
||||
Ordering::SeqCst,
|
||||
);
|
||||
self.source.store(
|
||||
TrackSource::from(ProtoTrackSource::from_i32(info.source).unwrap()) as u8,
|
||||
TrackSource::from(proto::TrackSource::from_i32(info.source).unwrap()) as u8,
|
||||
Ordering::SeqCst,
|
||||
);
|
||||
self.simulcasted.store(info.simulcast, Ordering::SeqCst);
|
||||
@@ -156,7 +153,7 @@ impl TrackPublicationInternalTrait for TrackPublication {
|
||||
enum_dispatch!(
|
||||
[Local, Remote]
|
||||
fnc!(update_track, &Self, [track: Option<TrackHandle>], ());
|
||||
fnc!(update_info, &Self, [info: TrackInfo], ());
|
||||
fnc!(update_info, &Self, [info: proto::TrackInfo], ());
|
||||
);
|
||||
}
|
||||
|
||||
@@ -222,7 +219,7 @@ impl TrackPublicationInternalTrait for LocalTrackPublication {
|
||||
self.shared.update_track(track);
|
||||
}
|
||||
|
||||
fn update_info(&self, info: TrackInfo) {
|
||||
fn update_info(&self, info: proto::TrackInfo) {
|
||||
self.shared.update_info(info);
|
||||
}
|
||||
}
|
||||
@@ -233,7 +230,11 @@ pub struct RemoteTrackPublication {
|
||||
}
|
||||
|
||||
impl RemoteTrackPublication {
|
||||
pub fn new(info: TrackInfo, participant: ParticipantSid, track: Option<TrackHandle>) -> Self {
|
||||
pub fn new(
|
||||
info: proto::TrackInfo,
|
||||
participant: ParticipantSid,
|
||||
track: Option<TrackHandle>,
|
||||
) -> Self {
|
||||
Self {
|
||||
shared: TrackPublicationShared::new(info, participant, track),
|
||||
}
|
||||
@@ -253,7 +254,7 @@ impl TrackPublicationInternalTrait for RemoteTrackPublication {
|
||||
self.shared.update_track(track);
|
||||
}
|
||||
|
||||
fn update_info(&self, info: TrackInfo) {
|
||||
fn update_info(&self, info: proto::TrackInfo) {
|
||||
self.shared.update_info(info);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
use super::id::{ParticipantIdentity, ParticipantSid};
|
||||
use super::participant::local_participant::LocalParticipant;
|
||||
use super::participant::remote_participant::RemoteParticipant;
|
||||
use super::participant::{ConnectionQuality, Participant, ParticipantEvent};
|
||||
use super::participant::{ParticipantInternalTrait, ParticipantTrait};
|
||||
use super::{RoomEmitter, RoomError, RoomEvent, RoomResult, SimulateScenario};
|
||||
use crate::proto::{self, participant_info, SpeakerInfo};
|
||||
use crate::participant::{ConnectionQuality, ParticipantInternalTrait};
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use crate::rtc_engine::{EngineEvent, EngineEvents, EngineResult, RTCEngine};
|
||||
use crate::signal_client::SignalOptions;
|
||||
use crate::{RoomEmitter, RoomError, RoomEvent, RoomResult, SimulateScenario};
|
||||
use parking_lot::{Mutex, RwLock};
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicU8, Ordering};
|
||||
@@ -365,7 +362,7 @@ impl SessionInner {
|
||||
let remote_participant = self.get_participant(&pi.sid.clone().into());
|
||||
|
||||
if let Some(remote_participant) = remote_participant {
|
||||
if pi.state == participant_info::State::Disconnected as i32 {
|
||||
if pi.state == proto::participant_info::State::Disconnected as i32 {
|
||||
// Participant disconnected
|
||||
info!("Participant disconnected: {}", pi.sid);
|
||||
self.clone()
|
||||
@@ -394,7 +391,7 @@ impl SessionInner {
|
||||
/// Active speakers changed
|
||||
/// Update the participants & sort the active_speakers by audio_level
|
||||
#[instrument(level = Level::DEBUG)]
|
||||
fn handle_speakers_changed(&self, speakers_info: Vec<SpeakerInfo>) {
|
||||
fn handle_speakers_changed(&self, speakers_info: Vec<proto::SpeakerInfo>) {
|
||||
let mut speakers = Vec::new();
|
||||
|
||||
for speaker in speakers_info {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use crate::room::track::local_audio_track::LocalAudioTrack;
|
||||
use crate::room::track::remote_audio_track::RemoteAudioTrack;
|
||||
use crate::room::track::TrackHandle;
|
||||
use crate::prelude::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::room::track::{impl_track_trait, TrackShared};
|
||||
use super::{impl_track_trait, TrackShared};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LocalAudioTrack {
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use crate::room::track::local_audio_track::LocalAudioTrack;
|
||||
use crate::room::track::local_video_track::LocalVideoTrack;
|
||||
use crate::room::track::TrackHandle;
|
||||
use crate::prelude::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
use crate::room::track::{impl_track_trait, TrackShared};
|
||||
use super::{impl_track_trait, TrackShared};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct LocalVideoTrack {
|
||||
|
||||
@@ -1,15 +1,11 @@
|
||||
use crate::proto::{TrackSource as ProtoTrackSource, TrackType};
|
||||
use crate::room::id::TrackSid;
|
||||
use crate::room::track::local_audio_track::LocalAudioTrack;
|
||||
use crate::room::track::local_video_track::LocalVideoTrack;
|
||||
use crate::room::track::remote_audio_track::RemoteAudioTrack;
|
||||
use crate::room::track::remote_video_track::RemoteVideoTrack;
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
use livekit_utils::enum_dispatch;
|
||||
use livekit_utils::observer::Dispatcher;
|
||||
use livekit_webrtc::media_stream::{MediaStreamTrackHandle, MediaStreamTrackTrait};
|
||||
use parking_lot::Mutex;
|
||||
use std::sync::atomic::{AtomicBool, AtomicU8, Ordering};
|
||||
use std::sync::Arc;
|
||||
use thiserror::Error;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
pub mod audio_track;
|
||||
@@ -21,6 +17,21 @@ pub mod remote_track;
|
||||
pub mod remote_video_track;
|
||||
pub mod video_track;
|
||||
|
||||
pub use audio_track::*;
|
||||
pub use local_audio_track::*;
|
||||
pub use local_track::*;
|
||||
pub use local_video_track::*;
|
||||
pub use remote_audio_track::*;
|
||||
pub use remote_track::*;
|
||||
pub use remote_video_track::*;
|
||||
pub use video_track::*;
|
||||
|
||||
#[derive(Error, Debug, Clone)]
|
||||
pub enum TrackError {
|
||||
#[error("could not find published track with sid: {0}")]
|
||||
TrackNotFound(String),
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum TrackKind {
|
||||
Unknown,
|
||||
@@ -38,11 +49,11 @@ impl From<u8> for TrackKind {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<TrackType> for TrackKind {
|
||||
fn from(r#type: TrackType) -> Self {
|
||||
impl From<proto::TrackType> for TrackKind {
|
||||
fn from(r#type: proto::TrackType) -> Self {
|
||||
match r#type {
|
||||
TrackType::Audio => Self::Audio,
|
||||
TrackType::Video => Self::Video,
|
||||
proto::TrackType::Audio => Self::Audio,
|
||||
proto::TrackType::Video => Self::Video,
|
||||
_ => Self::Unknown,
|
||||
}
|
||||
}
|
||||
@@ -86,14 +97,14 @@ impl From<u8> for TrackSource {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<ProtoTrackSource> for TrackSource {
|
||||
fn from(source: ProtoTrackSource) -> Self {
|
||||
impl From<proto::TrackSource> for TrackSource {
|
||||
fn from(source: proto::TrackSource) -> Self {
|
||||
match source {
|
||||
ProtoTrackSource::Camera => Self::Camera,
|
||||
ProtoTrackSource::Microphone => Self::Microphone,
|
||||
ProtoTrackSource::ScreenShare => Self::Screenshare,
|
||||
ProtoTrackSource::ScreenShareAudio => Self::ScreenshareAudio,
|
||||
ProtoTrackSource::Unknown => Self::Unknown,
|
||||
proto::TrackSource::Camera => Self::Camera,
|
||||
proto::TrackSource::Microphone => Self::Microphone,
|
||||
proto::TrackSource::ScreenShare => Self::Screenshare,
|
||||
proto::TrackSource::ScreenShareAudio => Self::ScreenshareAudio,
|
||||
proto::TrackSource::Unknown => Self::Unknown,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use crate::room::track::{impl_track_trait, TrackShared};
|
||||
use livekit_webrtc::media_stream::{AudioTrack, MediaStreamTrackHandle};
|
||||
use super::{impl_track_trait, TrackShared};
|
||||
use crate::prelude::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
use std::sync::Arc;
|
||||
use super::{StreamState, TrackKind};
|
||||
use crate::room::id::TrackSid;
|
||||
use crate::room::track::remote_audio_track::RemoteAudioTrack;
|
||||
use crate::room::track::remote_video_track::RemoteVideoTrack;
|
||||
use crate::room::track::{TrackHandle, TrackEvent};
|
||||
use tokio::sync::mpsc;
|
||||
use crate::prelude::*;
|
||||
use livekit_utils::enum_dispatch;
|
||||
|
||||
use super::TrackTrait;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum RemoteTrackHandle {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
use livekit_webrtc::media_stream::{MediaStreamTrackHandle, VideoTrack};
|
||||
use super::{impl_track_trait, TrackShared};
|
||||
use crate::prelude::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
use crate::room::track::{impl_track_trait, TrackShared};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RemoteVideoTrack {
|
||||
shared: TrackShared,
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
use crate::room::track::local_video_track::LocalVideoTrack;
|
||||
use crate::room::track::remote_video_track::RemoteVideoTrack;
|
||||
use crate::room::track::TrackHandle;
|
||||
use crate::prelude::*;
|
||||
use std::sync::Arc;
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user