summaryrefslogtreecommitdiffstats
path: root/src/js/volume.js
diff options
context:
space:
mode:
authorRoger Zanoni <rzanoni@igalia.com>2024-01-03 13:52:10 -0300
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2024-01-29 12:07:45 +0000
commit52aabdb011279871468269802e056f0ec48511e4 (patch)
treed040640cad2272f58e097909cb4eb59daec997a1 /src/js/volume.js
parent38587cf96c096a204cd742fff9fea4f8e465393a (diff)
Update mixer app to use grpc-web instead of websockets
Adapt the HTML5 applications to use kuksa.val service Bug-AGL: SPEC-4599 Signed-off-by: Roger Zanoni <rzanoni@igalia.com> Change-Id: Ic67ff781be4080c45bdbc6abe20d696aeda08eb1
Diffstat (limited to 'src/js/volume.js')
-rw-r--r--src/js/volume.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/js/volume.js b/src/js/volume.js
index 0bbb481..749496b 100644
--- a/src/js/volume.js
+++ b/src/js/volume.js
@@ -35,21 +35,22 @@ export function setValue(node, value) {
// all the below functions need to be update to use
// the correct paths/elements
export function increase(node) {
- KUKSA.set(PATHS.volume, getValue(node)+5);
+ KUKSA.setUInt32(PATHS.volume, getValue(node)+5);
}
export function decrease(node) {
- KUKSA.set(PATHS.volume, getValue(node)-5);
+ KUKSA.setUInt32(PATHS.volume, getValue(node)-5);
}
export function change(node) {
- KUKSA.set(PATHS.volume, node.value);
+ KUKSA.setUInt32(PATHS.volume, node.value);
}
-export function update(path, value) {
+export function update(path, dp) {
+ var value = dp.getUint32();
setValue(document.getElementById('progress-MAIN'), value);
}
export function init() {
- KUKSA.set(PATHS.volume, 20);
+ KUKSA.setUInt32(PATHS.volume, 20);
}