ws: require offer/answer sdp field to be String, fix related code

This commit is contained in:
Joakim Frostegård 2023-10-30 19:37:25 +01:00
parent c37bf89650
commit d94936a50b
5 changed files with 8 additions and 12 deletions

View file

@ -50,7 +50,7 @@ pub struct RtcOffer {
/// Always "offer"
#[serde(rename = "type")]
pub t: RtcOfferType,
pub sdp: ::serde_json::Value,
pub sdp: String,
}
/// Nested structure with SDP answer from https://www.npmjs.com/package/simple-peer
@ -61,7 +61,7 @@ pub struct RtcAnswer {
/// Always "answer"
#[serde(rename = "type")]
pub t: RtcAnswerType,
pub sdp: ::serde_json::Value,
pub sdp: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]