summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
authorRick Pasetto <rick@lindenlab.com>2010-02-16 15:42:33 -0800
committerRick Pasetto <rick@lindenlab.com>2010-02-16 15:42:33 -0800
commit0e234edcc67ecf534df15f088158ef236f6de102 (patch)
tree9013ecc90f0fde4e87f45c44d27b73f5197a1911 /indra/newview/llviewermedia.cpp
parentc6a8d9a7e71a22290ac8db63828f3c6fdd018ffd (diff)
EXT-5270: Implement "dynamic" controls based on the selected item in Nearby Media
Review #112 This change adds controls that change state based on the selection in the nearby media panel. There are basically 3 sets: - Time-based - Web-based ("Normal") - Disabled Again, these change based on what you've got selected in the panel
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 7b5d1d9814..3fc578aa5e 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -939,12 +939,12 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
// Also do Parcel Media and Parcel Audio
if (val)
{
- if (!LLViewerMedia::isParcelMediaPlaying())
+ if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia())
{
LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
}
- if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop)
+ if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
{
gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
}
@@ -2246,7 +2246,7 @@ void LLViewerMediaImpl::resetPreviousMediaState()
//////////////////////////////////////////////////////////////////////////////////////////
//
-void LLViewerMediaImpl::setDisabled(bool disabled)
+void LLViewerMediaImpl::setDisabled(bool disabled, bool forcePlayOnEnable)
{
if(mIsDisabled != disabled)
{
@@ -2261,7 +2261,7 @@ void LLViewerMediaImpl::setDisabled(bool disabled)
else
{
// We just (re)enabled this media. Do a navigate if auto-play is in order.
- if(isAutoPlayable())
+ if(isAutoPlayable() || forcePlayOnEnable)
{
navigateTo(mMediaEntryURL, "", true, true);
}