summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/llwebrtc.cpp
diff options
context:
space:
mode:
authorRoxanne Skelly <roxie@lindenlab.com>2024-04-28 21:03:33 -0700
committerGitHub <noreply@github.com>2024-04-28 21:03:33 -0700
commit7cdc327de9df4773f933e1e558eb79c9aabfa787 (patch)
tree71a5ba489948e8a95ff1b6228733f6d97cac2441 /indra/llwebrtc/llwebrtc.cpp
parentb09070a3acc229a933f2001c0025c913240d823b (diff)
parent57182b2ac01007d3d5d11c98e811e05d2c50405c (diff)
Merge pull request #1349 from secondlife/roxie/webrtc-voice
[WebRTC-Voice] Fix server reconnect issue (and other issues)
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index e08ace12c5..d07e6deea4 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -652,6 +652,13 @@ LLWebRTCPeerConnectionImpl::LLWebRTCPeerConnectionImpl() :
{
}
+LLWebRTCPeerConnectionImpl::~LLWebRTCPeerConnectionImpl()
+{
+ terminate();
+ mSignalingObserverList.clear();
+ mDataObserverList.clear();
+}
+
//
// LLWebRTCPeerConnection interface
//
@@ -670,9 +677,6 @@ void LLWebRTCPeerConnectionImpl::terminate()
rtc::scoped_refptr<webrtc::MediaStreamInterface> localStream;
mLocalStream.swap(localStream);
- mSignalingObserverList.clear();
- mDataObserverList.clear();
-
mWebRTCImpl->PostSignalingTask(
[=]()
{
@@ -762,7 +766,7 @@ bool LLWebRTCPeerConnectionImpl::initializeConnection(const LLWebRTCPeerConnecti
rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
mPeerConnectionFactory->CreateAudioTrack("SLAudio", mPeerConnectionFactory->CreateAudioSource(audioOptions).get()));
- audio_track->set_enabled(true);
+ audio_track->set_enabled(false);
mLocalStream->AddTrack(audio_track);
mPeerConnection->AddTrack(audio_track, {"SLStream"});
@@ -995,8 +999,6 @@ void LLWebRTCPeerConnectionImpl::OnConnectionChange(webrtc::PeerConnectionInterf
{
case webrtc::PeerConnectionInterface::PeerConnectionState::kConnected:
{
- mWebRTCImpl->setRecording(true);
-
mWebRTCImpl->PostWorkerTask([this]() {
for (auto &observer : mSignalingObserverList)
{