(udid: string, message: ControlMessage)
| 2284 | } |
| 2285 | |
| 2286 | function sendControlNow(udid: string, message: ControlMessage): boolean { |
| 2287 | setLocalError(""); |
| 2288 | const encoded = JSON.stringify(message); |
| 2289 | const dropIfBacklogged = isMoveControlMessage(message); |
| 2290 | if (sendWebRtcControlMessage(encoded, { dropIfBacklogged })) { |
| 2291 | return true; |
| 2292 | } |
| 2293 | if (sendControlSocketMessage(udid, encoded, dropIfBacklogged)) { |
| 2294 | return true; |
| 2295 | } |
| 2296 | if (remoteStream) { |
| 2297 | return false; |
| 2298 | } |
| 2299 | return false; |
| 2300 | } |
| 2301 | |
| 2302 | function sendControlSocketMessage( |
| 2303 | udid: string, |
no test coverage detected