File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change 9898 console .log (' recorder start' );
9999
100100 this .recording = true ;
101+ recordTimeInterval = setInterval (() => {
102+ this .recordTime += 1 ;
103+ this .formatedRecordTime = util .formatTime (this .recordTime );
104+ }, 1000 )
101105 });
102106 recorderManager .onStop ((res ) => {
103107 console .log (' on stop' );
118122 return ;
119123 }
120124 // #endif
121-
122- recordTimeInterval = setInterval (() => {
123- this .recordTime += 1 ;
124- this .formatedRecordTime = util .formatTime (this .recordTime );
125- }, 1000 )
126125
127126 // TODO ios 在没有请求过权限之前无法得知是否有相关权限,这种状态下需要直接调用录音,但没有状态或回调判断用户拒绝
128127 recorderManager .start ({
135134 },
136135 playVoice () {
137136 console .log (' play voice' );
137+ this .playing = true ;
138138 playTimeInterval = setInterval (() => {
139139 this .playTime += 1 ;
140140 this .formatedPlayTime = util .formatTime (this .playTime );
141141 }, 1000 )
142- this .playing = true ;
143142 music .play ();
144143 },
145144 stopVoice () {
You can’t perform that action at this time.
0 commit comments