summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-22 20:46:45 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-22 20:46:45 +0800
commit60f0e2894f311d310273aef6dc9743bec2fb7308 (patch)
tree698fc42770fa4c8356bc86a63cee1d472282c361 /indra/newview
parentf0de82fcf8a3718f557431610396b4e240787442 (diff)
parent78c6c73770202cedcc92d4b19bccd4ffe9075bef (diff)
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermedia_streamingaudio.cpp7
-rw-r--r--indra/newview/llviewermedia_streamingaudio.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp
index af3a21c183..15b6e3f802 100644
--- a/indra/newview/llviewermedia_streamingaudio.cpp
+++ b/indra/newview/llviewermedia_streamingaudio.cpp
@@ -34,6 +34,7 @@
#include "llmimetypes.h"
#include "lldir.h"
+#include "llnotificationmanager.h"
LLStreamingAudio_MediaPlugins::LLStreamingAudio_MediaPlugins() :
mMediaPlugin(NULL),
@@ -114,6 +115,12 @@ int LLStreamingAudio_MediaPlugins::isPlaying()
LLPluginClassMediaOwner::EMediaStatus status =
mMediaPlugin->getStatus();
+ auto nowPlaying = mMediaPlugin->getMediaNowPlaying();
+ if (mNowPlaying != nowPlaying)
+ {
+ LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("Now playing %s.", nowPlaying.c_str())}, LLSD{});
+ mNowPlaying = nowPlaying;
+ }
switch (status)
{
diff --git a/indra/newview/llviewermedia_streamingaudio.h b/indra/newview/llviewermedia_streamingaudio.h
index bf4d92c29e..5abefcdb0b 100644
--- a/indra/newview/llviewermedia_streamingaudio.h
+++ b/indra/newview/llviewermedia_streamingaudio.h
@@ -56,6 +56,7 @@ private:
LLPluginClassMedia *mMediaPlugin;
std::string mURL;
+ std::string mNowPlaying;
F32 mGain;
};