summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llpanelnearbymedia.cpp47
-rw-r--r--indra/newview/llviewermedia.cpp14
-rw-r--r--indra/newview/skins/default/xui/en/panel_nearby_media.xml2
-rw-r--r--indra/newview/skins/default/xui/en/panel_preferences_sound.xml2
4 files changed, 50 insertions, 15 deletions
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index 8ad5389566..6d6edcc9ee 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -568,11 +568,20 @@ void LLPanelNearByMedia::refreshParcelItems()
tooltip = name + " : " + url;
}
LLViewerMediaImpl *impl = LLViewerParcelMedia::getParcelMedia();
+ bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
+ if(is_enabled)
+ {
+ mParcelMediaName = getString("parcel_media_name");
+ }
+ else
+ {
+ mParcelMediaName = getString("parcel_media_name_disabled");
+ }
updateListItem(mParcelMediaItem,
mParcelMediaName,
tooltip,
-2, // Proximity closer than anything else, before Parcel Audio
- impl == NULL || impl->isMediaDisabled(),
+ impl == NULL || impl->isMediaDisabled() || (!is_enabled),
impl != NULL && !LLViewerParcelMedia::getURL().empty(),
impl != NULL && impl->isMediaTimeBased() && impl->isMediaPlaying(),
MEDIA_CLASS_ALL,
@@ -601,11 +610,20 @@ void LLPanelNearByMedia::refreshParcelItems()
if (NULL != mParcelAudioItem)
{
bool is_playing = LLViewerMedia::isParcelAudioPlaying();
+ bool is_enabled = gSavedSettings.getBOOL("AudioStreamingMusic");
+ if(is_enabled)
+ {
+ mParcelAudioName = getString("parcel_audio_name");
+ }
+ else
+ {
+ mParcelAudioName = getString("parcel_audio_name_disabled");
+ }
updateListItem(mParcelAudioItem,
mParcelAudioName,
LLViewerMedia::getParcelAudioURL(),
-1, // Proximity after Parcel Media, but closer than anything else
- !is_playing,
+ (!is_playing) && is_enabled,
is_playing,
is_playing,
MEDIA_CLASS_ALL,
@@ -824,7 +842,10 @@ void LLPanelNearByMedia::onZoomMedia(void* user_data)
void LLPanelNearByMedia::onClickParcelMediaPlay()
{
- LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ if (gSavedSettings.getBOOL("AudioStreamingMedia"))
+ {
+ LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
+ }
}
void LLPanelNearByMedia::onClickParcelMediaStop()
@@ -844,14 +865,18 @@ void LLPanelNearByMedia::onClickParcelMediaPause()
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;
+ //only do this when it's audio streaming is enabled
+ if (gSavedSettings.getBOOL("AudioStreamingMusic"))
+ {
+ // 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());
+ gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
+ }
}
void LLPanelNearByMedia::onClickParcelAudioPlay()
@@ -1081,7 +1106,7 @@ void LLPanelNearByMedia::onClickSelectedMediaPlay()
impl->play();
return;
}
- else if (impl->isParcelMedia())
+ else if (NULL != impl && impl->isParcelMedia())
{
LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
}
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 395467dffb..0d16a3c2cb 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -722,6 +722,7 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
std::vector<LLViewerMediaImpl*> proximity_order;
bool inworld_media_enabled = gSavedSettings.getBOOL("AudioStreamingMedia");
+ bool inworld_audio_enabled = gSavedSettings.getBOOL("AudioStreamingMusic");
U32 max_instances = gSavedSettings.getU32("PluginInstancesTotal");
U32 max_normal = gSavedSettings.getU32("PluginInstancesNormal");
U32 max_low = gSavedSettings.getU32("PluginInstancesLow");
@@ -849,7 +850,14 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
new_priority = LLPluginClassMedia::PRIORITY_UNLOADED;
}
}
-
+ // update the audio stream here as well
+ if(!inworld_audio_enabled)
+ {
+ if(LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ {
+ gAudiop->stopInternetStream();
+ }
+ }
pimpl->setPriority(new_priority);
if(pimpl->getUsedInUI())
@@ -939,12 +947,12 @@ void LLViewerMedia::setAllMediaEnabled(bool val)
// Also do Parcel Media and Parcel Audio
if (val)
{
- if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia())
+ if (!LLViewerMedia::isParcelMediaPlaying() && LLViewerMedia::hasParcelMedia()&& gSavedSettings.getBOOL("AudioStreamingMedia"))
{
LLViewerParcelMedia::play(LLViewerParcelMgr::getInstance()->getAgentParcel());
}
- if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio())
+ if (!LLViewerMedia::isParcelAudioPlaying() && gAudiop && LLViewerMedia::hasParcelAudio()&& gSavedSettings.getBOOL("AudioStreamingMusic"))
{
gAudiop->startInternetStream(LLViewerMedia::getParcelAudioURL());
}
diff --git a/indra/newview/skins/default/xui/en/panel_nearby_media.xml b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
index 0f911f789e..f3dfd56fbe 100644
--- a/indra/newview/skins/default/xui/en/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/en/panel_nearby_media.xml
@@ -14,7 +14,9 @@
<string name="media_item_count_format">(%ld media items)</string>
<string name="empty_item_text">&lt;empty&gt;</string>
<string name="parcel_media_name">Parcel Streaming Media</string>
+ <string name="parcel_media_name_disabled">Parcel Streaming Media (Disabled)</string>
<string name="parcel_audio_name">Parcel Streaming Audio</string>
+ <string name="parcel_audio_name_disabled">Parcel Streaming Audio (Disabled)</string>
<string name="playing_suffix">(playing)</string>
<panel
bevel_style="in"
diff --git a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
index c9752cf913..8fa7f75f6b 100644
--- a/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
+++ b/indra/newview/skins/default/xui/en/panel_preferences_sound.xml
@@ -17,7 +17,7 @@
increment="0.05"
initial_value="0.5"
label="Master volume"
- label_width="120"
+ label_width="120"
layout="topleft"
left="0"
name="System Volume"