微信小程序开发交流qq群   173683895

   承接微信小程序开发。扫码加微信。

正文:

源码简介: 点击按钮实现相应效果 ↓↓↓↓↓↓↓↓

//test.wxml

<button bindtap='start'>开始录音</button>  <button bindtap='play'>播放录音</button>  <button bindtap='stop'>停止录音</button>

//test.js

var voice = "";Page({  play: function () {    //播放声音文件      wx.playVoice({      filePath: voice    })  },  start: function () {    //开始录音      wx.startRecord({      success: function (e) {        voice = e.tempFilePath      }    })  },  stop: function () {    //结束录音      wx.stopRecord();  }})

 

微信小程序

TAG标签: 微信小程序微信视频聊天没有声音

http://www.xiaochengxub.com/read-106358.html