diff --git a/pc/jsep_transport_controller.cc b/pc/jsep_transport_controller.cc index f8821bb1ec..e92dab5925 100644 --- a/pc/jsep_transport_controller.cc +++ b/pc/jsep_transport_controller.cc @@ -447,7 +447,7 @@ JsepTransportController::CreateDtlsTransport( // If media transport is used for both media and data channels, // then we don't need to create DTLS. // Otherwise, DTLS is still created. - if (is_media_transport_factory_enabled_ && config_.media_transport_factory && + if (config_.media_transport_factory && config_.use_media_transport_for_media && config_.use_media_transport_for_data_channels) { dtls = absl::make_unique( @@ -960,9 +960,6 @@ JsepTransportController::MaybeCreateMediaTransport( const cricket::ContentInfo& content_info, const cricket::SessionDescription& description, bool local) { - if (!is_media_transport_factory_enabled_) { - return nullptr; - } if (config_.media_transport_factory == nullptr) { return nullptr; } diff --git a/pc/jsep_transport_controller.h b/pc/jsep_transport_controller.h index 537b2b1d86..fff08d1889 100644 --- a/pc/jsep_transport_controller.h +++ b/pc/jsep_transport_controller.h @@ -89,6 +89,10 @@ class JsepTransportController : public sigslot::has_slots<> { // Whether media transport is used for data channels. bool use_media_transport_for_data_channels = false; + // Whether an RtpMediaTransport should be created as default, when no + // MediaTransportFactory is provided. + bool use_rtp_media_transport = false; + // Optional media transport factory (experimental). If provided it will be // used to create media_transport (as long as either // |use_media_transport_for_media| or @@ -379,12 +383,6 @@ class JsepTransportController : public sigslot::has_slots<> { cricket::IceGatheringState ice_gathering_state_ = cricket::kIceGatheringNew; Config config_; - // Determines if Config::media_transport_factory should be used - // to create a media transport. (when falling back to RTP this may be false). - // This is a prerequisite, but is not sufficient to create media transport - // (the factory needs to be provided in the config, and config must allow for - // media transport). - bool is_media_transport_factory_enabled_ = true; // Early on in the call we don't know if media transport is going to be used, // but we need to get the server-supported parameters to add to an SDP.