@rbbn/distant-remote

1.2.1 • Public • Published

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()

Readme

Keywords

none

Package Sidebar

Install

npm i @rbbn/distant-remote

Weekly Downloads

109

Version

1.2.1

License

SEE LICENSE IN LICENSE.md

Unpacked Size

14.7 kB

Total Files

6

Last publish

Collaborators

  • rbbn-webrtc-distant