Commit 0013e556 by MissYasiky

使用方法赋值代替逐个属性赋值,简要代码。

parent cd7b8e58
......@@ -119,11 +119,8 @@ RCT_EXPORT_METHOD(
[hud hideAnimated:YES];
PLVLiveVideoConfig *liveConfig = [PLVLiveVideoConfig sharedInstance];
liveConfig.channelId = channelId;
liveConfig.appId = appId;
liveConfig.userId = userId;
liveConfig.appSecret = appSecret;
[PLVLiveVideoConfig liveConfigWithUserId:userId appId:appId appSecret:appSecret];
[PLVLiveVideoConfig sharedInstance].channelId = channelId;
PLVLiveViewController *liveVC = [PLVLiveViewController new];
liveVC.liveType = [@"ppt" isEqualToString:liveType] ? PLVLiveViewControllerTypeCloudClass : PLVLiveViewControllerTypeLive;
......@@ -137,11 +134,8 @@ RCT_EXPORT_METHOD(
[hud hideAnimated:YES];
PLVLiveVideoConfig *liveConfig = [PLVLiveVideoConfig sharedInstance];
liveConfig.channelId = channelId;
liveConfig.appId = appId;
liveConfig.userId = userId;
liveConfig.appSecret = appSecret;
[PLVLiveVideoConfig liveConfigWithUserId:userId appId:appId appSecret:appSecret];
[PLVLiveVideoConfig sharedInstance].channelId = channelId;
PLVLiveViewController *liveVC = [PLVLiveViewController new];
liveVC.liveType = [@"ppt" isEqualToString:liveType] ? PLVLiveViewControllerTypeCloudClass : PLVLiveViewControllerTypeLive;
......@@ -236,12 +230,9 @@ RCT_EXPORT_METHOD(
[hud hideAnimated:YES];
PLVLiveVideoConfig *liveConfig = [PLVLiveVideoConfig sharedInstance];
liveConfig.appId = appId;
liveConfig.appSecret = appSecret;
liveConfig.userId = userId;
liveConfig.vodId = vodId;
liveConfig.channelId = channelId;
[PLVLiveVideoConfig liveConfigWithUserId:userId appId:appId appSecret:appSecret];
[PLVLiveVideoConfig sharedInstance].channelId = channelId;
[PLVLiveVideoConfig sharedInstance].vodId = vodId;
PLVVodViewController *vodVC = [PLVVodViewController new];
vodVC.vodType = vodType ? PLVVodViewControllerTypeCloudClass : PLVVodViewControllerTypeLive;
......@@ -254,12 +245,9 @@ RCT_EXPORT_METHOD(
[hud hideAnimated:YES];
PLVLiveVideoConfig *liveConfig = [PLVLiveVideoConfig sharedInstance];
liveConfig.appId = appId;
liveConfig.appSecret = appSecret;
liveConfig.userId = userId;
liveConfig.vodId = vodId;
liveConfig.channelId = channelId;
[PLVLiveVideoConfig liveConfigWithUserId:userId appId:appId appSecret:appSecret];
[PLVLiveVideoConfig sharedInstance].channelId = channelId;
[PLVLiveVideoConfig sharedInstance].vodId = vodId;
PLVVodViewController *vodVC = [PLVVodViewController new];
vodVC.vodType = vodType ? PLVVodViewControllerTypeCloudClass : PLVVodViewControllerTypeLive;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment