mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Add mac-media-control
This commit is contained in:
parent
5b48f5878c
commit
503a1e48d1
9 changed files with 320 additions and 5 deletions
|
|
@ -1795,12 +1795,16 @@ function HandleMediaControlAppCommand(action) {
|
|||
}
|
||||
|
||||
function getWindowsUIUtils() {
|
||||
if (AppConstants.platform != "win") {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return Cc["@mozilla.org/windows-ui-utils;1"]
|
||||
.getService(Ci.nsIWindowsUIUtils);
|
||||
if (AppConstants.platform == "win") {
|
||||
return Cc["@mozilla.org/windows-ui-utils;1"]
|
||||
.getService(Ci.nsIWindowsUIUtils);
|
||||
}
|
||||
if (AppConstants.platform == "macosx") {
|
||||
return Cc["@mozilla.org/mac-media-control;1"]
|
||||
.getService(Ci.nsIMacMediaControl);
|
||||
}
|
||||
return null;
|
||||
} catch (e) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue