1<?-- 2 Copyright (C) 2019 The Android Open Source Project 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 --> 16 17<html> 18 <head> 19 <link rel="stylesheet" type="text/css" href="style.css" > 20 <link rel="stylesheet" type="text/css" href="controls.css" > 21 <link rel="stylesheet" type="text/css" href="custom.css" > 22 <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons+Outlined"> 23 <link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons"> 24 <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script> 25 </head> 26 <body> 27 <div id="loader"></div> 28 <div id="error-message-div"> 29 <h3 id="error-message" class="hidden"> 30 <span class="material-icons close-btn">close</span> 31 </h3> 32 </div> 33 <section id="device-connection"> 34 <div id='controls-and-displays'> 35 <div id='control-panel-default-buttons' class='control-panel-column'> 36 <button id='power_btn' title='Power' disabled='true' class='material-icons'>power_settings_new</button> 37 <button id='bluetooth-modal-button' title='Bluetooth console' class='material-icons'> 38 settings_bluetooth 39 </button> 40 <button id='back_btn' title='Back' disabled='true' class='material-icons'>arrow_back</button> 41 <button id='home_btn' title='Home' disabled='true' class='material-icons'>home</button> 42 <button id='menu_btn' title='Menu' disabled='true' class='material-icons'>menu</button> 43 <button id='mouse_btn' title='Mouse' disabled='true' style="display:none" class='material-icons'>mouse</button> 44 <button id='keyboard-modal-button' title='keyboard console' class='material-icons'>keyboard</button> 45 <button id='touchpad-modal-button' title='Touchpads' class='material-icons'>touch_app</button> 46 <button id='rotate_left_btn' title='Rotate left' disabled='true' class='material-icons' data-adb="true">rotate_90_degrees_ccw</button> 47 <button id='rotate_right_btn' title='Rotate right' disabled='true' class='material-icons' data-adb="true">rotate_90_degrees_cw</button> 48 <button id='volume_up_btn' title='Volume up' disabled='true' class='material-icons'>volume_up</button> 49 <button id='volume_down_btn' title='Volume down' disabled='true' class='material-icons'>volume_down</button> 50 <button id='volume_off_btn' title='Volume off' class='material-icons'>volume_off</button> 51 <button id='camera_off_btn' title='Capture camera' class='material-icons'>videocam_off</button> 52 <button id='record_video_btn' title='Record screen' class='material-icons'>movie_creation</button> 53 <button id='mic_btn' title='Microphone' disabled='true' class='material-icons'>mic_off</button> 54 <button id='location-modal-button' title='location console' class='material-icons'>location_on</button> 55 <button id='device-details-button' title='Device Details' class='material-icons'>info</button> 56 <button id='rotation-modal-button' title='Rotation sensors' class='material-icons'>more_vert</button> 57 </div> 58 <div id='control-panel-custom-buttons' class='control-panel-column'></div> 59 <div id="device-display-column"> 60 <!-- tabindex="-1" allows this element to capture keyboard events --> 61 <div id='device-displays' tabindex="-1"> 62 </div> 63 </div> 64 <button id='display-add-modal-button' title='Add display' class='material-icons'>add_to_queue</button> 65 </div> 66 <!-- Audio tags of id with a prefix of "device-audio" will be inserted here dynamically 67 based on the number of audio streams.--> 68 </section> 69 <div id='device-details-modal' class='modal'> 70 <div id='device-details-modal-header' class='modal-header'> 71 <h2>Device Details</h2> 72 <button id='device-details-close' title='Close' class='material-icons modal-close'>close</button> 73 </div> 74 <hr> 75 <h3>Hardware Configuration</h3> 76 <span id='device-details-hardware'>unknown</span> 77 </div> 78 <div id='bluetooth-modal' class='modal-wrapper'> 79 <div id='bluetooth-prompt' class='modal'> 80 <div id='bluetooth-prompt-header' class='modal-header'> 81 <h2>Bluetooth</h2> 82 <button id='bluetooth-prompt-close' title='Close' class='material-icons modal-close'>close</button> 83 </div> 84 <div> 85 <div id='bluetooth-prompt-text' class='bluetooth-text'> 86 We have enabled a BT Wizard to simplify adding a<br>bluetooth device.<br> 87 Alternatively, you can enter the BT Console if you<br>want to exercise full control.</div><br> 88 <div class='bluetooth-button'> 89 <button id='bluetooth-prompt-wizard' title='Start Wizard' class='modal-button-highlight'>Start Wizard</button> 90 <button id='bluetooth-prompt-list' title='Device List' class='modal-button'>Device List</button> 91 <button id='bluetooth-prompt-console' title='BT Console' class='modal-button'>BT Console</button> 92 </div> 93 </div> 94 </div> 95 <div id='bluetooth-wizard' class='modal'> 96 <div id='bluetooth-wizard-modal-header' class='modal-header'> 97 <h2>BT Wizard</h2> 98 <button id='bluetooth-wizard-close' title='Close' class='material-icons modal-close'>close</button> 99 </div> 100 <div> 101 <div class='bluetooth-text-field'><input type="text" id='bluetooth-wizard-name' placeholder="Device Name"></input></div> 102 <div class='bluetooth-drop-down'> 103 <select id='bluetooth-wizard-type' validate-mac="true" required> 104 <option value="beacon">Beacon</option> 105 </select> 106 </div> 107 <div class='bluetooth-text-field'><input type="text" id='bluetooth-wizard-mac' placeholder="Device MAC" validate-mac="true" required></input><span></span></div> 108 <div class='bluetooth-button'> 109 <button id='bluetooth-wizard-device' title='Add Device' class='modal-button-highlight' disabled>Add Device</button> 110 <button id='bluetooth-wizard-cancel' title='Cancel' class='modal-button'>Cancel</button> 111 </div> 112 </div> 113 </div> 114 <div id='bluetooth-wizard-confirm' class='modal'> 115 <div id='bluetooth-wizard-confirm-header' class='modal-header'> 116 <h2>BT Wizard</h2> 117 <button id='bluetooth-wizard-confirm-close' title='Close' class='material-icons modal-close'>close</button> 118 </div> 119 <div id='bluetooth-wizard-text' class='bluetooth-text'>Device added. See device details below.</div><br> 120 <div class='bluetooth-text'> 121 <p>Name: <b>GKeyboard</b></p> 122 <p>Type: <b>Keyboard</b></p> 123 <p>MAC Addr: <b>be:ac:01:55:00:03</b></p> 124 </div> 125 <div class='bluetooth-button'><button id='bluetooth-wizard-another' title='Add Another' class='modal-button-highlight'>Add Another</button></div> 126 </div> 127 <div id='bluetooth-list' class='modal'> 128 <div id='bluetooth-list-header' class='modal-header'> 129 <h2>Device List</h2> 130 <button id='bluetooth-list-close' title='Close' class='material-icons modal-close'>close</button> 131 </div> 132 <div class='bluetooth-text'> 133 <div><button title="Delete" data-device-id="delete" class="bluetooth-list-trash material-icons">delete</button>GKeyboard | Keyboard | be:ac:01:55:00:03</div> 134 <div><button title="Delete" data-device-id="delete" class="bluetooth-list-trash material-icons">delete</button>GHeadphones | Audio | dc:fa:32:00:55:02</div> 135 </div> 136 </div> 137 <div id='bluetooth-console' class='modal'> 138 <div id='bluetooth-console-modal-header' class='modal-header'> 139 <h2>BT Console</h2> 140 <button id='bluetooth-console-close' title='Close' class='material-icons modal-close'>close</button> 141 </div> 142 <div> 143 <div colspan='2'><textarea id='bluetooth-console-view' readonly rows='10' cols='60'></textarea></div> 144 <div width='1'><p id='bluetooth-console-cmd-label'>Command:</p></div> 145 <div width='100'><input id='bluetooth-console-input' type='text'></input></div> 146 </div> 147 </div> 148 </div> 149 <div id='location-modal' class='modal-wrapper'> 150 151 <!-- location-prompt-modal modal --> 152 <div id='location-prompt-modal' class='modal'> 153 <div id='location-prompt-modal-header' class='modal-header'> 154 <h2>Location</h2> 155 <button id='location-prompt-modal-close' title='Close' class='material-icons modal-close'>close</button> 156 </div> 157 <div> 158 <div id='location-prompt-text' class='location-text'> 159 <div class='location-button'> 160 <button id='location-set-wizard' title='Set location' class='modal-button-highlight'>Set Location</button> 161 <button id='locations-import-wizard' title='Import locations' class='modal-button'>Import Locations</button> 162 </div> 163 </div> 164 </div> 165 </div> 166 </div> 167 <!-- location-set modal --> 168 <div id='location-set-modal' class='modal'> 169 <div id='location-set-modal-header' class='modal-header'> 170 <h2>Set Location</h2> 171 <button id='location-set-modal-close' title='Close' class='material-icons modal-close'>close</button> 172 </div> 173 <div> 174 <div class='location-text-field'><input type=number step=0.01 min="-180" max="180" value=-122.083 id='location-set-longitude' placeholder="Longitude" required></input></div> 175 <div class='location-text-field'><input type=number step=0.01 min="-90" max="90" value=37.415 id='location-set-latitude' placeholder="Latitude" required></input></div> 176 <div class='location-text-field'><input type=number step=0.01 value=0.0 id='location-set-altitude' placeholder="Elevation"required></input> 177 </div> 178 <div class='location-button'> 179 <button id='location-set-confirm' title='Confirm Location' class='modal-button-highlight'>Update Location</button> 180 <button id='location-set-cancel' title='Cancel' class='modal-button'>Cancel</button> 181 </div> 182 </div> 183 </div> 184 <!-- locations-import modal --> 185 <div id='locations-import-modal' class='modal'> 186 <div id='locations-import-modal-header' class='modal-header'> 187 <h2>Import Locations</h2> 188 <button id='locations-import-modal-close' title='Close' class='material-icons modal-close'>close</button> 189 </div> 190 191 <div class='location-text'> 192 <input type='file' id='locations_select_file' accept=".gpx, .kml"> 193 <button id='locations-send-btn' title='Send Locations' class='modal-button-highlight'>Send Locations</button> 194 195 </div> 196 197 </div> 198 <div id='keyboard-modal' class='modal-wrapper'> 199 200 <!-- keyboard-prompt-modal modal --> 201 <div id='keyboard-prompt-modal' class='modal'> 202 <div id='keyboard-prompt-modal-header' class='modal-header'> 203 <h2>Keyboard</h2> 204 <button id='keyboard-prompt-modal-close' title='Close' class='material-icons modal-close'>close</button> 205 </div> 206 <div> 207 <div id='keyboard-prompt-text' class='keyboard-text'> 208 <div class='function-key-button'> 209 <button id='shift-button' title='Shift' class='modal-button'>Shift</button> 210 <button id='alt-button' title='Alt' class='modal-button'>Alt</button> 211 <button id='ctrl-button' title='Ctrl' class='modal-button'>Ctrl</button> 212 <button id='super-button' title='Super' class='modal-button'>Super</button> 213 </div> 214 <hr> 215 <div class='keyboard-button'> 216 <button id='tab-button' title='Tab' class='modal-button'>Tab</button> 217 </div> 218 </div> 219 </div> 220 </div> 221 </div> 222 <div id='rotation-modal' class='modal'> 223 <div id='rotation-modal-header' class='modal-header'> 224 <h2>Rotation sensors</h2> 225 <button id='rotation-modal-close' title='Close' class='material-icons modal-close'>close</button> 226 </div> 227 <hr> 228 <h3>Rotate the device</h3> 229 <span id='rotation-bar'> 230 <div class='roation-slider'> 231 X 232 <input class='rotation-slider-range' type='range' value='0' min='-180' max='180' step='0.1'> 233 <span class='rotation-slider-value'>0</span> 234 </div> 235 <br> 236 <div class='rotation-slider'> 237 Y 238 <input class='rotation-slider-range' type='range' value='0' min='-180' max='180' step='0.1'> 239 <span class='rotation-slider-value'>0</span> 240 </div> 241 <br> 242 <div class='rotation-slider'> 243 Z 244 <input class='rotation-slider-range' type='range' value='0' min='-180' max='180' step='0.1'> 245 <span class='rotation-slider-value'>0</span> 246 </div> 247 <br> 248 </span> 249 <div class='fixed-orientation'> 250 <button id='left-position-button' title='left' class='material-icons'>crop_landscape</button> 251 <button id='upright-position-button' title='upright' class='material-icons'>crop_portrait</button> 252 <button id='right-position-button' title='right' class='material-icons'>crop_landscape</button> 253 <button id='upside-position-button' title='upside down' class='material-icons'>crop_portrait</button> 254 </div> 255 <div class='sensors'> 256 <div id='accelerometer'> 257 Accelerometer: 258 <span id='accelerometer-value'>0.00 9.81 0.00</span> 259 </div> 260 <div id='magnetometer'>Magnetometer: 261 <span id='magnetometer-value'>0 5.9 -48.4</span> 262 </div> 263 <div id='gyroscope'>Gyroscope: 264 <span id='gyroscope-value'>0.00 0.00 0.00</span> 265 </div> 266 </div> 267 </div> 268 <div id='touchpad-modal' class='modal'> 269 <div id='touchpad-modal-header' class='modal-header'> 270 <button id='touchpad-modal-close' title='Close' class='material-icons modal-close'>close</button> 271 </div> 272 <span id='touchpad-list'> 273 <div class='selectors'></div> 274 <div class='touchpads'></div> 275 </span> 276 </div> 277 <div id='display-add-modal' class='modal'> 278 <div id='display-add-modal-header' class='modal-header'> 279 <h2>Add display</h2> 280 <button id='display-add-modal-close' title='Close' class='material-icons modal-close'>close</button> 281 </div> 282 <div> 283 <select id='display-spec-preset-select'> 284 <!-- setupDisplaySpecPresetSelector adds its options --> 285 </select> 286 <div class='display-spec-form'> 287 <label class='display-spec-label'>width<input type=number min=1 id='display-spec-width' required/></label> 288 <label class='display-spec-label'>height<input type=number min=1 id='display-spec-height' required/></label> 289 <label class='display-spec-label'>dpi<input type=number min=1 id='display-spec-dpi' required/></label> 290 <label class='display-spec-label'>refresh_rate_hz<input type=number min=1 id='display-spec-refresh-rate-hz' required/></label> 291 </div> 292 <button id='display-add-confirm' title='Add a new display' class='modal-button'>Add</button> 293 </div> 294 </div> 295 <script src="js/adb.js"></script> 296 <script src="js/location.js"></script> 297 <script src="js/keyboard.js"></script> 298 <script src="js/rootcanal.js"></script> 299 <script src="js/cf_webrtc.js" type="module"></script> 300 <script src="js/controls.js"></script> 301 <script src="js/touch.js"></script> 302 <script src="js/mouse.js"></script> 303 <script src="js/app.js"></script> 304 <template id="display-template"> 305 <div class="device-display"> 306 <div class="device-display-info"> 307 <div class="device-display-info-text"></div> 308 <button class="material-icons device-display-remove-button" title="Remove display">delete</button> 309 </div> 310 <div class="device-video-container"> 311 <video autoplay muted playsinline src="/" class="device-display-video"></video> 312 </div> 313 </div> 314 </template> 315 </body> 316</html> 317