|
|
|
@ -10,7 +10,7 @@ class VideoChannel{
|
|
|
|
/// channel name
|
|
|
|
/// channel name
|
|
|
|
static const _channel = const MethodChannel("Dr.cloudSolution/videoCall");
|
|
|
|
static const _channel = const MethodChannel("Dr.cloudSolution/videoCall");
|
|
|
|
static openVideoCallScreen(
|
|
|
|
static openVideoCallScreen(
|
|
|
|
{kApiKey, kSessionId, kToken, callDuration, warningDuration, Function() onCallEnd , Function(SessionStatusModel sessionStatusModel) callNotRespond ,Function(String error) onFailure}) async {
|
|
|
|
{kApiKey, kSessionId, kToken, callDuration, warningDuration,int vcId,String tokenID,String generalId,int doctorId, Function() onCallEnd , Function(SessionStatusModel sessionStatusModel) onCallNotRespond ,Function(String error) onFailure}) async {
|
|
|
|
var result;
|
|
|
|
var result;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
result = await _channel.invokeMethod(
|
|
|
|
result = await _channel.invokeMethod(
|
|
|
|
@ -21,22 +21,21 @@ class VideoChannel{
|
|
|
|
"kToken": kToken,
|
|
|
|
"kToken": kToken,
|
|
|
|
"appLang": "en",
|
|
|
|
"appLang": "en",
|
|
|
|
"baseUrl": BASE_URL,
|
|
|
|
"baseUrl": BASE_URL,
|
|
|
|
"VC_ID": 3245,
|
|
|
|
"VC_ID": vcId,
|
|
|
|
"TokenID": "hfkjshdf347r8743",
|
|
|
|
"TokenID": tokenID,
|
|
|
|
"generalId": 'Cs2020@2016\$2958',
|
|
|
|
"generalId": generalId,
|
|
|
|
"DoctorId": 1485 ,
|
|
|
|
"DoctorId": doctorId ,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
if(result['callResponse'] == 'CallEnd') {
|
|
|
|
if(result['callResponse'] == 'CallEnd') {
|
|
|
|
onCallEnd();
|
|
|
|
onCallEnd();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
|
|
|
|
|
|
|
|
SessionStatusModel sessionStatusModel = SessionStatusModel.fromJson(Platform.isIOS ?result['sessionStatus'] :json.decode(result['sessionStatus']));
|
|
|
|
SessionStatusModel sessionStatusModel = SessionStatusModel.fromJson(Platform.isIOS ?result['sessionStatus'] :json.decode(result['sessionStatus']));
|
|
|
|
callNotRespond(sessionStatusModel);
|
|
|
|
onCallNotRespond(sessionStatusModel);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} on PlatformException catch (e) {
|
|
|
|
} catch (e) {
|
|
|
|
onFailure(e.toString());
|
|
|
|
onFailure(e.toString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|