Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1274622 - Add media.default_volume preference. r=kinetik
Browse files Browse the repository at this point in the history
  • Loading branch information
i-rinat committed May 24, 2016
1 parent 9129b3d commit 83bba54
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dom/html/HTMLMediaElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2290,6 +2290,11 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
mIsAudioTrackAudible(false),
mAudible(IsAudible())
{
ErrorResult rv;

double defaultVolume = Preferences::GetFloat("media.default_volume", 1.0);
SetVolume(defaultVolume, rv);

mAudioChannel = AudioChannelService::GetDefaultAudioChannel();

mPaused.SetOuter(this);
Expand Down
3 changes: 3 additions & 0 deletions modules/libpref/init/all.js
Original file line number Diff line number Diff line change
Expand Up @@ -5426,6 +5426,9 @@ pref("dom.node.rootNode.enabled", false);
pref("dom.node.rootNode.enabled", true);
#endif

// Default media volume
pref("media.default_volume", "1.0");

// Once bug 1276272 is resolved, we will trun this preference to default ON in
// non-release channels.
#ifdef RELEASE_BUILD
Expand Down

0 comments on commit 83bba54

Please sign in to comment.