Skip to content

Commit

Permalink
Revert "Update mediasoup to 0.10.0 (#153)"
Browse files Browse the repository at this point in the history
This reverts commit 00dc5f5.
  • Loading branch information
satoren committed Jul 26, 2022
1 parent ee61f1a commit 17cc8d3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 2 additions & 2 deletions native/mediasoup_elixir/src/pipe_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use crate::data_structure::SerNumSctpStreams;
use crate::json_serde::JsonSerdeWrap;
use crate::producer::ProducerOptionsStruct;
use crate::{send_async_nif_result, ConsumerRef, PipeTransportRef, ProducerRef};
use mediasoup::data_structures::{ListenIp, SctpState, TransportTuple};
use mediasoup::data_structures::{SctpState, TransportListenIp, TransportTuple};
use mediasoup::pipe_transport::{PipeTransportOptions, PipeTransportRemoteParameters};
use mediasoup::sctp_parameters::SctpParameters;
use mediasoup::srtp_parameters::SrtpParameters;
Expand All @@ -16,7 +16,7 @@ use rustler::{Atom, Env, NifResult, NifStruct, ResourceArc};
#[module = "Mediasoup.PipeTransport.Options"]
pub struct PipeTransportOptionsStruct {
/// Listening IP address.
pub listen_ip: JsonSerdeWrap<ListenIp>,
pub listen_ip: JsonSerdeWrap<TransportListenIp>,
/// Fixed port to listen on instead of selecting automatically from Worker's port range.
pub port: Option<u16>,
/// Create a SCTP association.
Expand Down
4 changes: 2 additions & 2 deletions native/mediasoup_elixir/src/webrtc_transport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::{
};
use mediasoup::consumer::ConsumerOptions;
use mediasoup::data_structures::{
DtlsParameters, DtlsState, IceParameters, IceRole, IceState, ListenIp, SctpState,
DtlsParameters, DtlsState, IceParameters, IceRole, IceState, SctpState, TransportListenIp,
TransportTuple,
};
use mediasoup::producer::ProducerOptions;
Expand Down Expand Up @@ -287,7 +287,7 @@ pub fn webrtc_transport_event(
#[derive(NifStruct)]
#[module = "Mediasoup.WebRtcTransport.Options"]
pub struct WebRtcTransportOptionsStruct {
listen_ips: JsonSerdeWrap<Vec<ListenIp>>,
listen_ips: JsonSerdeWrap<Vec<TransportListenIp>>,
enable_udp: Option<bool>,
enable_tcp: Option<bool>,
prefer_udp: Option<bool>,
Expand Down
7 changes: 3 additions & 4 deletions test/integration/test_pipe_transport.ex
Original file line number Diff line number Diff line change
Expand Up @@ -529,8 +529,7 @@ defmodule IntegrateTest.PipeTransportTest do

srtp_parameters = PipeTransport.srtp_parameters(pipe_transport)
assert match?(%{}, srtp_parameters)
assert srtp_parameters["cryptoSuite"] == "AEAD_AES_256_GCM"
assert String.length(srtp_parameters["keyBase64"]) == 60
assert String.length(srtp_parameters["keyBase64"]) == 40

Mediasoup.Worker.update_settings(worker, %Mediasoup.Worker.UpdateableSettings{
log_level: :none,
Expand All @@ -547,8 +546,8 @@ defmodule IntegrateTest.PipeTransportTest do
ip: "127.0.0.2",
port: 9999,
srtpParameters: %{
cryptoSuite: "AEAD_AES_256_GCM",
keyBase64: "YTdjcDBvY2JoMGY5YXNlNDc0eDJsdGgwaWRvNnJsamRrdG16aWVpZHphdHo="
cryptoSuite: "AES_CM_128_HMAC_SHA1_80",
keyBase64: "ZnQ3eWJraDg0d3ZoYzM5cXN1Y2pnaHU5NWxrZTVv"
}
})
end
Expand Down

0 comments on commit 17cc8d3

Please sign in to comment.