From b2f5a15711f62f3e6d273b80ba2f033ab96bfb2f Mon Sep 17 00:00:00 2001 From: melpon Date: Wed, 23 Oct 2024 13:04:09 +0900 Subject: [PATCH] =?UTF-8?q?audio=20=E3=81=AE=E8=A8=AD=E5=AE=9A=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A3=85=E3=82=92=20video=20=E5=81=B4=E3=81=AE?= =?UTF-8?q?=E5=AE=9F=E8=A3=85=E3=81=A8=E5=90=88=E3=82=8F=E3=81=9B=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sora_signaling.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/sora_signaling.cpp b/src/sora_signaling.cpp index 21b5fef..63d0801 100644 --- a/src/sora_signaling.cpp +++ b/src/sora_signaling.cpp @@ -332,9 +332,6 @@ void SoraSignaling::DoSendConnect(bool redirect) { if (!config_.audio) { m["audio"] = false; - } else if (config_.audio && config_.audio_codec_type.empty() && - config_.audio_bit_rate == 0) { - m["audio"] = true; } else { m["audio"] = boost::json::object(); if (!config_.audio_codec_type.empty()) { @@ -346,6 +343,11 @@ void SoraSignaling::DoSendConnect(bool redirect) { if (!config_.audio_opus_params.is_null()) { m["audio"].as_object()["opus_params"] = config_.audio_opus_params; } + + // オプションの設定が行われてなければ単に true を設定 + if (m["audio"].as_object().empty()) { + m["audio"] = true; + } } if (!config_.audio_streaming_language_code.empty()) { @@ -1655,8 +1657,9 @@ void SoraSignaling::OnMessage( dc_->SetOnClose([self = shared_from_this(), code, reason](boost::system::error_code ec) { if (code == 1000) { - self->SendOnDisconnect(SoraSignalingErrorCode::CLOSE_SUCCEEDED, - "Succeeded to close DataChannel: reason=" + reason); + self->SendOnDisconnect( + SoraSignalingErrorCode::CLOSE_SUCCEEDED, + "Succeeded to close DataChannel: reason=" + reason); } else { self->SendOnDisconnect( SoraSignalingErrorCode::CLOSE_SUCCEEDED,