summaryrefslogtreecommitdiff
path: root/toolkit/modules
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2022-04-04 17:33:15 +0200
committerMoonchild <moonchild@palemoon.org>2022-04-04 17:33:15 +0200
commit757a30f720cc4ae3e317594ff4249bc3fd9496ed (patch)
treef3299a64a8db431faf6f534ea950027c9de3a245 /toolkit/modules
parentba4eba034f726bbafe1fea841b2613d4e37e6cad (diff)
downloaduxp-757a30f720cc4ae3e317594ff4249bc3fd9496ed.tar.gz
Revert "Issue #1806 - Part 2: Adjust the platform for lib changes"
This reverts commit 3635039d2be6264673f3b89b8df390f03159fcaa.
Diffstat (limited to 'toolkit/modules')
-rw-r--r--toolkit/modules/Troubleshoot.jsm46
1 files changed, 4 insertions, 42 deletions
diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm
index d8f485d2c0..8ff6be30ba 100644
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -332,6 +332,9 @@ var dataProviders = {
data.numAcceleratedWindows++;
}
+ let winUtils = Services.wm.getMostRecentWindow("").
+ QueryInterface(Ci.nsIInterfaceRequestor).
+ getInterface(Ci.nsIDOMWindowUtils)
data.supportsHardwareH264 = "Unknown";
try {
// After restart - data may not be available
@@ -342,6 +345,7 @@ var dataProviders = {
promises.push(promise);
} catch (e) {}
+ data.currentAudioBackend = winUtils.currentAudioBackend;
if (!data.numAcceleratedWindows && gfxInfo) {
#ifdef XP_WIN
@@ -488,48 +492,6 @@ var dataProviders = {
completed();
},
- media: function media(done) {
- function convertDevices(devices) {
- if (!devices) {
- return undefined;
- }
- let infos = [];
- for (let i = 0; i < devices.length; ++i) {
- let device = devices.queryElementAt(i, Ci.nsIAudioDeviceInfo);
- infos.push({
- name: device.name,
- groupId: device.groupId,
- vendor: device.vendor,
- type: device.type,
- state: device.state,
- preferred: device.preferred,
- supportedFormat: device.supportedFormat,
- defaultFormat: device.defaultFormat,
- maxChannels: device.maxChannels,
- defaultRate: device.defaultRate,
- maxRate: device.maxRate,
- minRate: device.minRate,
- maxLatency: device.maxLatency,
- minLatency: device.minLatency
- });
- }
- return infos;
- }
-
- let data = {};
- let winUtils = Services.wm.getMostRecentWindow("").
- QueryInterface(Ci.nsIInterfaceRequestor).
- getInterface(Ci.nsIDOMWindowUtils);
- data.currentAudioBackend = winUtils.currentAudioBackend;
- data.currentMaxAudioChannels = winUtils.currentMaxAudioChannels;
- data.currentPreferredSampleRate = winUtils.currentPreferredSampleRate;
- data.audioOutputDevices = convertDevices(winUtils.audioDevices(Ci.nsIDOMWindowUtils.AUDIO_OUTPUT).
- QueryInterface(Ci.nsIArray));
- data.audioInputDevices = convertDevices(winUtils.audioDevices(Ci.nsIDOMWindowUtils.AUDIO_INPUT).
- QueryInterface(Ci.nsIArray));
- done(data);
- },
-
javaScript: function javaScript(done) {
let data = {};
let winEnumer = Services.ww.getWindowEnumerator();