1.2.0 • Published 4 years ago

vue-webrtc-aleyda v1.2.0

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

vue-webrtc

WebRTC component designed for Vue.js ... See the DEMO

npm npm Contributions welcome License

See this for browser compatibility.

Installation

npm install vue-webrtc --save

yarn add vue-webrtc

Usage

import Vue from 'vue'
import WebRTC from 'vue-webrtc'

Vue.use(WebRTC)
// or
import {WebRTC} from 'vue-webrtc'
Vue.component(WebRTC.name, WebRTC)

// template
<vue-webrtc width="100%" roomId="roomId">
</vue-webrtc>

Testing & Dev

npm run dev
npm run demo

Props

proptypedefaultnotes
roomIdstring'public-room'id of the room to join
socketURLstring''URL of the signaling server
cameraHeightnumber160height of video element
autoplaybooleantrueautoplay attribute
screenshotFormatstring'image/jpeg'format of screenshot
enableAudiobooleantrueenables audio on join
enableVideobooleantrueenables video on join
enableLogsbooleanfalseenables webrtc console logs

Events

nameparamnotes
opened-roomroomidemitted when the first user opens the room
joined-roomvideoemitted when anyone joins the room
left-roomvideo.idemitted when anyone leaves the room
share-startedvideo.idemitted when a local screen share stream starts
share-stoppedvideo.idemitted when a local screen share stream stops

Methods

nameparamnotes
joinvoidJoin a room, opening it if needed
leavevoidLeave a room
capturevoidCapture the current image through the webcam as base64 encoded string
shareScreenvoidShare your screen or an app as video

Styles

.video-list

.video-item

History

VersionNotes
1.2.0Added the Screen Share button

Roadmap

There are many more features provided by the RTCMultiConnection library that we'd like to support, including:

  • Camera selection (we currently use the default camera)
  • Audio selection
  • WebRTC data events

Let us know what you'd like to see next and vote for a feature.

License

MIT

Credits

Author: @AndyWeston on GitHub at vue-webrtc

This project is based off of the excellent work found at WebRTC Experiments: https://www.rtcmulticonnection.org/

The Vue.js work is based on this camera component:
@vinceg vue-web-cam