diff --git a/audio/bus_mallets.mp3 b/audio/bus_mallets.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..349a39fb0a7162ef32ebc42c241bb547b99a6e4d Binary files /dev/null and b/audio/bus_mallets.mp3 differ diff --git a/audio/bus_mallets.wav b/audio/bus_mallets.wav new file mode 100644 index 0000000000000000000000000000000000000000..7b4446334b3a9449574ba65eafe6f66c03bc6283 Binary files /dev/null and b/audio/bus_mallets.wav differ diff --git a/audio/car_marimba.mp3 b/audio/car_marimba.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..873a214bd00e9aff532f6a9897f6d554fc29f08e Binary files /dev/null and b/audio/car_marimba.mp3 differ diff --git a/audio/car_marimba.wav b/audio/car_marimba.wav new file mode 100644 index 0000000000000000000000000000000000000000..c540a7dc72b5b44e8d85cd2f6f6198e5f244b2d2 Binary files /dev/null and b/audio/car_marimba.wav differ diff --git a/audio/truck_glockenspiel.mp3 b/audio/truck_glockenspiel.mp3 new file mode 100644 index 0000000000000000000000000000000000000000..1f6c24dd06efe67a066d3fd466bf6202fa127d15 Binary files /dev/null and b/audio/truck_glockenspiel.mp3 differ diff --git a/audio/truck_glockenspiel.wav b/audio/truck_glockenspiel.wav new file mode 100644 index 0000000000000000000000000000000000000000..1d7eaabb1b60d0333517398c4ee4bf941167f994 Binary files /dev/null and b/audio/truck_glockenspiel.wav differ diff --git a/paavo.html b/paavo.html index ac9c428c7791329656969ad452eabb1a70da3c8c..80c64e1243f770a73088c458f0c1a9aa3aa3e3c2 100644 --- a/paavo.html +++ b/paavo.html @@ -40,12 +40,19 @@ VEHICLE_TRUCK = 2; VEHICLE_BUS = 3; + AUDIO = {}; + // Wav files are also available. + AUDIO[VEHICLE_CAR] = 'audio/car_marimba.mp3'; + AUDIO[VEHICLE_TRUCK] = 'audio/truck_glockenspiel.mp3'; + AUDIO[VEHICLE_BUS] = 'audio/bus_mallets.mp3'; + SEP = ','; SERVER = 'wss://smarter-data.tt.utu.fi/ws/'; // SERVER = 'ws://localhost:8080/' function send_data(ws, direction, vehicle_class) { ws.send(TMS_NUMBER + SEP + direction + SEP + vehicle_class + SEP + new Date().getTime()); + new Audio(AUDIO[vehicle_class]).play(); } </script>