use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct AvatarSessionInfo {
pub session_id: String,
pub video_stream: VideoStreamInfo,
pub provider: String,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
#[serde(rename_all = "camelCase", tag = "type")]
pub enum VideoStreamInfo {
LiveKit {
url: String,
token: String,
room_name: String,
},
WebRTC {
sdp_answer: String,
ice_servers: Vec<IceServer>,
},
StreamUrl {
url: String,
},
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct IceServer {
pub urls: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub username: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub credential: Option<String>,
}