summaryrefslogtreecommitdiffstats
path: root/htdocs/audiohl.html
blob: ec4dd437ecdb3f551264c5cc1ce55267a2569353 (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
<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'); ep_type=1 ; ar='Entertainment' ; ep_id=0 ; s_id=0 ; val='0' ; p_name='balance' ; st_state=0">
    
    <button id="connected" onclick="init('audiohl');">Binder WS Fail</button>   <br><br>
    <button id="monitoring" onclick="window.open('/monitoring/monitor.html','_monitor_audio')">Debug/Monitoring</a></button>

    <b>Audio Role</b>
    <select select_id='audiorole_list' onclick='ar=this.value'>
        <option value='Warning' >Warning</option>
        <option value='Guidance'>Guidance</option>
        <option value='Notification'>Notification</option>
        <option value='Communication'>Communication</option>
        <option selected value='Entertainment'>Entertainment</option>
        <option value='System'>System</option>
        <option value='Startup'>Startup</option>
        <option value='Shutdown'>Shutdown</option>
    </select><br>
    <b>Endpoint Type</b>
    <select select_id='endpoint_type_list' onclick='ep_type=this.selectedIndex'>
        <option value=0>Source</option>
        <option selected value=1>Sink</option>
    </select><br>
    <b><label for="epidsel">Endpoint ID</label></b>
    <input id="epidsel" type="number" value="0" min=0 step=1 maxlength=4 onchange='ep_id=eval(parseInt(this.value))'><br>
    <b><label for="stidsel">Stream ID</label></b>
    <input id="stidsel" type="number" value="0" min=0 step=1 maxlength=4 onchange='s_id=eval(parseInt(this.value))'><br>
  <b>Property</b>
        <select select_id='property_name_list' onclick='p_name=this.value'>
        <option selected value='balance'>Balance</option>
        <option value='fade'>Fade</option>
        <option value='eq_bass'>EQ Bass</option>
        <option value='eq_mid'>EQ Mid</option>
        <option value='eq_treble'>EQ Treble</option>
        <option value='preset_name'>Preset Name</option>       
    </select><br>
    <b><label for="valpropsel">Volume/Property Value</label></b>
    <input id="valpropsel" type="number" value="0" min=0 max=100 step=1 maxlength=4 onchange='val=this.value'><br>
    <b>Stream Active/Mute State</b>
    <select select_id='state_value_list' onclick='st_state=this.selectedIndex'>
        <option selected value='off'>Off</option>
        <option value='on'>On</option>
    </select><br>

    <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','get_stream_info', {stream_id:s_id})">get_stream_info(stream_id)</button></li>
    <li><button onclick="callbinder('audiohl','set_stream_state', {stream_id:s_id,state:st_state})">set_stream_state(stream_id,stream_state)</button></li>
    <li><button onclick="callbinder('audiohl','set_stream_mute', {stream_id:s_id,mute:st_state})">set_stream_mute(stream_id,mute)</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','get_list_properties', {endpoint_type:ep_type,endpoint_id:ep_id})">get_list_properties(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:p_name})">get_property(endpoint_type,endpoint_id,property)</button></li>   
    <li><button onclick="callbinder('audiohl','get_list_events', {audio_role:ar})">get_list_events(audio_role)</button></li>
    <li><button onclick="callbinder('audiohl','post_event', {event_name:'play_sound',audio_role:ar,media_name:'HomeButton.wav'})">post_event(play_sound,audio_role,'HomeButton.wav')</button></li>
    <li><button onclick="callbinder('audiohl','subscribe', {events:['ahl_endpoint_property_event','ahl_endpoint_volume_event','ahl_post_event']})">subscribe(['ahl_endpoint_property_event','ahl_endpoint_volume_event','ahl_post_event'])</button>
    <li><button onclick="callbinder('audiohl','unsubscribe', {events:['ahl_endpoint_property_event','ahl_endpoint_volume_event','ahl_post_event']})">unsubscribe(['ahl_endpoint_property_event','ahl_endpoint_volume_event','ahl_post_event'])</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>