We are trying the example coming with ZOOM flutter Video SDK 1.7.0
The example app works fine on Android emulator.
However, it fails to join session on a real Android phone with following error:
D/ZoomVideoSdkDebug(16138): onError, error: ZoomVideoSDKError_Session_Join_Failed
There is no more hint about why session join failed from log.
Could Zoom dev team please help?
@chunsiong.zoom
could you or other Zoom video sdk flutter expert please comment?
thanks.
chunsiong.zoom
(Chun Siong (tag me for response))
August 28, 2023, 4:37am
3
Let me get back to you on this @su.jinyan0
chunsiong.zoom
(Chun Siong (tag me for response))
August 28, 2023, 6:36am
4
@su.jinyan0 ,
could you try replacing this section of the code in example/lib/utils/jwt.dart
?
I’ve
shifted the iat (start time) to 5 mins earlier
made the exp (expiry) more precise
String generateJwt(String sessionName, String roleType) {
try {
var iat = DateTime.now().add(Duration(minutes: -5));
var exp = iat.add(Duration(days: 2));
final jwt = JWT(
{
'app_key': configs["ZOOM_SDK_KEY"],
'version': 1,
'user_identity': makeId(10),
'iat': (iat.millisecondsSinceEpoch / 1000).round(),
'exp': (exp.millisecondsSinceEpoch / 1000).round(),
'tpc': sessionName,
'role_type': int.parse(roleType),
'cloud_recording_option': 1,
},
);
var token = jwt.sign(SecretKey(configs["ZOOM_SDK_SECRET"]));
return token;
} catch (e) {
print(e);
return '';
}
}