@@ -27,6 +27,13 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
2727
2828 const val DEFAULT_JOIN_EARLY_MINUTES = 10
2929
30+ val DEFAULT_ALIYUN_CAPTCHA_CONFIG = AliyunCaptchaConfig (
31+ region = " cn" ,
32+ language = " cn" ,
33+ prefix = " 195gxh" ,
34+ sceneId = " nypf9bgg" ,
35+ )
36+
3037 val ALL_BASE_URLS = listOf (
3138 " https://flat-web.whiteboard.agora.io" ,
3239 " https://web.flat.apprtc.cn" ,
@@ -51,6 +58,7 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
5158 logstore = " android" ,
5259 endpoint = " https://cn-hangzhou.log.aliyuncs.com" ,
5360 ),
61+ aliyunCaptchaConfig = DEFAULT_ALIYUN_CAPTCHA_CONFIG ,
5462 ossKey = " LTAI5tD4WSVBxAyfwVoaKTWr" ,
5563 wechatId = " wx09437693798bc108" ,
5664 whiteAppId = " cFjxAJjiEeuUQ0211QCRBw/mO9uJB_DiCIqug" ,
@@ -81,6 +89,7 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
8189 googleClientId = " 273996094508-p97og69ojac5ja0khn1rvmi3tb7vgfgm.apps.googleusercontent.com" ,
8290
8391 loginConfig = LoginConfig (google = false ),
92+ aliyunCaptchaConfig = DEFAULT_ALIYUN_CAPTCHA_CONFIG ,
8493
8594 showIcp = true ,
8695 showStreamAgreement = true ,
@@ -100,6 +109,7 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
100109 logstore = " android" ,
101110 endpoint = " https://ap-southeast-1.log.aliyuncs.com" ,
102111 ),
112+ aliyunCaptchaConfig = DEFAULT_ALIYUN_CAPTCHA_CONFIG .copy(region = " sgp" , language = " en" ),
103113 ossKey = " LTAI5tMwHQ1xyroeneA9XLh4" ,
104114 wechatId = " wx09437693798bc108" ,
105115 whiteAppId = " cFjxAJjiEeuUQ0211QCRBw/kndLTOWdG2qYcQ" ,
@@ -122,6 +132,7 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
122132 logstore = " android" ,
123133 endpoint = " https://ap-southeast-1.log.aliyuncs.com" ,
124134 ),
135+ aliyunCaptchaConfig = DEFAULT_ALIYUN_CAPTCHA_CONFIG .copy(region = " sgp" , language = " en" ),
125136 ossKey = " LTAI5tMwHQ1xyroeneA9XLh4" ,
126137 wechatId = " wx09437693798bc108" ,
127138 whiteAppId = " n9q1oBxDEeyuBMn1qc0iFw/fLgNSEvdwKjlig" ,
@@ -182,6 +193,8 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
182193
183194 val loginConfig get() = currentEnvItem.loginConfig
184195
196+ val aliyunCaptchaConfig get() = currentEnvItem.aliyunCaptchaConfig ? : DEFAULT_ALIYUN_CAPTCHA_CONFIG
197+
185198 val phoneFirst get() = currentEnvItem.loginConfig.phoneFirst
186199
187200 val showIcp get() = currentEnvItem.showIcp
@@ -205,6 +218,7 @@ class AppEnv @Inject constructor(@ApplicationContext context: Context) {
205218 val region : String = " cn-hz" ,
206219
207220 val loginConfig : LoginConfig = LoginConfig (),
221+ val aliyunCaptchaConfig : AliyunCaptchaConfig ? = null ,
208222
209223 val showIcp : Boolean = false ,
210224 val showStreamAgreement : Boolean = false ,
@@ -225,4 +239,11 @@ data class LoginConfig(
225239 fun forceBindPhone (): Boolean {
226240 return sms && smsForce
227241 }
228- }
242+ }
243+
244+ data class AliyunCaptchaConfig (
245+ val region : String ,
246+ val prefix : String ,
247+ val sceneId : String ,
248+ val language : String ,
249+ )
0 commit comments