vue-media-recorder
vue-media-recorder makes it easy to capture media (Microphone, Camera, Video) in your Vue.js apps.
11,435
10
| Install | |
|---|---|
npm install vue-media-recorder |
|
| Latest Version: | 0.1.25 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Apr 5, 2020 |
| Links: | GitHub · npm |
Maintainer: orbracha23
vue-media-recorder
vue-media-recorder makes it easy to capture media (Microphone, Camera, Video) in your Vue.js apps.
Installation
Use the package manager npm to install vue-media-recorder.
npm install vue-media-recorder
Usage
To use vue-media-recorder in your project all thats needed is to add the following code to your component.
<template>
<div>
<PhotoCapture v-model="imageBase64" />
<VideoCapture uploadUrl="<example-server-address.com>" v-model="videoUrl" />
</div>
</template>
<script>
import 'vue-media-recorder/src/assets/scss/main.scss'
import {PhotoCapture, VideoCapture} from 'vue-media-recorder'
export default {
data(){
return {
imageBase64: null,
videoUrl: null,
}
},
components:{
PhotoCapture,
VideoCapture
}
}
</script>
VideoCapture Component Usage
For the VideoCaptrue component to work correctly, pass an uploadUrl prop for your server. Kindly see a sample server here:
VideoCapture Server Configuration
VideoCapture Component Props
| Prop | Value | IsRequired | Example |
|---|---|---|---|
| uploadUrl | The server url to which the component will upload the video to | true | 'localhost:3000' / 'foo-bar.com' |
| recordBtnContent | content for the video record button | false | '⬤' |
| stopBtnContent | content for the stop recording button | false | '◼' |
| cancelBtnContent | button for clearing the recorderd video content | false | 'ⅹ' |
| doneBtnContent | button to confirm video is fine and handling its url | false | '✓' |
PhotoCapture Component Props
| Prop | Value | IsRequired | Example |
|---|---|---|---|
| capturedBtnContent | content for the image capture button | false | '📷' |
| cancelBtnContent | button for clearing the captured image content | false | 'ⅹ' |
| doneBtnContent | button to confirm image is fine and handling its base64 format | false | '✓' |
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.25 | ^2.6.10 | MIT | |
| 0.1.24 | ^2.6.10 | MIT | |
| 0.1.23 | ^2.6.10 | MIT | |
| 0.1.22 | ^2.6.10 | MIT | |
| 0.1.21 | ^2.6.10 | MIT | |
| 0.1.20 | ^2.6.10 | MIT | |
| 0.1.19 | ^2.6.10 | MIT | |
| 0.1.18 | ^2.6.10 | MIT | |
| 0.1.17 | ^2.6.10 | MIT | |
| 0.1.16 | ^2.6.10 | MIT | |
| 0.1.15 | ^2.6.10 | MIT | |
| 0.1.14 | ^2.6.10 | MIT | |
| 0.1.13 | ^2.6.10 | MIT | |
| 0.1.12 | ^2.6.10 | MIT | |
| 0.1.11 | ^2.6.10 | MIT | |
| 0.1.10 | ^2.6.10 | MIT | |
| 0.1.9 | ^2.6.10 | MIT | |
| 0.1.8 | ^2.6.10 | MIT | |
| 0.1.7 | ^2.6.10 | MIT | |
| 0.1.6 | ^2.6.10 | MIT | |
| 0.1.5 | ^2.6.10 | MIT | |
| 0.1.4 | ^2.6.10 | ||
| 0.1.3 | ^2.6.10 | ||
| 0.1.2 | ^2.6.10 | ||
| 0.1.1 | ^2.6.10 |