summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerparcelmedia.cpp
diff options
context:
space:
mode:
authorRoxie Linden <roxie@lindenlab.com>2010-02-24 17:04:48 -0800
committerRoxie Linden <roxie@lindenlab.com>2010-02-24 17:04:48 -0800
commit6bb43e1369d957a041c796120e87a89ff3fa10ee (patch)
tree678e25f3b62ab90e2940dfcae5feafa1acaa8ffc /indra/newview/llviewerparcelmedia.cpp
parentff52ac089f9ed67410f80fe66d0b997f0f2dafcc (diff)
parentfc633fce71c6bdd43ab009558c7556f528335fe0 (diff)
Automated merge up from viewer 2.0 trunk.
Some llvoiceclient changes duplicated changes that had already been made in the voice modularization refactor, so the refactor versions were used.
Diffstat (limited to 'indra/newview/llviewerparcelmedia.cpp')
-rw-r--r--indra/newview/llviewerparcelmedia.cpp40
1 files changed, 2 insertions, 38 deletions
diff --git a/indra/newview/llviewerparcelmedia.cpp b/indra/newview/llviewerparcelmedia.cpp
index 0f7903a7a5..56dee6b34c 100644
--- a/indra/newview/llviewerparcelmedia.cpp
+++ b/indra/newview/llviewerparcelmedia.cpp
@@ -56,10 +56,6 @@ LLUUID LLViewerParcelMedia::sMediaRegionID;
viewer_media_t LLViewerParcelMedia::sMediaImpl;
-// Local functions
-bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel);
-
-
// static
void LLViewerParcelMedia::initClass()
{
@@ -112,12 +108,10 @@ void LLViewerParcelMedia::update(LLParcel* parcel)
// First use warning
if( (!mediaUrl.empty() ||
!parcel->getMusicURL().empty())
- && gWarningSettings.getBOOL("FirstStreamingMedia") )
+ && LLViewerMedia::needsMediaFirstRun())
{
- LLNotificationsUtil::add("ParcelCanPlayMedia", LLSD(), LLSD(),
- boost::bind(callback_play_media, _1, _2, parcel));
+ LLViewerMedia::displayMediaFirstRun();
return;
-
}
// if we have a current (link sharing) url, use it instead
@@ -591,36 +585,6 @@ void LLViewerParcelMedia::handleMediaEvent(LLPluginClassMedia* self, EMediaEvent
};
}
-bool callback_play_media(const LLSD& notification, const LLSD& response, LLParcel* parcel)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
- if (option == 0)
- {
- // user has elected to automatically play media.
- gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, TRUE);
- gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
- gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
- if(!gSavedSettings.getBOOL("AudioStreamingMedia"))
- gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
- // play media right now, if available
- LLViewerParcelMedia::play(parcel);
- // play music right now, if available
- if (parcel)
- {
- std::string music_url = parcel->getMusicURL();
- if (gAudiop && !music_url.empty())
- gAudiop->startInternetStream(music_url);
- }
- }
- else
- {
- gSavedSettings.setBOOL("AudioStreamingVideo", FALSE);
- gSavedSettings.setBOOL("AudioStreamingMusic", FALSE);
- }
- gWarningSettings.setBOOL("FirstStreamingMedia", FALSE);
- return false;
-}
-
// TODO: observer
/*
void LLViewerParcelMediaNavigationObserver::onNavigateComplete( const EventType& event_in )