bugfix
This commit is contained in:
parent
de18092ab8
commit
4a924f91c9
@ -59,7 +59,6 @@ bricks.AudioRecorder = class extends bricks.HBox {
|
||||
{
|
||||
"upload_url":
|
||||
"icon_rate":
|
||||
"upload_resp":"text", or "json", or "bin"
|
||||
}
|
||||
we need this module:
|
||||
https://gitee.com/xiangyuecn/Recorder
|
||||
@ -197,18 +196,7 @@ bricks.AudioRecorder = class extends bricks.HBox {
|
||||
params:form
|
||||
});
|
||||
bricks.debug('ret=', ret);
|
||||
if (!this.upload_resp){
|
||||
this.upload_resp = 'text';
|
||||
}
|
||||
data = null;
|
||||
if (this.upload_resp == 'text'){
|
||||
data = await ret.text();
|
||||
} else if (this.upload_resp == 'json'){
|
||||
data = await ret.json();
|
||||
} else if (this.upload_resp == 'bin'){
|
||||
data = await ret.bin();
|
||||
}
|
||||
this.dispatch('uploaded', data)
|
||||
this.dispatch('uploaded', ret)
|
||||
}
|
||||
download(){
|
||||
if(!this.recordData){
|
||||
@ -258,3 +246,4 @@ bricks.SttClinet = class extends bricks.VBox {
|
||||
}
|
||||
bricks.Factory.register('AudioPlayer', bricks.AudioPlayer);
|
||||
bricks.Factory.register('AudioRecorder', bricks.AudioRecorder);
|
||||
bricks.Factory.register('SttClient', bricks.SttClient);
|
||||
|
Loading…
Reference in New Issue
Block a user