diff options
Diffstat (limited to 'linden/indra/newview/llviewerparcelmedia.cpp')
-rw-r--r-- | linden/indra/newview/llviewerparcelmedia.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/linden/indra/newview/llviewerparcelmedia.cpp b/linden/indra/newview/llviewerparcelmedia.cpp index 2925b8d..9180fb2 100644 --- a/linden/indra/newview/llviewerparcelmedia.cpp +++ b/linden/indra/newview/llviewerparcelmedia.cpp | |||
@@ -41,6 +41,7 @@ | |||
41 | #include "lluuid.h" | 41 | #include "lluuid.h" |
42 | #include "message.h" | 42 | #include "message.h" |
43 | #include "llviewerparcelmediaautoplay.h" | 43 | #include "llviewerparcelmediaautoplay.h" |
44 | #include "llviewerwindow.h" | ||
44 | #include "llfirstuse.h" | 45 | #include "llfirstuse.h" |
45 | 46 | ||
46 | // Static Variables | 47 | // Static Variables |
@@ -48,6 +49,9 @@ | |||
48 | S32 LLViewerParcelMedia::sMediaParcelLocalID = 0; | 49 | S32 LLViewerParcelMedia::sMediaParcelLocalID = 0; |
49 | LLUUID LLViewerParcelMedia::sMediaRegionID; | 50 | LLUUID LLViewerParcelMedia::sMediaRegionID; |
50 | 51 | ||
52 | // Local functions | ||
53 | void callback_play_media(S32 option, void* data); | ||
54 | |||
51 | // Move this to its own file. | 55 | // Move this to its own file. |
52 | // helper class that tries to download a URL from a web site and calls a method | 56 | // helper class that tries to download a URL from a web site and calls a method |
53 | // on the Panel Land Media and to discover the MIME type | 57 | // on the Panel Land Media and to discover the MIME type |
@@ -152,6 +156,14 @@ void LLViewerParcelMedia::update(LLParcel* parcel) | |||
152 | LLViewerMedia::setMimeType(parcel->getMediaType()); | 156 | LLViewerMedia::setMimeType(parcel->getMediaType()); |
153 | } | 157 | } |
154 | 158 | ||
159 | // First use warning | ||
160 | if( gSavedSettings.getWarning("FirstStreamingVideo") ) | ||
161 | { | ||
162 | gViewerWindow->alertXml("ParcelCanPlayMedia", | ||
163 | callback_play_media, (void*)parcel); | ||
164 | |||
165 | } | ||
166 | |||
155 | } | 167 | } |
156 | } | 168 | } |
157 | else | 169 | else |
@@ -361,3 +373,20 @@ void LLViewerParcelMedia::processParcelMediaUpdate( LLMessageSystem *msg, void * | |||
361 | } | 373 | } |
362 | } | 374 | } |
363 | } | 375 | } |
376 | |||
377 | void callback_play_media(S32 option, void* data) | ||
378 | { | ||
379 | LLParcel* parcel = (LLParcel*)data; | ||
380 | if (option == 0) | ||
381 | { | ||
382 | gSavedSettings.setBOOL("AudioStreamingVideo", TRUE); | ||
383 | LLViewerParcelMedia::play(parcel); | ||
384 | } | ||
385 | else | ||
386 | { | ||
387 | gSavedSettings.setBOOL("AudioStreamingVideo", FALSE); | ||
388 | } | ||
389 | gSavedSettings.setWarning("FirstStreamingVideo", FALSE); | ||
390 | |||
391 | } | ||
392 | |||