webrtc: janus: numerical room ids are u64

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1478>
This commit is contained in:
Guillaume Desmottes 2024-02-28 11:46:23 +01:00
parent 563eff1193
commit ec17c58dee

View file

@ -46,7 +46,7 @@ fn feed_id() -> u32 {
#[serde(untagged)]
enum RoomId {
Str(String),
Num(u32),
Num(u64),
}
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
@ -551,7 +551,7 @@ impl Signaller {
state.feed_id = Some(RoomId::Str(settings.feed_id.clone()));
} else {
let room_id_str = settings.room_id.as_ref().unwrap();
match room_id_str.parse::<u32>() {
match room_id_str.parse() {
Ok(n) => {
state.room_id = Some(RoomId::Num(n));
state.feed_id = Some(RoomId::Num(settings.feed_id.parse().unwrap()));