summaryrefslogtreecommitdiffstats
path: root/conf.d/project/htdocs/index.html
blob: 3b2b4ade40384079f4becb003e08dce536e3619e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<html>
    <head>
        <title>Simple COntroller Test</title>
        <link rel="stylesheet" href="AudioBinding.css">
        <script type="text/javascript" src="AFB-websock.js"></script>
        <script type="text/javascript" src="AudioBinding.js"></script>
        <script type="text/javascript">

            var frontend = {
                "devices": {
                    "playback": 0,
                    "capture": 1
                },
                "ramps": [
                    {
                        "uid": "ramp-fast",
                        "delay": 50,
                        "up": 10,
                        "down": 3
                    },
                    {
                        "uid": "ramp-slow",
                        "delay": 250,
                        "up": 3,
                        "down": 1
                    },
                    {
                        "uid": "ramp-normal",
                        "delay": 100,
                        "up": 6,
                        "down": 2
                    }
                ],
                "subdevs": [
                    {
                        "subdev": 0,
                        "numid": 51
                    },
                    {
                        "subdev": 1,
                        "numid": 57
                    },
                    {
                        "subdev": 2,
                        "numid": 63
                    },
                    {
                        "subdev": 3,
                        "numid": 69
                    },
                    {
                        "subdev": 4,
                        "numid": 75
                    },
                    {
                        "subdev": 5,
                        "numid": 81
                    },
                    {
                        "subdev": 6,
                        "numid": 87
                    },
                    {
                        "subdev": 7,
                        "numid": 93
                    }
                ]
            };
            var audio_defaults = {
                "rate": 48000
            };
            var usb_yamaha = {
                uid: "YAMAHA-APU70",
                devpath: "/dev/snd/by-id/usb-YAMAHA_Corporation_YAMAHA_AP-U70_USB_Audio_00-00",
                params: snd_params,
                sink: [
                    {uid: "front-right", port: 0},
                    {uid: "front-left", port: 1}
                ]
            };
            var zone_front = {
                uid: "front-seats",
                type: "playback",
                mapping: [
                    {target: "front-right", channel: 0},
                    {target: "front-left", channel: 1}
                ]
            };

            var stream_music = {
                uid: "multimedia",
                zone: "front-seats",
                ramp: "ramp-slow",
                volume: 60,
                mute: false
            };

            var stream_navigation = {
                uid: "navigation",
                zone: "front-seats",
                ramp: "ramp-normal",
                volume: 70,
                mute: false
            };

            var stream_emergency = {
                uid: "emergency",
                zone: "front-seats",
                ramp: "ramp-fast",
                volume: 80,
                mute: false
            };

            var my_test_mixer = {
               uid: 'simple_mixer',
               backend: usb_yamaha,
               frontend: frontend,
               zones: zone_front,
               streams: [stream_music, stream_navigation, stream_emergency]
            };

        </script>

    </head>

    <body onload="init('hal_registry', 'alsacore', 'hallist')">

        <h1>Simple Mixer Test</h1>
        <button id="connected" onclick="init()">Binder WS Fail</button> 
        <button id="mnitoring" onclick="window.open('/monitoring/monitor.html', '_monitor_ctl')">Debug/Monitoring</a></button>
    <br><br>

    <h2>V3 API CALL</h2>
    <ol>
        <li><button onclick="callbinder('softmixer', 'simple_mixer', {list: {streams: true}});">Streams List</button></li>
        <br>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/multimedia', {toggle: true});">Stream Multimedia pause/resume</button></li>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/navigation', {toggle: true});">Stream Navigation pause/resume</button></li>
        <br>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/multimedia', {volume: '+10'});">Stream Multimedia volume=+10"</button></li>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/multimedia', {volume: '-10'});">Stream Multimedia volume=-10"</button></li>
        <br>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/multimedia', {ramp: 30});">Stream Multimedia ramp=30"</button></li>
        <li><button onclick="callbinder('softmixer', 'simple_mixer/multimedia', {ramp: 80});">Stream Multimedia ramp=80"</button></li>
        <br>
        <li><button onclick="callbinder('softmixer', 'simple_mixer', {delete: true});">Close Mixer"</button></li>
        <li><button onclick="callbinder('softmixer', 'create',my_test_mixer = {uid:'simple_mixer', backend: usb_yamaha, frontend: frontend,
               zones: [zone_front],streams: [stream_music, stream_navigation, stream_emergency]});">New Mixer"</button></li>
    </ol>

    <div id="main" style="visibility:hidden">
        <ol>
            <li>Question <pre id="question"></pre>
            <li>Response <pre id="output"></pre>
            <li>Events: <pre id="outevt"></pre>
        </ol>
    </div>