当前位置: 首页 > news >正文

门户网站域名是什么西安企业做网站

门户网站域名是什么,西安企业做网站,织梦网站后台怎么登陆,中山自助建站系统往期内容 expressvue在线im实现【一】 expressvue在线im实现【二】 expressvue在线im实现【三】 本期示例 本期总结 支持了音频的录制和发送#xff0c;如果觉得对你有用#xff0c;还请点个免费的收藏与关注 下期安排 在线语音 具体实现 templatekl-dial…往期内容 expressvue在线im实现【一】 expressvue在线im实现【二】 expressvue在线im实现【三】 本期示例 本期总结 支持了音频的录制和发送如果觉得对你有用还请点个免费的收藏与关注 下期安排 在线语音 具体实现 templatekl-dialog width300px center :headerfalse :footerfalse :dialogVisible.syncvisablediv classflex-column-wrap p-20 flex-center-wrap pr p-t-40 click.stop() {}iclassf-20 f-600 c-555 cu el-icon-close p-a el-icon-close-1click.stopclose/ie-image:height80:lazyfalsesrchttp://139.9.210.43:5000/netdist/kl1718850348458vjab00h8x4d-1718850348280~1~.png/e-image!-- 录制时长 --div classm-t-20录制时长{{ getAudioTime() }}/divdiv classflex-wrap m-t-20el-button sizesmall typeinfo click.stopreload重新录制/el-buttonel-button sizesmall typewarning click.stopstop停止/el-buttonel-button sizesmall typesuccess click.stopplay播放/el-buttonel-button :disabledaudioTime 0 sizesmall typedanger click.stopsend发送/el-button/div/div!-- 语音播放 --audioPlayv-modelisShowAudio:urlparseResourceUrl(filePath)endedisShowAudio false/audioPlay/kl-dialog /templatescript export default {components: {audioPlay: () import(/components/audioPlay/index.vue),},props: {value: {type: Boolean,default: false,},},data() {return {isShowAudio: false,filePath: ,file: null,mediaRecorder: null,isStart: false,audioTime: 0,timer: null,}},computed: {visable: {get() {return this.value},set() {return this.$emit(input, !this.value)},},},watch: {value(val) {if (val) {// 进入直接开始录音this.init()return}},},beforeDestroy() {this.clearTimer()this.audioTime 0},methods: {close() {this.filePath this.mediaRecorder nullthis.file nullthis.visable falsethis.clearTimer()this.audioTime 0},getAudioTime() {return (this.audioTime / 1000).toFixed(2) s},reload() {this.filePath this.mediaRecorder nullthis.file nullthis.init()},stop() {this.clearTimer()this.mediaRecorder.stop()},play() {if (!this.filePath) {this.stop()}this.isShowAudio true},async send() {if (!this.filePath) {this.stop()await this.sleep()}this.commonUploadFile(this.file, im, 500).then(({ url }) {this.$emit(pushInfo, {msg_type: 5,content: url,time: this.audioTime,})this.close()}).catch(() {})},clearTimer() {clearInterval(this.timer)this.timer null},init() {if (this.mediaRecorder) returnthis.clearTimer()this.audioTime 0// 请求麦克风权限navigator.mediaDevices.getUserMedia({ audio: true }).then((stream) {// 创建MediaRecorder实例const mediaRecorder new MediaRecorder(stream)// 处理录音数据const recordedChunks []mediaRecorder.ondataavailable (event) {if (event.data.size 0) {recordedChunks.push(event.data)}}// 停止录音时的处理mediaRecorder.onstop () {// 将数据块转换为Blob对象const blob new Blob(recordedChunks, { type: audio/ogg; codecsopus })const fileName recordedAudio.oggthis.file new File([blob], fileName, {type: audio/ogg, // 这里不需要指定codecs因为Blob已经包含了它})// TODO:还没做this.filePath this.getObjectURL(this.file)}// 开始录音mediaRecorder.start()this.mediaRecorder mediaRecorder// 计时器this.timer setInterval(() {// 最大60sif (this.audioTime 60 * 1000) {this.clearTimer()return}this.audioTime 50}, 50)}).catch((err) {console.error(Error accessing the microphone:, err)})},// 获取视频的本地地址getObjectURL(file) {var url null// 下面函数执行的效果是一样的只是需要针对不同的浏览器执行不同的 js 函数而已if (window.createObjectURL ! undefined) {// basicurl window.createObjectURL(file)} else if (window.URL ! undefined) {// mozilla(firefox)url window.URL.createObjectURL(file)} else if (window.webkitURL ! undefined) {// webkit or chromeurl window.webkitURL.createObjectURL(file)}return url},}, } /scriptstyle langscss scoped .el-icon-close-1 {top: 5px;right: 5px; } /style
http://www.dnsts.com.cn/news/100867.html

相关文章:

  • 上海网站建设学校延吉网站开发公司
  • 深圳精品网站建设公司源码网棋牌
  • 郑州购物网站建设英文网站模板改成中文
  • 太原做网站的海南响应式网页建设方案
  • 淘宝客网站建设任务网站未备案可以做经营活动吗
  • 网站集约化建设情况wordpress百度结构化数据插件
  • 邢台精品网站建设会议网站建设方案
  • 怎样用数据库做网站内江网站建设
  • 网站开发语言net网络推广策划方案设计
  • 关于电商网站建设与管理的书籍建设厅网站合同备案在哪里
  • 建设厅施工员证查询网站主流的外贸平台
  • 天津市设计网站的公司唯品会网站建设建议
  • 手机做网站的软件好用的免费网站建设
  • 网站创建需要什么北京做兼职网站有哪些
  • 国内哪个网站用wordpress营销型网站建设课程
  • 高权重网站出售wamp做的网站上传
  • 可以做外链的音乐网站云南省住房和城乡建设局网站
  • 做电影收费网站装修公司报价如何计算
  • 厦门网站建设系统江西住房和城乡建设厅网站
  • 网站开发资质垡头做网站的公司
  • 大连网站建设方案案例个人网页设计理念
  • 外贸公司如何运营郑州网站建设专业乐云seo
  • ps做汽车网站下载地址团风做网站
  • 河南省网站建设哪家好快站app制作教程
  • 甘孜州建设局网站济南建站公司哪有
  • 公司网站设计建议秦皇岛市教育考试院官网
  • 怎么做自己的彩票网站网站建设与实践模板
  • 聊城专业网站设计公司所有网站的名字大全
  • 便捷网站建设创意设计公司经营范围
  • 网站备案需要年检吗蔚县网站建设