1.2.1 • Published 2 years ago

@rbbn/distant-remote v1.2.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

Distant Remote

Library for remote applications to interact with Distant

Usage

JavaScript

Install using npm:

npm install @rbbn/distant-remote

or yarn:

yarn add @rbbn/distant-remote

Use the package like so:

import distantRemote from '@rbbn/distant-remote'

//// OR
// import { createRemoteController } from '@rbbn/distant-remote'
// const distantRemote = createRemoteController(window.distant, window.cefQuery)

const textEncoder = new TextEncoder()
const textDecoder = new TextDecoder()

distantRemote.on('message', (message) => console.log(textDecoder.decode(message)))

distantRemote.sendMessage(textEncoder.encode("hello"))

/* moveWindow parameters are:
 *   normalized x, normalized y, normalized width, normalized height, original x, original y
 * Normalized values are those adjusted by Distant Tracker
 * Original x and y are the unmodified values received by the Tracker
 */
distantRemote.moveWindow(44, 55, 666, 777, 88, 999)

distantRemote.setWindowVisibile(true)

distantRemote.close()
1.2.1

2 years ago

1.2.0

2 years ago