Skip to content

Commit

Permalink
chore. remove deprecated api
Browse files Browse the repository at this point in the history
  • Loading branch information
Matrixbirds committed Feb 22, 2019
1 parent e7d8354 commit 975ab52
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 41 deletions.
19 changes: 0 additions & 19 deletions android/src/main/java/com/syan/agora/AgoraModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -2370,25 +2370,6 @@ public void resumeAllEffects(int soundId, Promise promise) {
}
}


//配置旁路直播推流
@ReactMethod
public void configPublisher(ReadableMap options) {
PublisherConfiguration config = new PublisherConfiguration.Builder()
.owner(options.getBoolean("owner"))
.size(options.getInt("width"), options.getInt("height"))
.frameRate(options.getInt("framerate"))
// .biteRate(options.getInt("bitrate"))
.defaultLayout(options.getInt("defaultLayout"))
.streamLifeCycle(options.getInt("lifeCycle"))
.rawStreamUrl(options.getString("rawStreamUrl"))
.publishUrl(options.getString("publishUrl"))
.extraInfo(options.getString("extraInfo"))
.build();

AgoraManager.getInstance().mRtcEngine.configPublisher(config);
}

//设置本地视频显示模式
@ReactMethod
public void setLocalRenderMode(int mode) {
Expand Down
22 changes: 0 additions & 22 deletions ios/RCTAgora/RCTAgora.m
Original file line number Diff line number Diff line change
Expand Up @@ -1576,28 +1576,6 @@ - (NSDictionary *)constantsToExport {
resolve(@[[AgoraRtcEngineKit getSdkVersion]]);
}

/*
* @deprecated method
* configPublisher
*/
RCT_EXPORT_METHOD(configPublisher:(NSDictionary *)config){
AgoraPublisherConfiguration *apc = [AgoraPublisherConfiguration new];

apc.width = [config[@"width"] integerValue]; //旁路直播的输出码流的宽度
apc.height = [config[@"height"] integerValue]; //旁路直播的输出码流的高度
apc.framerate = [config[@"framerate"] integerValue]; //旁路直播的输出码率帧率
apc.bitrate = [config[@"bitrate"] integerValue]; //旁路直播输出码流的码率
apc.defaultLayout = [config[@"defaultLayout"] integerValue]; //设置流生命周期
apc.lifeCycle = [config[@"lifeCycle"] integerValue]; //默认合图布局
apc.publishUrl = config[@"publishUrl"]; //合图推流地址
apc.rawStreamUrl = config[@"rawStreamUrl"]; //单流地址
apc.extraInfo = config[@"extraInfo"]; //其他信息
apc.owner = [config[@"owner"] boolValue]; //是否将当前主播设为该 RTMP 流的主人

[self.rtcEngine configPublisher:apc];
NSLog(@"[DEPRECATED] configPublisher, use addPublishStreamUrl instead ");
}

// add publish stream url
RCT_EXPORT_METHOD(addPublishStreamUrl:(NSDictionary *)options) {
[self.rtcEngine addPublishStreamUrl:options[@"url"] transcodingEnabled:[options[@"enable"] boolValue]];
Expand Down

0 comments on commit 975ab52

Please sign in to comment.