@webrtc-remote-control/vue
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@webrtc-remote-control/vue

npm ci Demo

Imagine you could simply control a web page opened in a browser (master) from an other page in an other browser (remote), just like you would with a TV and a remote.

webrtc-remote-control lets you do that (based on PeerJS) and handles the disconnections / reconnections, providing a simple API.

Installation

npm install peerjs @webrtc-remote-control/vue

This package relies on @webrtc-remote-control/core (the implementation in vanillaJS). Other implementations for popular frameworks are available here.

Usage

Add the peerjs library as a script tag in your html page. You'll have access to Peer constructor.

<script src="https://unpkg.com/peerjs@1.3.2/dist/peerjs.min.js"></script>

Direct link to the demo source code: App.vue / Master.vue / Remote.vue

TypeScript

TypeScript types are shipped with the package.

UMD build

Don't want to use a bundler ? You can simply use the UMD (Universal Module Definition) build and drop it with a script tag, you'll have access to a webrtcRemoteControlVue object on the window.

Dependencies (1)

Dev Dependencies (2)

Package Sidebar

Install

npm i @webrtc-remote-control/vue

Weekly Downloads

4

Version

0.1.1

License

MIT

Unpacked Size

147 kB

Total Files

21

Last publish

Collaborators

  • topheman