something something volume
This commit is contained in:
parent
67367c50e1
commit
25bf77b84b
1 changed files with 3 additions and 1 deletions
4
app.py
4
app.py
|
|
@ -11,6 +11,8 @@ outputs = link.list_outputs()
|
||||||
source = outputs[-1]
|
source = outputs[-1]
|
||||||
sink = inputs[-1]
|
sink = inputs[-1]
|
||||||
audio_controller = Controller()
|
audio_controller = Controller()
|
||||||
|
interface = audio_controller.get_list_interfaces(type_interfaces="Client",filtered_by_type=True,)
|
||||||
|
steam=interface[-1]
|
||||||
|
|
||||||
# initialization
|
# initialization
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
@ -61,7 +63,7 @@ def disconnect():
|
||||||
|
|
||||||
@app.route('/api/volume/<float:vol>')
|
@app.route('/api/volume/<float:vol>')
|
||||||
def set_volume(vol):
|
def set_volume(vol):
|
||||||
audio_controller.set_config(volume=vol)
|
steam.set_config(volume=vol)
|
||||||
return jsonify({'data': 'volume set'})
|
return jsonify({'data': 'volume set'})
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue