feat: video publishing (#42)
- Prepare webrtc abstraction ( for future wasm support ) - Added track publish support for videos - Added LogoTrack example to simple_room demo - Lot of cleanup - There are compiler warnings I'll solve on our v1 release
This commit is contained in:
+14
-10
@@ -1,3 +1,4 @@
|
||||
use self::track::RemoteTrack;
|
||||
use crate::participant::ConnectionQuality;
|
||||
use crate::prelude::*;
|
||||
use crate::proto;
|
||||
@@ -10,6 +11,7 @@ use tokio::sync::mpsc;
|
||||
pub use crate::rtc_engine::SimulateScenario;
|
||||
|
||||
pub mod id;
|
||||
pub mod options;
|
||||
pub mod participant;
|
||||
pub mod publication;
|
||||
pub mod room_session;
|
||||
@@ -25,34 +27,36 @@ pub enum RoomError {
|
||||
Engine(#[from] EngineError),
|
||||
#[error("room failure: {0}")]
|
||||
Internal(String),
|
||||
#[error("this track or a track of the same source is already published")]
|
||||
TrackAlreadyPublished,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum RoomEvent {
|
||||
ParticipantConnected(Arc<RemoteParticipant>),
|
||||
ParticipantDisconnected(Arc<RemoteParticipant>),
|
||||
ParticipantConnected(RemoteParticipant),
|
||||
ParticipantDisconnected(RemoteParticipant),
|
||||
TrackSubscribed {
|
||||
track: RemoteTrackHandle,
|
||||
track: RemoteTrack,
|
||||
publication: RemoteTrackPublication,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
TrackPublished {
|
||||
publication: RemoteTrackPublication,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
TrackUnpublished {
|
||||
publication: RemoteTrackPublication,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
TrackUnsubscribed {
|
||||
track: RemoteTrackHandle,
|
||||
track: RemoteTrack,
|
||||
publication: RemoteTrackPublication,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
TrackSubscriptionFailed {
|
||||
error: track::TrackError,
|
||||
sid: TrackSid,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
TrackMuted {
|
||||
participant: Participant,
|
||||
@@ -72,7 +76,7 @@ pub enum RoomEvent {
|
||||
DataReceived {
|
||||
payload: Arc<Vec<u8>>,
|
||||
kind: proto::data_packet::Kind,
|
||||
participant: Arc<RemoteParticipant>,
|
||||
participant: RemoteParticipant,
|
||||
},
|
||||
ConnectionStateChanged(ConnectionState),
|
||||
Connected,
|
||||
|
||||
Reference in New Issue
Block a user