mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 881251 - Add mute/unmute to media context menus. r=lucasr
This commit is contained in:
parent
56737532c1
commit
823cf72112
@ -543,6 +543,18 @@ var BrowserApp = {
|
||||
aTarget.mozRequestFullScreen();
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.mute"),
|
||||
NativeWindow.contextmenus.mediaContext("media-unmuted"),
|
||||
function(aTarget) {
|
||||
aTarget.muted = true;
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.unmute"),
|
||||
NativeWindow.contextmenus.mediaContext("media-muted"),
|
||||
function(aTarget) {
|
||||
aTarget.muted = false;
|
||||
});
|
||||
|
||||
NativeWindow.contextmenus.add(Strings.browser.GetStringFromName("contextmenu.copyImageLocation"),
|
||||
NativeWindow.contextmenus.imageLocationCopyableContext,
|
||||
function(aTarget) {
|
||||
@ -1942,6 +1954,12 @@ var NativeWindow = {
|
||||
let controls = aElt.controls;
|
||||
if (!controls && aMode == "media-hidingcontrols")
|
||||
return true;
|
||||
|
||||
let muted = aElt.muted;
|
||||
if (muted && aMode == "media-muted")
|
||||
return true;
|
||||
else if (!muted && aMode == "media-unmuted")
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -164,6 +164,8 @@ contextmenu.playMedia=Play
|
||||
contextmenu.pauseMedia=Pause
|
||||
contextmenu.shareMedia=Share Video
|
||||
contextmenu.showControls2=Show Controls
|
||||
contextmenu.mute=Mute
|
||||
contextmenu.unmute=Unmute
|
||||
contextmenu.saveVideo=Save Video
|
||||
contextmenu.saveAudio=Save Audio
|
||||
contextmenu.addToContacts=Add to Contacts
|
||||
|
Loading…
Reference in New Issue
Block a user