summaryrefslogtreecommitdiff
path: root/indra/llplugin
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-09-04 18:18:50 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-09-08 19:21:20 +0300
commitf4d9d23927368884ffbd859fb4a9e8886ff5004a (patch)
tree75e8f1bfa077fbbd37ac0134edca7a203801a558 /indra/llplugin
parentdedb490a113633ae4311b00cb844b50ed950864f (diff)
#6223 360 Snapshot should make an inworld sound
Diffstat (limited to 'indra/llplugin')
-rw-r--r--indra/llplugin/llpluginclassmedia.cpp8
-rw-r--r--indra/llplugin/llpluginclassmedia.h8
-rw-r--r--indra/llplugin/llpluginclassmediaowner.h1
3 files changed, 16 insertions, 1 deletions
diff --git a/indra/llplugin/llpluginclassmedia.cpp b/indra/llplugin/llpluginclassmedia.cpp
index 2269d7adc8..540bd77b7d 100644
--- a/indra/llplugin/llpluginclassmedia.cpp
+++ b/indra/llplugin/llpluginclassmedia.cpp
@@ -1309,8 +1309,16 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
else if (message_name == "file_download")
{
mFileDownloadFilename = message.getValue("filename");
+ mFileDownloadProgressPercent = 0;
+ mFileDownloadProgressComplete = false;
mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_FILE_DOWNLOAD);
}
+ else if (message_name == "file_download_progress")
+ {
+ mFileDownloadProgressPercent = message.getValueS32("percent");
+ mFileDownloadProgressComplete = message.getValueBoolean("complete");
+ mediaEvent(LLPluginClassMediaOwner::MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS);
+ }
else if(message_name == "debug_message")
{
mDebugMessageText = message.getValue("message_text");
diff --git a/indra/llplugin/llpluginclassmedia.h b/indra/llplugin/llpluginclassmedia.h
index 153a7eb823..1d886f16f9 100644
--- a/indra/llplugin/llpluginclassmedia.h
+++ b/indra/llplugin/llpluginclassmedia.h
@@ -324,9 +324,13 @@ public:
std::string getHoverText() const { return mHoverText; };
std::string getHoverLink() const { return mHoverLink; };
- // these are valid during MEDIA_EVENT_LINK_HOVERED
+ // These are valid during MEDIA_EVENT_FILE_DOWNLOAD
std::string getFileDownloadFilename() const { return mFileDownloadFilename; }
+ // these are valid during MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS
+ int getFileDownloadProgressPercent() const { return mFileDownloadProgressPercent; }
+ bool getFileDownloadProgressComplete() const { return mFileDownloadProgressComplete; }
+
const std::string& getMediaName() const { return mMediaName; };
std::string getMediaDescription() const { return mMediaDescription; };
@@ -488,6 +492,8 @@ protected:
std::string mHoverText;
std::string mHoverLink;
std::string mFileDownloadFilename;
+ int mFileDownloadProgressPercent = 0;
+ bool mFileDownloadProgressComplete = false;
bool mIsMultipleFilePick;
/////////////////////////////////////////
diff --git a/indra/llplugin/llpluginclassmediaowner.h b/indra/llplugin/llpluginclassmediaowner.h
index a75d0b9960..76f93be3eb 100644
--- a/indra/llplugin/llpluginclassmediaowner.h
+++ b/indra/llplugin/llpluginclassmediaowner.h
@@ -64,6 +64,7 @@ public:
MEDIA_EVENT_AUTH_REQUEST, // The plugin wants to display an auth dialog
MEDIA_EVENT_FILE_DOWNLOAD, // the plugin wants to download a file
+ MEDIA_EVENT_FILE_DOWNLOAD_PROGRESS, // file download progress/completion update
MEDIA_EVENT_DEBUG_MESSAGE, // plugin sending back debug information for host to process