public async Task<LgWebOsMouseService> GetMouse() { if (_mouseConnection != null) return _mouseConnection; var requestMessage = new RequestMessage("ssap://com.webos.service.networkinput/getPointerInputSocket", new { }); var s = await _connection.SendCommandAsync(requestMessage); var socketPath = (string)s.socketPath; _mouseConnection = new LgWebOsMouseService(new LgTvApiCore()); await _mouseConnection.Connect(socketPath); return _mouseConnection; }
public async Task <LgWebOsMouseService> GetMouse() { if (_mouseConnection != null) { return(_mouseConnection); } var requestMessage = new RequestMessage("ssap://com.webos.service.networkinput/getPointerInputSocket", new { }); var s = await _connection.SendCommandAsync(requestMessage); var socketPath = (string)s.socketPath; _mouseConnection = new LgWebOsMouseService(new LgTvApiCore()); await _mouseConnection.Connect(socketPath); return(_mouseConnection); }