summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/newview/llviewermedia.cpp17
-rwxr-xr-xindra/newview/llviewermedia.h1
2 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index ffae3c0e1f..0b70af44bc 100755
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -1660,6 +1660,8 @@ void LLViewerMedia::onTeleportFinished()
{
// On teleport, clear this setting (i.e. set it to true)
gSavedSettings.setBOOL("MediaTentativeAutoPlay", true);
+
+ LLViewerMediaImpl::sMimeTypesFailed.clear();
}
@@ -1671,6 +1673,7 @@ void LLViewerMedia::setOnlyAudibleMediaTextureID(const LLUUID& texture_id)
sForceUpdate = true;
}
+std::vector<std::string> LLViewerMediaImpl::sMimeTypesFailed;
//////////////////////////////////////////////////////////////////////////////////////////
// LLViewerMediaImpl
//////////////////////////////////////////////////////////////////////////////////////////
@@ -1943,10 +1946,16 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
}
LL_WARNS_ONCE("Plugin") << "plugin initialization failed for mime type: " << media_type << LL_ENDL;
- LLSD args;
- args["MIME_TYPE"] = media_type;
- LLNotificationsUtil::add("NoPlugin", args);
-
+ if(gAgent.isInitialized())
+ {
+ if (std::find(sMimeTypesFailed.begin(), sMimeTypesFailed.end(), media_type) == sMimeTypesFailed.end())
+ {
+ LLSD args;
+ args["MIME_TYPE"] = media_type;
+ LLNotificationsUtil::add("NoPlugin", args);
+ sMimeTypesFailed.push_back(media_type);
+ }
+ }
return NULL;
}
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index ede408dd0c..268dcae20e 100755
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -469,6 +469,7 @@ private:
std::string mTarget;
LLNotificationPtr mNotification;
bool mCleanBrowser; // force the creation of a clean browsing target with full options enabled
+ static std::vector<std::string> sMimeTypesFailed;
private:
BOOL mIsUpdated ;