summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelnearbymedia.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-12-13 10:23:22 -0500
committerOz Linden <oz@lindenlab.com>2011-12-13 10:23:22 -0500
commitd5f48181b50d9e941abafd76692359869e71a36d (patch)
tree66f2a744ca09c0ff483038ed639a5dd552cd5272 /indra/newview/llpanelnearbymedia.cpp
parent34b1982d33c83bb58c95bcedf36c9b5cd097584f (diff)
parentdbc91a7fac9513bdd879c5c2dc82208e08eaad2d (diff)
merge up to latest viewer-development
Diffstat (limited to 'indra/newview/llpanelnearbymedia.cpp')
-rw-r--r--indra/newview/llpanelnearbymedia.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 2bbd15ae11..c01adc3c35 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -52,6 +52,7 @@
#include "llvovolume.h"
#include "llstatusbar.h"
#include "llsdutil.h"
+#include "llvieweraudio.h"
#include "llfloaterreg.h"
#include "llfloaterpreference.h" // for the gear icon
@@ -807,14 +808,26 @@ bool LLPanelNearByMedia::setDisabled(const LLUUID &row_id, bool disabled)
{
if (row_id == PARCEL_AUDIO_LIST_ITEM_UUID)
{
- if (disabled) onClickParcelAudioStop();
- else onClickParcelAudioStart();
+ if (disabled)
+ {
+ onClickParcelAudioStop();
+ }
+ else
+ {
+ onClickParcelAudioPlay();
+ }
return true;
}
else if (row_id == PARCEL_MEDIA_LIST_ITEM_UUID)
{
- if (disabled) onClickDisableParcelMedia();
- else onClickEnableParcelMedia();
+ if (disabled)
+ {
+ onClickDisableParcelMedia();
+ }
+ else
+ {
+ onClickEnableParcelMedia();
+ }
return true;
}
else {
@@ -857,24 +870,11 @@ void LLPanelNearByMedia::onClickParcelMediaPause()
LLViewerParcelMedia::pause();
}
-void LLPanelNearByMedia::onClickParcelAudioStart()
-{
- // User *explicitly* started the internet stream, so keep the stream
- // playing and updated as they cross to other parcels etc.
- mParcelAudioAutoStart = true;
-
- if (!gAudiop)
- return;
-
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
-}
-
void LLPanelNearByMedia::onClickParcelAudioPlay()
{
// User *explicitly* started the internet stream, so keep the stream
// playing and updated as they cross to other parcels etc.
mParcelAudioAutoStart = true;
-
if (!gAudiop)
return;
@@ -883,8 +883,9 @@ void LLPanelNearByMedia::onClickParcelAudioPlay()
// 'false' means unpause
gAudiop->pauseInternetStream(false);
}
- else {
- gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ else
+ {
+ LLViewerAudio::getInstance()->startInternetStreamWithAutoFade(LLViewerMedia::getParcelAudioURL());
}
}
@@ -894,11 +895,10 @@ void LLPanelNearByMedia::onClickParcelAudioStop()
// re-start audio when i.e. they move to another parcel, until
// they explicitly start it again.
mParcelAudioAutoStart = false;
-
if (!gAudiop)
return;
- gAudiop->stopInternetStream();
+ LLViewerAudio::getInstance()->stopInternetStreamWithAutoFade();
}
void LLPanelNearByMedia::onClickParcelAudioPause()