From 1b929cb9a9d9216d1d34fb6dc4b0ea91600935b1 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 15 Jan 2022 03:43:43 +0200 Subject: SL-16344 #2 Do not play media preview if not opened --- indra/newview/llfloatermediasettings.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llfloatermediasettings.cpp') diff --git a/indra/newview/llfloatermediasettings.cpp b/indra/newview/llfloatermediasettings.cpp index 2afd889609..b34961e8a2 100644 --- a/indra/newview/llfloatermediasettings.cpp +++ b/indra/newview/llfloatermediasettings.cpp @@ -156,6 +156,18 @@ void LLFloaterMediaSettings::apply() } } +//////////////////////////////////////////////////////////////////////////////// +void LLFloaterMediaSettings::onOpen(const LLSD& key) +{ + if (mPanelMediaSettingsGeneral) + { + // media is expensive, so only load it when nessesary. + // If we need to preload it, set volume to 0 and any pause + // if applicable, then unpause here + mPanelMediaSettingsGeneral->updateMediaPreview(); + } +} + //////////////////////////////////////////////////////////////////////////////// void LLFloaterMediaSettings::onClose(bool app_quitting) { -- cgit v1.2.3