|
35 | 35 | };
|
36 | 36 |
|
37 | 37 | function sendWebRTC() {
|
38 |
| - if( sendStream(getWebsocketURL('input'), document.getElementById('send-stream').value) ) |
| 38 | + if( sendStream(getWebsocketURL("{{ webrtc_input_stream }}", port={{ webrtc_input_port }}), document.getElementById('send-stream').value) ) |
39 | 39 | play(); // autoplay browser stream
|
40 | 40 | }
|
41 | 41 |
|
|
50 | 50 | for( let n=0; n < search_results.length; n++ ) {
|
51 | 51 | if( 'image' in search_results[n] ) {
|
52 | 52 | //contents = '<div style="position: relative; text-align: center; color: white" width="50%">';
|
53 |
| - let contents = '<div class="me-1" style="position: relative; color: white; display: inline;">'; |
54 |
| - contents += `<img src=${search_results[n]['image']} style="aspect-ratio: 1.47; width: 49%;" title=""METADATA" : ${search_results[n]['metadata']}">`; |
55 |
| - contents += `<div class="ps-1 pe-1" style="position: absolute; top: 0%; right: 0%; transform: translate(0%, -288%); background-color: rgba(0,0,0,0.5)">${search_results[n]['similarity']}</div></div>`; |
| 53 | + let contents = '<div class="me-1" style="position: relative; color: white; display: inline;">'; // 49% width, -288% translate for 2x4 grid |
| 54 | + contents += `<img src=${search_results[n]['image']} style="aspect-ratio: 1.47; width: 32%;" title=""METADATA" : ${search_results[n]['metadata']}">`; |
| 55 | + contents += `<div class="ps-1 pe-1" style="position: absolute; top: 0%; right: 0%; transform: translate(0%, -168%); background-color: rgba(0,0,0,0.5)">${search_results[n]['similarity']}</div></div>`; |
56 | 56 | //contents += '</div>';
|
57 | 57 | obj.append(contents);
|
58 | 58 | }
|
|
82 | 82 | var sendStream = document.getElementById('send-stream');
|
83 | 83 | var sendButton = document.getElementById('send-button');
|
84 | 84 |
|
85 |
| - playStream.value = getWebsocketURL('output'); |
| 85 | + playStream.value = getWebsocketURL("{{ webrtc_output_stream }}", port={{ webrtc_output_port }}); |
86 | 86 |
|
87 | 87 | {% if send_webrtc %}
|
88 | 88 | // populate the list of browser video devices (requires HTTPS)
|
|
113 | 113 | playWebRTC();
|
114 | 114 | {% endif %}
|
115 | 115 |
|
116 |
| - connectWebsocket(onWebsocketMsg, port=49000); |
| 116 | + connectWebsocket(onWebsocketMsg, port={{ ws_port }}); |
117 | 117 |
|
118 | 118 | event_table = new Tabulator("#event_table", {
|
119 | 119 | columns: [
|
@@ -373,10 +373,10 @@ <h5 class="d-inline">NanoDB</h5>
|
373 | 373 | {% if send_webrtc %}
|
374 | 374 | <div class="row">
|
375 | 375 | <label for="send-stream" class="col-2" style="width: 6rem;">Webcam:</label>
|
376 |
| - <div class="col-6"> |
| 376 | + <div class="col-5"> |
377 | 377 | <select id="send-stream" name="send-stream"></select>
|
378 | 378 | </div>
|
379 |
| - <div class="col-4"> |
| 379 | + <div class="col-4 ms-3"> |
380 | 380 | <button id="send-button" onclick="sendWebRTC()">Send</button>
|
381 | 381 | </div>
|
382 | 382 | </div>
|
|
0 commit comments