diff options
author | Luciano Iam <lucianito@gmail.com> | 2020-04-12 16:29:31 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-04-13 16:29:41 +0200 |
commit | e700e640c0175a3837f99f54471c1627fa11ed58 (patch) | |
tree | d29535c3d06c653f32c439228951f9e5e119c679 /share | |
parent | eead6f9cac46961448d423f9de947021cd613cd3 (diff) |
WebSockets: display usage instructions when loading index.html from a local file
Diffstat (limited to 'share')
-rw-r--r-- | share/web_surfaces/index.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/share/web_surfaces/index.html b/share/web_surfaces/index.html index 5ffccd4dd9..d1bd65b599 100644 --- a/share/web_surfaces/index.html +++ b/share/web_surfaces/index.html @@ -12,6 +12,18 @@ <div id="content"> <h2 id="loading">Loading...</h2> <pre id="error" style="display:none"></pre> + <div id="local" style="display:none"> + <h2>This page cannot be loaded from a local file</h2> + <p>Follow these steps instead:</p> + <ul> + <li>Open Ardour</li> + <li>Enable the WebSockets Server surface</li> + <li> + Click on the following link + <a href="http://localhost:3818/">http://localhost:3818</a> + </li> + </ul> + </div> <div id="index" style="display:none"> <h1>Available Web Surfaces</h1> <div class="surface-list" id="builtin"> @@ -24,6 +36,12 @@ </div> </div> </div> + <script> + if (!location.hostname) { + document.getElementById('loading').style.display = 'none'; + document.getElementById('local').style.display = 'inline'; + } + </script> <script type="module" src="index/main.js"></script> </body> </html> |