mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
dashboard volume fix
This commit is contained in:
2 files changed
+4
-3
No files matched your search
@@ -339,7 +339,7 @@ export class PlayerManager {
|
||||
});
|
||||
|
||||
player.on("volume", (volume) => {
|
||||
emit("volume", volume * 100);
|
||||
emit("volume", volume);
|
||||
this.dashboard.playerUpdate({ type: "volume" }, player);
|
||||
});
|
||||
|
||||
|
||||
@@ -281,8 +281,9 @@ export class Dashboard {
|
||||
const authErr = this._authorizePlayerControl(user, player);
|
||||
if (authErr) return { error: authErr };
|
||||
const vol = Number(params.data.volume);
|
||||
if (isNaN(vol) || vol < 0 || vol > 200) return { error: "Volume must be between 0 and 200" };
|
||||
const msg = player.setVolume(vol / 100);
|
||||
if (isNaN(vol) || vol < 0 || vol > 2) return {
|
||||
error: "Volume must be between 0 and 2" };
|
||||
const msg = player.setVolume(vol);
|
||||
return { message: msg };
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user