Added WiFi button and system-apis
This commit is contained in:
11
api/set_volume.php
Normal file
11
api/set_volume.php
Normal file
@ -0,0 +1,11 @@
|
||||
<?php
|
||||
header('Content-Type: application/json');
|
||||
$level = intval($_GET['level'] ?? 50);
|
||||
if ($level < 0 || $level > 100) {
|
||||
echo json_encode(['success' => false, 'error' => 'Invalid level']);
|
||||
exit;
|
||||
}
|
||||
|
||||
$output = shell_exec("pactl set-sink-volume @DEFAULT_SINK@ {$level}%");
|
||||
echo json_encode(['success' => true]);
|
||||
?>
|
Reference in New Issue
Block a user