From 5a2aaba40f6b23b9497eceb0cb4e753c1255732e Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Fri, 23 Aug 2024 21:48:07 +0800 Subject: Stream notification header uses title metadata --- indra/newview/llviewermedia_streamingaudio.cpp | 6 +++++- indra/newview/llviewermedia_streamingaudio.h | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview') 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; }; -- cgit v1.2.3