From e6cda8b59b9b52617a4c40a9ae6111403a3dba2f Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Sat, 14 Feb 2009 23:12:10 -0700 Subject: Fixed missing music prompt (streaming now enabled by default) --- linden/indra/newview/app_settings/settings.xml | 4 +-- linden/indra/newview/llviewerparcelmedia.cpp | 8 +---- linden/indra/newview/llviewerparcelmgr.cpp | 20 +++++++++++- .../newview/skins/default/xui/en-us/alerts.xml | 36 ++++++++++++++-------- 4 files changed, 46 insertions(+), 22 deletions(-) (limited to 'linden/indra') diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 779b668..fbb620c 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -317,7 +317,7 @@ Type Boolean Value - 0 + 1 AudioStreamingVideo @@ -328,7 +328,7 @@ Type Boolean Value - 0 + 1 AutoAcceptNewInventory diff --git a/linden/indra/newview/llviewerparcelmedia.cpp b/linden/indra/newview/llviewerparcelmedia.cpp index 956ed03..94f6d84 100644 --- a/linden/indra/newview/llviewerparcelmedia.cpp +++ b/linden/indra/newview/llviewerparcelmedia.cpp @@ -384,17 +384,11 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void * void callback_play_media(S32 option, void* data) { - LLParcel* parcel = (LLParcel*)data; if (option == 0) { - gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); + LLParcel* parcel = (LLParcel*)data; LLViewerParcelMedia::play(parcel); } - else - { - gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); - } gSavedSettings.setWarning("FirstStreamingVideo", FALSE); - } diff --git a/linden/indra/newview/llviewerparcelmgr.cpp b/linden/indra/newview/llviewerparcelmgr.cpp index 5ef6f83..e27e284 100644 --- a/linden/indra/newview/llviewerparcelmgr.cpp +++ b/linden/indra/newview/llviewerparcelmgr.cpp @@ -1692,7 +1692,12 @@ void LLViewerParcelMgr::processParcelProperties(LLMessageSystem *msg, void **use void optionally_start_music(const std::string& music_url) { - if (gSavedSettings.getBOOL("AudioStreamingMusic")) + // Check to see if this your first time on a music-enabled parcel. + if (gSavedSettings.getWarning("FirstStreamingMusic")) + { + gViewerWindow->alertXml("ParcelCanPlayMusic", callback_start_music, (void*)&music_url); + } + else if (gSavedSettings.getBOOL("AudioStreamingMusic")) { // Make the user click the start button on the overlay bar. JC // llinfos << "Starting parcel music " << music_url << llendl; @@ -1706,6 +1711,19 @@ void optionally_start_music(const std::string& music_url) } } + +void callback_start_music(S32 option, void* data) +{ + if (option == 0) + { + // Before the callback, we verified the url was good. + // We fetch again to avoid lag while loading. + LLParcel* parcel = LLViewerParcelMgr::getInstance()->getAgentParcel(); + gAudiop->startInternetStream(parcel->getMusicURL()); + } + gSavedSettings.setWarning("FirstStreamingMusic", FALSE); +} + // static void LLViewerParcelMgr::processParcelAccessListReply(LLMessageSystem *msg, void **user) { diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml index 0be529f..92e2014 100644 --- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml @@ -1893,20 +1893,32 @@ Try selecting a single parcel. Region Not Found - - - This location can play streaming media. -Streaming media requires a fast Internet connection. - -Play streaming media when available? -(You can change this option later under -Preferences > Audio & Video.) - + + + This location wants to play streaming music. + (Requires a fast Internet connection.) + + Play streaming music now? + + + + + + + This location wants to play streaming media. + (Requires a fast Internet connection.) + + Play streaming media now? + - -- cgit v1.1