BBASMRecorderPlugin.h 2.9 KB
//
//  BBASMRecorderPlugin.h
//  SWAN
//
//  Created by baidu on 2018/4/27.
//  Copyright © 2018年 baidu. All rights reserved.
//

#import "BBASMUtilities.h"

@interface BBASMRecorderPlugin : BBASDPluginBase

/**
 * 描  述: 开始录音
 * 示  例: baiduboxapp://swanAPI/recorder/start?params={"duration":"10000","sampleRate":"44100","numberOfChannels":"1","encodeBitRate":"192000","format":"aac","audioSource":"auto","cb":{"onStart":"_recorder_onStart","onPause":"_recorder_onPause","onStop":"_recorder_onStop","onError":"_recorder_onError"}}&callback=_bdbox_js_498&upgrade=0
 * 文  档: http://ft.baidu.com/#/scheme/swan_recorder_start
 * 备  注:
 * ********** description ************
 * @name:      recorder.start
 * @authority: swanAPI
 * @path:      /recorder/start
 * @args:      [{"name": "duration", "value": "string="}, {"name": "sampleRate", "value": "string="}, {"name": "numberOfChannels", "value": "string="}, {"name": "encodeBitRate", "value": "string="}, {"name": "format", "value": "string="}, {"name": "audioSource", "value": "string="}, {"name": "cb", "value": "object="}]
 * @config:    {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
 */
- (void)start:(BBASchemeDispatcher *)dispatcher;

/**
 * 描  述: 暂停录音
 * 示  例: baiduboxapp://swanAPI/recorder/pause?callback=_bdbox_js_520&upgrade=0
 * 文  档: http://ft.baidu.com/#/scheme/swan_recorder_pause
 * 备  注:
 * ********** description ************
 * @name:      recorder.pause
 * @authority: swanAPI
 * @path:      /recorder/pause
 * @args:      []
 * @config:    {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
 */
- (void)pause:(BBASchemeDispatcher *)dispatcher;

/**
 * 描  述: 继续录音
 * 示  例: baiduboxapp://swanAPI/recorder/resume?callback=_bdbox_js_521&upgrade=0
 * 文  档: http://ft.baidu.com/#/scheme/swan_recorder_resume
 * 备  注:
 * ********** description ************
 * @name:      recorder.resume
 * @authority: swanAPI
 * @path:      /recorder/resume
 * @args:      []
 * @config:    {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
 */
- (void)resume:(BBASchemeDispatcher *)dispatcher;

/**
 * 描  述: 停止录音
 * 示  例: baiduboxapp://swanAPI/recorder/stop?callback=_bdbox_js_522&upgrade=0
 * 文  档: http://ft.baidu.com/#/scheme/swan_recorder_stop
 * 备  注:
 * ********** description ************
 * @name:      recorder.stop
 * @authority: swanAPI
 * @path:      /recorder/stop
 * @args:      []
 * @config:    {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.url", "method": "_naSwan.bridge.postMessage"}}}
 */
- (void)stop:(BBASchemeDispatcher *)dispatcher;


@end