We de-obfuscated the server.prod.js - hereās the start of AudioControllerLocal:
const s = n(4),
i = n(12),
a = n(2),
u = n(1),
l = n("./server/settings.js"),
c = n(26),
d = n("./common/Device.js"),
p = new c.AudioPlayer;
t.default = class {
constructor(e) {
this.currentTrackID = -1, this.app = e, this.lastSavedStateTime = new Date, this.lastStateReported = this.state = {
state: "stopped",
output: null,
id: ""
}, this.statusUpdatesEnabled = !0, this.lastStateChangeAt = new Date, this.state = {}, this.newState = {}
}
initialize() {
var e = this;
return o(function*() {
console.info("Audio: Ready.");
let t = process.env.PLUGIN_PATH;
t || (t = a.join(r, "..", "node_modules", "treble", "build", "Release"), s.existsSync(t) || (t = a.join(process.execPath, "..", "..", "..", "..", "..", "Resources", "app.asar.unpacked", "node_modules", "treble", "build", "Release"))), p.setPluginPath(t), "linux" === i.platform() && "arm" === i.arch() || p.setUdpPacketTarget("127.0.0.1", 36601), p.setLoggerCallback(function(e) {
const t = `[TREBLE] ${e.message}`;
0 === e.level ? console.error(t) : 1 === e.level ? console.warn(t) : console.debug(t)
}), yield p.setPlayerInfo({
username: (yield e.app.settings.get("user:name")) || "???",
clientIdentifier: (yield e.app.settings.get("user:identifier")) || "???",
platform: e.app.player.platform,
platformVersion: e.app.player.platformVersion,
product: e.app.player.product,
version: e.app.player.version,
device: e.app.player.device,
deviceName: (yield e.app.settings.get("player:name")) || e.app.player.deviceName
}), console.info("Audio: Set player info.");
const n = yield l.get("state");
n && e.setVolume(n.volume || 100)
})()
}
It appears to use a plugin called āTrebleā that is binary only. From what we can tell, inititalize() doesnāt pass any audio device information to Treble from the settings file loaded at āl = n("./server/settings.js")ā For reference, here is the de-obfuscated file: https://gist.github.com/micronova-jb/c7bc03ae046ce6ce988d3062555ed6e3
We also found the default settings configuration (server.json). Hereās what it looks like:
r.defaults({
user: {
token: null,
id: null
},
audio: {
controller: "127.0.0.1",
normalize: !0,
crossfade: !0
},
player: {
name: "",
identifier: null
},
logging: {
level: "debug",
colors: !0
}
})
No hints here on how to specify an audio output device.
Does Treble just guess which audio output it should use? Is there something that weāre missing?