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
|
<html>
<head>
<link rel="stylesheet" href="AudioBinding.css">
<title>Audio High Level Test</title>
<script type="text/javascript" src="AFB-websock.js"></script>
<script type="text/javascript" src="AudioBinding.js"></script>
</head>
<body onload="init('audiohl')">
<button id="connected" onclick="init('audiohl');">Binder WS Fail</button>
<b>Audio Role</b>
<select select_id='audiorole_list' onclick='ar=this.value'>
<option selected value=''>Select...</option>
<option value='warning' >Warning</option>
<option value='guidance'>Guidance</option>
<option value='notification'>Notification</option>
<option value='communication'>Communication</option>
<option value='entertainment'>Entertainment</option>
<option value='system'>System</option>
<option value='startup'>Startup</option>
<option value='shutdown'>Shutdown</option>
</select>
<b>Endpoint Type</b>
<select select_id='endpoint_type_list' onclick='ep_type=this.selectedIndex'>
<option value=0>Source</option>
<option value=1>Sink</option>
<option selected value=''>Select...</option>
</select>
<b>Endpoint ID</b>
<select select_id='endpoint_id_list' onclick='ep_id=this.selectedIndex'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option selected value=''>Select...</option>
</select>
<b>Stream ID</b>
<select select_id='stream_id_list' onclick='s_id=this.selectedIndex'>
<option value='0'>0</option>
<option value='1'>1</option>
<option value='2'>2</option>
<option value='3'>3</option>
<option value='4'>4</option>
<option value='5'>5</option>
<option value='6'>6</option>
<option value='7'>7</option>
<option value='8'>8</option>
<option value='9'>9</option>
<option value='10'>10</option>
<option value='11'>11</option>
<option value='12'>12</option>
<option value='13'>13</option>
<option value='14'>14</option>
<option value='15'>15</option>
<option value='16'>16</option>
<option value='17'>17</option>
<option value='18'>18</option>
<option value='19'>19</option>
<option selected value=''>Select...</option>
</select>
<b>Property</b>
<select select_id='property_name_list' onclick='p_name=this.value'>
<option value='balance'>Balance</option>
<option value='fade'>Fade</option>
<option value='eq_low'>EQ Low</option>
<option value='eq_mid'>EQ Mid</option>
<option value='eq_high'>EQ High</option>
<option selected value=''>Select...</option>
</select>
<b>State Name</b>
<select select_id='state_name_list' onclick='st_name=this.value'>
<option value='mute'>Mute</option>
<option value='active'>Active</option>
<option selected value=''>Select...</option>
</select>
<b>State Value</b>
<select select_id='state_value_list' onclick='st_val=this.value'>
<option value='on'>On</option>
<option value='off'>Off</option>
<option selected value=''>Select...</option>
</select>
<b>Volume Value</b>
<select select_id='value_list' onclick='val=this.value'>
<option value='0'>0</option>
<option value='20'>20</option>
<option value='40'>40</option>
<option value='60'>60</option>
<option value='80'>80</option>
<option value='100'>100</option>
<option selected value=''>Select...</option>
</select>
<br>
<ol>
<li><button onclick="callbinder('audiohl','get_sources', {audio_role:ar})">get_sources(audio_role)</button></li>
<li><button onclick="callbinder('audiohl','get_sinks', {audio_role:ar})">get_sinks(audio_role)</button></li>
<li><button onclick="callbinder('audiohl','stream_open', {audio_role:ar,endpoint_type:ep_type})">stream_open(audio_role,endpoint_type)</button></li>
<li><button onclick="callbinder('audiohl','stream_open', {audio_role:ar,endpoint_type:ep_type,endpoint_id:ep_id})">stream_open(audio_role,enpoint_type,endpoint_id)</button></li>
<li><button onclick="callbinder('audiohl','stream_close', {stream_id:s_id})">stream_close(stream_id)</button></li>
<li><button onclick="callbinder('audiohl','set_volume', {endpoint_type:ep_type,endpoint_id:ep_id,volume:val})">set_volume(endpoint_type,endpoint_id,value)</button></li>
<li><button onclick="callbinder('audiohl','get_volume', {endpoint_type:ep_type,endpoint_id:ep_id})">get_volume(endpoint_type,endpoint_id)</button></li>
<li><button onclick="callbinder('audiohl','set_property', {endpoint_type:ep_type,endpoint_id:ep_id,property_name:p_name,value:val})">set_property(endpoint_type,endpoint_id,property,value)</button></li>
<li><button onclick="callbinder('audiohl','get_property', {endpoint_type:ep_type,endpoint_id:ep_id,property_name:'balance'})">get_property(endpoint_type,endpoint_id,'balance')</button></li>
<li><button onclick="callbinder('audiohl','set_state', {endpoint_type:ep_type,endpoint_id:ep_id,state_name:st_name,state_value:st_val})">set_state(endpoint_type,endpoint_id,stateName,stateVal)</button></li>
<li><button onclick="callbinder('audiohl','get_state', {endpoint_type:ep_type,endpoint_id:ep_id,state_name:st_name})">get_state(endpoint_type,endpoint_id,stateName)</button></li>
<li><button onclick="callbinder('audiohl','post_sound_event', {event_name:'PlaySound',audio_role:'notification',media_name:'HomeButton.wav'})">post_sound_event('PlaySound','HomeButton.wav')</button></li>
<li><button onclick="callbinder('audiohl','subscribe', {events:['SinkDeviceChanges','StreamStatusChanges']})">subscribe(['SinkDeviceChanges','StreamStatusChanges'])</button>
<li><button onclick="callbinder('audiohl','unsubscribe', {events:['SinkDeviceChanges','StreamStatusChanges']})">unsubscribe(['SinkDeviceChanges','StreamStatusChanges'])</button>
</li>
<br>
</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>
|