增加了zego的正式环境切换
This commit is contained in:
@@ -28,7 +28,7 @@ public class LiveStreamManagerImpl implements ILiveStreamManager {
|
||||
private final Application mApplication;
|
||||
|
||||
// 循环上报摄像头可直播状态间隔时间
|
||||
private static final int PUSH_CAM_TIME = 60 * 1000;
|
||||
private static final int PUSH_CAM_TIME = 35 * 1000;
|
||||
private static volatile int sCam1LiveStatus = 0, sCam2LiveStatus = 0;
|
||||
private static volatile int sCam1AvailableStatus = 0, sCam2AvailableStatus = 0;
|
||||
private static final int PUSH_START = 0; // 开始
|
||||
|
||||
@@ -42,6 +42,11 @@ import im.zego.zegoexpress.entity.ZegoUser;
|
||||
import im.zego.zegoexpress.entity.ZegoVideoConfig;
|
||||
import im.zego.zegoexpress.entity.ZegoVideoFrameParam;
|
||||
|
||||
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_DEMO;
|
||||
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_DEV;
|
||||
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_QA;
|
||||
import static com.mogo.cloud.httpdns.MogoHttpDnsConfig.HTTP_DNS_ENV_RELEASE;
|
||||
|
||||
/**
|
||||
* 即构直播管理
|
||||
*/
|
||||
@@ -390,10 +395,20 @@ public class MoGoLiveManager {
|
||||
|
||||
// 创建 enging 对象, appID, appSign 为开发者在 ZEGO 管理控制台申请的凭证信息,
|
||||
// 未上线的开发者 isTestEnvironment 为 true, application 为安卓应用的上下文
|
||||
boolean isTestEnv = false;
|
||||
switch (MoGoAiCloudClientConfig.getInstance().getNetMode()) {
|
||||
case HTTP_DNS_ENV_DEV:
|
||||
case HTTP_DNS_ENV_QA:
|
||||
case HTTP_DNS_ENV_DEMO:
|
||||
isTestEnv = true;
|
||||
break;
|
||||
case HTTP_DNS_ENV_RELEASE:
|
||||
isTestEnv = false;
|
||||
}
|
||||
mExpressEngine = ZegoExpressEngine.createEngine(
|
||||
appId,
|
||||
appKey,
|
||||
true,
|
||||
isTestEnv,
|
||||
ZegoScenario.GENERAL,
|
||||
mApplication,
|
||||
mEventHandler);
|
||||
|
||||
Reference in New Issue
Block a user