aboutsummaryrefslogtreecommitdiffstats
path: root/htdocs/index.html
blob: bf5f840e33dde81f8d029074b985cc61750c50b0 (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
<html>

<head>
    <title>VSHL API Test</title>
    <link rel="stylesheet" href="binding.css">
    <script type="text/javascript" src="AFB.js"></script>
    <script type="text/javascript" src="amazon.js"></script>
    <script type="text/javascript" src="binding.js"></script>
</head>

<body class="page-content" onload="init()">

    <h1>Voice Service High Level API Tester</h1>

    <button id="connected" onclick="init()">Binder WS Fail</button>
    <button id="monitoring" onclick="window.open('/monitoring/monitor.html','_monitor_ctl')">Debug/Monitoring</a>
    </button>
    <button onclick="clearPre('question'); clearPre('output'); clearPre('outevt');">Clear</button>

    <br>
    <br>

    <dialog id="agent-event-chooser">
        <h3 class="dialogheader">Subscribe to the following agent events</h3>
        <div>
            <ol>
                <li>
                    <input type="checkbox" id="authstate" checked>
                    <label>voice_authstate_event</label>
                </li>
                <li>
                    <input type="checkbox" id="dialogstate" checked>
                    <label>voice_dialogstate_event</label>
                </li>
                <li>
                    <input type="checkbox" id="connectionstate" checked>
                    <label>voice_connectionstate_event</label>
                </li>
            </ol>
        </div>
        <footer>
            <button id="agent-subscribe-btn" type="button" style="margin: 10px">Subscribe</button>
        </footer>
    </dialog>

    <dialog id="templateui-event-chooser">
        <h3 class="dialogheader">Subscribe to the following GUI Metadata Messages</h3>
        <div>
            <ol>
                <li>
                    <input type="checkbox" id="render_template" checked>
                    <label>render_template</label>
                </li>
                <li>
                    <input type="checkbox" id="clear_template" checked>
                    <label>clear_template</label>
                </li>
                <li>
                    <input type="checkbox" id="render_player_info" checked>
                    <label>render_player_info</label>
                </li>
                <li>
                    <input type="checkbox" id="clear_player_info" checked>
                    <label>clear_player_info</label>
                </li>
            </ol>
        </div>
        <footer>
            <button id="templateui-subscribe-btn" type="button" style="margin: 10px">Subscribe</button>
        </footer>
    </dialog>

    <dialog id="login-with-amazon">
        <h3 class="dialogheader">Login with Amazon !!</h3>
        <div id="login-area">
            <div>
                Alexa VA URL: <input type="text" id="alexa-va-address" value="localhost:1111"> <br><br>
                Client ID   : <input type="text" id="client-id"> <br><br>
                Product ID  : <input type="text" id="product-id"> <br><br>
                To generate client and product ID, please register a new AVS product for
                <i><b>Other devices and platforms</b></i> using instructions in
                <a href="https://developer.amazon.com/docs/alexa-voice-service/register-a-product.html" target="_blank">this </a>
                link.<br><br>
            </div>
            <footer id ="login-with-amazon-footer">
                <button id="submit-btn" type="button" style="margin: 10px">Login</button>
                <button id="cancel-btn" type="button" style="margin: 10px">Cancel</button>
            </footer>
        </div>
    </dialog>

    <div id="top" class="row">
    <div id='actions' class="col1">
        <div>
          <h2>VSHL APIs</h2>
          <p>APIs that are voiceagent agnostic</p>
          <button onclick="callbinder('vshl','startListening',{});">startListening</button>
          <button onclick="fetchAndRenderVoiceAgents();">enumerateAgents</button>
          <button onclick="showTemplateUIEventChooserDialog();">Subscribe to GUI Metadata</button>
        </div>

        <div id="agentsDiv">
        </div>
    </div>

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

</body>