diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-23 21:48:07 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-23 21:48:07 +0800 |
commit | 5a2aaba40f6b23b9497eceb0cb4e753c1255732e (patch) | |
tree | 7d10b4c04932e58b029bd4a984e6eaa533e28082 /indra/newview | |
parent | 8081dba75bd761cad54ecb212fbbb5499c75b693 (diff) |
Stream notification header uses title metadata
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llviewermedia_streamingaudio.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llviewermedia_streamingaudio.cpp b/indra/newview/llviewermedia_streamingaudio.cpp index 15b6e3f802..6e3d84b3bf 100644 --- a/indra/newview/llviewermedia_streamingaudio.cpp +++ b/indra/newview/llviewermedia_streamingaudio.cpp @@ -118,8 +118,12 @@ int LLStreamingAudio_MediaPlugins::isPlaying() auto nowPlaying = mMediaPlugin->getMediaNowPlaying(); if (mNowPlaying != nowPlaying) { - LLNotificationsUI::LLNotificationManager::instance().onChat(LLChat{llformat("Now playing %s.", nowPlaying.c_str())}, LLSD{}); + mTitle = mMediaPlugin->getMediaTitle(); mNowPlaying = nowPlaying; + LLChat chat{llformat("Now playing %s.", nowPlaying.c_str())}; + chat.mFromName = mTitle; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLNotificationsUI::LLNotificationManager::instance().onChat(chat, LLSD{}); } switch (status) diff --git a/indra/newview/llviewermedia_streamingaudio.h b/indra/newview/llviewermedia_streamingaudio.h index 5abefcdb0b..e1f7cd71d9 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 mTitle; std::string mNowPlaying; F32 mGain; }; |