diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-22 20:46:45 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-22 20:46:45 +0800 |
commit | 60f0e2894f311d310273aef6dc9743bec2fb7308 (patch) | |
tree | 698fc42770fa4c8356bc86a63cee1d472282c361 /indra/newview | |
parent | f0de82fcf8a3718f557431610396b4e240787442 (diff) | |
parent | 78c6c73770202cedcc92d4b19bccd4ffe9075bef (diff) |
Merge branch 'main' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.h | 1 |
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; }; |