Skip to content
Snippets Groups Projects
Commit bffbd93b authored by Tofu Linden's avatar Tofu Linden
Browse files

DEV-44804 autoplay preference for media should enable the media subsystem when...

DEV-44804 autoplay preference for media should enable the media subsystem when toggled from off to on
parent 3e6d795d
No related merge requests found
......@@ -325,6 +325,7 @@ LLFloaterPreference::LLFloaterPreference(const LLSD& key)
mCommitCallbackRegistrar.add("Pref.WindowedMod", boost::bind(&LLFloaterPreference::onCommitWindowedMode, this));
mCommitCallbackRegistrar.add("Pref.UpdateSliderText", boost::bind(&LLFloaterPreference::onUpdateSliderText,this, _1,_2));
mCommitCallbackRegistrar.add("Pref.AutoDetectAspect", boost::bind(&LLFloaterPreference::onCommitAutoDetectAspect, this));
mCommitCallbackRegistrar.add("Pref.ParcelMediaAutoPlayEnable", boost::bind(&LLFloaterPreference::onCommitParcelMediaAutoPlayEnable, this));
mCommitCallbackRegistrar.add("Pref.onSelectAspectRatio", boost::bind(&LLFloaterPreference::onKeystrokeAspectRatio, this));
mCommitCallbackRegistrar.add("Pref.QualityPerformance", boost::bind(&LLFloaterPreference::onChangeQuality, this, _2));
mCommitCallbackRegistrar.add("Pref.applyUIColor", boost::bind(&LLFloaterPreference::applyUIColor, this ,_1, _2));
......@@ -986,6 +987,25 @@ void LLFloaterPreference::onCommitAutoDetectAspect()
}
}
void LLFloaterPreference::onCommitParcelMediaAutoPlayEnable()
{
BOOL autoplay = getChild<LLCheckBoxCtrl>("autoplay_enabled")->get();
gSavedSettings.setBOOL(LLViewerMedia::AUTO_PLAY_MEDIA_SETTING, autoplay);
lldebugs << "autoplay now = " << int(autoplay) << llendl;
if (autoplay)
{
// autoplay toggle has gone from FALSE to TRUE; ensure that
// the media system is thus actually turned on too.
gSavedSettings.setBOOL("AudioStreamingVideo", TRUE);
gSavedSettings.setBOOL("AudioStreamingMusic", TRUE);
gSavedSettings.setBOOL("AudioStreamingMedia", TRUE);
llinfos << "autoplay turned on, turned all media subsystems on" << llendl;
}
}
void LLFloaterPreference::refresh()
{
LLPanel::refresh();
......
......@@ -132,6 +132,7 @@ class LLFloaterPreference : public LLFloater
// void fractionFromDecimal(F32 decimal_val, S32& numerator, S32& denominator);
void onCommitAutoDetectAspect();
void onCommitParcelMediaAutoPlayEnable();
void applyResolution();
void applyUIColor(LLUICtrl* ctrl, const LLSD& param);
void getUIColor(LLUICtrl* ctrl, const LLSD& param);
......
......@@ -85,7 +85,10 @@
left="30"
name="autoplay_enabled"
top_pad="10"
width="350" />
width="350">
<check_box.commit_callback
function="Pref.ParcelMediaAutoPlayEnable" />
</check_box>
<text
type="string"
length="1"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment