vuejs录音_适用于VueJS应用程序的简单录音机

vue-audio-recorder是适用于Vue.js应用程序的录音组件,提供美观的UI,支持录音、下载、上传和播放功能,并设有时间限制和记录数量限制。已在Chrome、Firefox和Safari等浏览器上测试通过。
摘要由CSDN通过智能技术生成

vuejs录音

Vue录音机 (vue-audio-recorder)

Audio recorder for Vue.js. It allows to create, play, download and store records on a server.

Vue.js的录音机。 它允许在服务器上创建,播放,下载和存储记录。

vue-audio-recorder

特征 (Features)

  • Beautiful clean UI

    美丽干净的用户界面

  • Download/upload/play record

    下载/上传/播放记录

  • Time limit

    时限

  • Records limit

    记录限制

  • A lot of callbacks

    很多回调

经过测试 (Tested in)

  • Chrome

    Chrome

  • Firefox

    火狐浏览器

  • Safari

    苹果浏览器

安装 (Installation)

npm i vue-audio-recorder --save

道具 (Props)

PropTypeDescription
attemptsNumberNumber of recording attempts
timeNumberTime limit for record in minutes
upload-urlStringURL for uploading
start-recordFunctionIt fires after click the record button
stop-recordFunctionIt fires after click the stop button or exceeding the time limit
start-uploadFunctionIt fires after start uploading
attempts-limitFunctionIt fires after exceeding the attempts
failed-uploadFunctionIs fires after failure uploading
mic-failedFunctionIt fires if your microphone doesn't work
successful-uploadFunctionIt fires after successful uploading
successful-upload-msgStringDisplay the message after successful uploading
failed-upload-msgStringDisplay the message after failure uploading
Struts 类型 描述
尝试 记录尝试次数
时间 记录时间限制(以分钟为单位)
上传网址 上传网址
开始记录 功能 单击“记录”按钮后触发
停止记录 功能 单击停止按钮或超过时间限制后会触发
启动上传 功能 开始上传后会触发
尝试限制 功能 超过尝试次数后会开火
上传失败 功能 上传失败后会引发火灾
麦克风故障 功能 如果您的麦克风无法工作,则会触发
成功上传 功能 成功上传后触发
成功上传消息 成功上传后显示消息
失败上传消息 上传失败后显示消息

用法 (Usage)

<audio-recorder
    upload-url="YOUR_API_URL"
    :attempts="3"
    :time="2"
    :start-record="callback"
    :stop-record="callback"
    :start-upload="callback"
    :successful-upload="callback"
    :failed-upload="callback"/>

构建设置 (Build Setup)

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

翻译自: https://vuejsexamples.com/a-simple-audio-recorder-for-vuejs-applications/

vuejs录音

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值