Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

不调用onError和onStop #25

Open
ZeeLyn opened this issue Jun 28, 2019 · 1 comment
Open

不调用onError和onStop #25

ZeeLyn opened this issue Jun 28, 2019 · 1 comment

Comments

@ZeeLyn
Copy link

ZeeLyn commented Jun 28, 2019

下面是我的测试调用代码,怎么都不触发onError和onStop,但是触发了onStart和onRecognize

const plugin = requirePlugin("WechatSI");
const manager = plugin.getRecordRecognitionManager();
Page({
    data: {

    },

    onLoad: function (options) {
        this.initRecord();
    },

    
    onReady: function () {

    },

    initRecord: function () {
        manager.onStart = function (res) {
            console.log("成功开始录音识别", res)
        }
        manager.onStop(function (res) {
            console.log("onStop");
            console.log(res);
        })
        manager.onError(function (err) {
            console.log(err);
        });
        manager.onRecognize = function (res) {
            console.log("current result", res.result)
        }

    },
    startRecord: function (e) {
        console.log("long");
        manager.start();
    },
    endRecord: function (e) {
        
        manager.stop();
        console.log("end");
    }
})
@ZeeLyn ZeeLyn changed the title 不调用onError和onStop() 不调用onError和onStop Jun 28, 2019
@guyuejinshang
Copy link

我这边也是。插件版本是0.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants