|
@@ -40,6 +40,14 @@ let resultAudioContext = null
|
|
|
let wsEngine = aiengine.createWsEngine({});
|
|
|
|
|
|
let recorderManager = wx.getRecorderManager();
|
|
|
+let options = {
|
|
|
+ duration: 600000,
|
|
|
+ sampleRate: 44100,
|
|
|
+ numberOfChannels: 1,
|
|
|
+ encodeBitRate: 192000,
|
|
|
+ format: 'mp3',
|
|
|
+ frameSize: 50
|
|
|
+};
|
|
|
Page({
|
|
|
data: {
|
|
|
videoInfo: {},
|
|
@@ -90,12 +98,12 @@ Page({
|
|
|
})
|
|
|
this.getreadInfo(videoId, options.reset).then(res => {
|
|
|
wx.nextTick(() => {
|
|
|
- if (options.voluntarily && this.data.isVip) {
|
|
|
- this.setCountDown()
|
|
|
- }
|
|
|
- if (options.autoPlay) {
|
|
|
- this.videoPlay()
|
|
|
- }
|
|
|
+
|
|
|
+ this.setCountDown()
|
|
|
+ }
|
|
|
+ if (options.autoPlay) {
|
|
|
+ this.videoPlay()
|
|
|
+ } */
|
|
|
})
|
|
|
})
|
|
|
|
|
@@ -319,16 +327,8 @@ Page({
|
|
|
},
|
|
|
success: (res) => {
|
|
|
|
|
|
- let options = {
|
|
|
- duration: 600000,
|
|
|
- sampleRate: 44100,
|
|
|
- numberOfChannels: 1,
|
|
|
- encodeBitRate: 192000,
|
|
|
- format: 'mp3',
|
|
|
- frameSize: 50
|
|
|
- };
|
|
|
|
|
|
- recorderManager.start(options);
|
|
|
+ recorderManager.start(this.options);
|
|
|
},
|
|
|
fail: (res) => {
|
|
|
console.log("fail============= ", res);
|
|
@@ -371,16 +371,8 @@ Page({
|
|
|
});
|
|
|
},
|
|
|
songRecording() {
|
|
|
- let options = {
|
|
|
- duration: 600000,
|
|
|
- sampleRate: 44100,
|
|
|
- numberOfChannels: 1,
|
|
|
- encodeBitRate: 192000,
|
|
|
- format: 'mp3',
|
|
|
- frameSize: 50
|
|
|
- };
|
|
|
|
|
|
- recorderManager.start(options);
|
|
|
+ recorderManager.start(this.options);
|
|
|
recorderManager.onError(res => {
|
|
|
console.log(res, 'songError');
|
|
|
})
|