diff options
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index a075a706e1..1f6bbcbae8 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -53,7 +53,7 @@ //#include "llfirstuse.h" #include "llfloaterbuyland.h" #include "llfloatergroups.h" -#include "llfloaternearbymedia.h" +#include "llpanelnearbymedia.h" #include "llfloatersellland.h" #include "llfloatertools.h" #include "llparcelselection.h" @@ -1762,6 +1762,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use { optionally_start_music(music_url); } + else + { + llinfos << "Stopping parcel music (invalid audio stream URL)" << llendl; + // clears the URL + gAudiop->startInternetStream(LLStringUtil::null); + } } else if (!gAudiop->getInternetStreamURL().empty()) { @@ -1789,12 +1795,13 @@ void optionally_start_music(const std::string& music_url) { // only play music when you enter a new parcel if the UI control for this // was not *explicitly* stopped by the user. (part of SL-4878) - LLFloaterNearbyMedia *nearby_media_floater = LLFloaterReg::findTypedInstance<LLFloaterNearbyMedia>("nearby_media"); - if ((nearby_media_floater && - nearby_media_floater->getParcelAudioAutoStart()) || + LLPanelNearByMedia* nearby_media_panel = gStatusBar->getNearbyMediaPanel();; + if ((nearby_media_panel && + nearby_media_panel->getParcelAudioAutoStart()) || // or they have expressed no opinion in the UI, but have autoplay on... - (!nearby_media_floater && - gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING))) + (!nearby_media_panel && + gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING) && + gSavedSettings.getBOOL("MediaTentativeAutoPlay"))) { llinfos << "Starting parcel music " << music_url << llendl; gAudiop->startInternetStream(music_url); |