diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-05 19:04:45 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-05 19:04:45 -0800 |
commit | 0c91cfc49c88b729df60d1b20da175f35a7377fe (patch) | |
tree | 8b3309d86ba9aa1a39c5ea6a718e7479fd848acb /indra/newview/llviewerparcelmgr.cpp | |
parent | 34191fcc2c2e54921febd087f781c51899bc2442 (diff) |
Lots of fixes to parcel audio playing/stopping/autoplaying/firstuse policy.
Diffstat (limited to 'indra/newview/llviewerparcelmgr.cpp')
-rw-r--r-- | indra/newview/llviewerparcelmgr.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 87a9eae028..5a5c4e7480 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -44,6 +44,7 @@ #include "llparcel.h" #include "llsecondlifeurls.h" #include "message.h" +#include "llfloaterreg.h" // Viewer includes #include "llagent.h" @@ -52,6 +53,7 @@ #include "llfirstuse.h" #include "llfloaterbuyland.h" #include "llfloatergroups.h" +#include "llfloaternearbymedia.h" #include "llfloatersellland.h" #include "llfloatertools.h" #include "llparcelselection.h" @@ -1735,7 +1737,7 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use } else if (!gAudiop->getInternetStreamURL().empty()) { - llinfos << "Stopping parcel music" << llendl; + llinfos << "Stopping parcel music (parcel stream URL is empty)" << llendl; gAudiop->startInternetStream(LLStringUtil::null); } } @@ -1754,15 +1756,19 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use void optionally_start_music(const std::string& music_url) { - if (gSavedSettings.getBOOL("AudioStreamingMusic") && gSavedSettings.getBOOL("AudioStreamingMedia")) - { - // Make the user click the start button on the overlay bar. JC - // llinfos << "Starting parcel music " << music_url << llendl; - - // now only play music when you enter a new parcel if the control is in PLAY state - // changed as part of SL-4878 - if ( gOverlayBar && gOverlayBar->musicPlaying()) + if (gSavedSettings.getBOOL("AudioStreamingMusic") && + gSavedSettings.getBOOL("AudioStreamingMedia")) + { + // 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()) || + // or they have expressed no opinion in the UI, but have autoplay on... + (!nearby_media_floater && + gSavedSettings.getBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING))) { + llinfos << "Starting parcel music " << music_url << llendl; gAudiop->startInternetStream(music_url); } } |