summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-08-03 16:19:47 -0700
committerRider Linden <rider@lindenlab.com>2018-08-03 16:19:47 -0700
commit56c773b3bc52d72a5a7056d6eb9ce014dedbc0d8 (patch)
treee9c39e4c9255a909ce0996b4cf228d562020fddb /indra/newview/llviewermedia.cpp
parent8779b29487dd3d18220b17be8dd501ffeabe274f (diff)
parent09f97172bb478a2c977d8b7b0958196e7e98c433 (diff)
Merge
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 4334cbfda3..22a21c9ca3 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1555,6 +1555,7 @@ LLViewerMediaImpl::LLViewerMediaImpl( const LLUUID& texture_id,
mNavigateServerRequest(false),
mMediaSourceFailed(false),
mRequestedVolume(1.0f),
+ mPreviousVolume(1.0f),
mIsMuted(false),
mNeedsMuteCheck(false),
mPreviousMediaState(MEDIA_NONE),
@@ -2082,6 +2083,20 @@ void LLViewerMediaImpl::setVolume(F32 volume)
}
//////////////////////////////////////////////////////////////////////////////////////////
+void LLViewerMediaImpl::setMute(bool mute)
+{
+ if (mute)
+ {
+ mPreviousVolume = mRequestedVolume;
+ setVolume(0.0);
+ }
+ else
+ {
+ setVolume(mPreviousVolume);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////////////////
void LLViewerMediaImpl::updateVolume()
{
if(mMediaSource)