...
This commit is contained in:
parent
25bf77b84b
commit
8ebd75744d
1 changed files with 2 additions and 2 deletions
4
app.py
4
app.py
|
|
@ -12,7 +12,7 @@ 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,)
|
interface = audio_controller.get_list_interfaces(type_interfaces="Client",filtered_by_type=True,)
|
||||||
steam=interface[-1]
|
stream=interface[0]
|
||||||
|
|
||||||
# initialization
|
# initialization
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
@ -63,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):
|
||||||
steam.set_config(volume=vol)
|
stream.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