0.1.0 • Published 2 years ago
webrtc-vue-component v0.1.0
webrtcrecorder
Project setup
npm install
Usage
import webrtcrecorder from 'webrtc-vue'
export default {
name: 'App',
components: {
webrtcrecorder
},
...
Methods
name | description |
---|---|
startStreaming | start video streaming |
stopStreaming | stop video Streaming |
startRecording | start recording the video stream |
stopRecording | stop recording the video stream |
screenShot | take a screenshot of the video stream |
usage of methods
after importing the component you and including it inside your code as the following template
<webrtcrecorder ref="webrtcVideo">
</webrtcrecorder>
you can create a button tag in your html code and bind its click event with a method you are suppose to create. then inside this method your are going to call one of the methods of the webrtcrecorder which are listed above in a table as the following example:
<button @click="doRecording">Recording</button>
now let us suppose that you have created this mehtod:
function doRecording(){
this.$refs.webrtcVideo.startRecording()
}
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Customize configuration
License
MIT
Credits
Author: @HussienMN on GitHub .
The idea of usage or calling the methods is inspired by the following project but the entire code is different:
0.1.0
2 years ago