Skip to content
Snippets Groups Projects
Commit e358ef21 authored by Mnikolenko Productengine's avatar Mnikolenko Productengine
Browse files

MAINT-8143 viewer doen't respect allow media to autoplay unchecked

parent c56298d4
No related branches found
No related tags found
No related merge requests found
...@@ -784,18 +784,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg) ...@@ -784,18 +784,21 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
} }
} }
// update the audio stream here as well // update the audio stream here as well
static bool restore_parcel_audio = false;
if( !inworld_audio_enabled) if( !inworld_audio_enabled)
{ {
if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()) if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
{ {
LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade(); LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
restore_parcel_audio = true;
} }
} }
else else
{ {
if(gAudiop && LLViewerMedia::hasParcelAudio() && gSavedSettings.getBOOL("MediaTentativeAutoPlay")) if(gAudiop && LLViewerMedia::hasParcelAudio() && restore_parcel_audio && gSavedSettings.getBOOL("MediaTentativeAutoPlay"))
{ {
LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL()); LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
restore_parcel_audio = false;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment