summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-15 03:43:43 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-15 03:43:43 +0200
commit1b929cb9a9d9216d1d34fb6dc4b0ea91600935b1 (patch)
tree9fd941b56b43434f270310fb094a8ea9099813b8 /indra/newview/llfloatertools.cpp
parent488fb8bab686b29916104d6d1f2f3d4cb1fef78a (diff)
SL-16344 #2 Do not play media preview if not opened
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r--indra/newview/llfloatertools.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index 87fc3d72cc..d2d4b7b364 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -1472,17 +1472,17 @@ void LLFloaterTools::navigateToTitleMedia( const std::string url )
else if (mTitleMedia)
{
LLPluginClassMedia* media_plugin = mTitleMedia->getMediaPlugin();
-
- if ( media_plugin ) // Shouldn't this be after navigateTo creates plugin?
- {
- // if it's a movie, we don't want to hear it
- media_plugin->setVolume( 0 );
- };
-
// check if url changed or if we need a new media source
if (mTitleMedia->getCurrentNavUrl() != url || media_plugin == NULL)
{
mTitleMedia->navigateTo( url );
+
+ LLViewerMediaImpl* impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(mTitleMedia->getTextureID());
+ if (impl)
+ {
+ // if it's a page with a movie, we don't want to hear it
+ impl->setVolume(0);
+ };
}
// flag that we need to update the title (even if no request were made)