diff --git a/lib/core/service/VideoCallService.dart b/lib/core/service/VideoCallService.dart index 0f8f0061..31cc2cd6 100644 --- a/lib/core/service/VideoCallService.dart +++ b/lib/core/service/VideoCallService.dart @@ -30,12 +30,12 @@ class VideoCallService extends BaseService { await getDoctorProfile(isGetProfile: true); await VideoChannel.openVideoCallScreen( // TODO MOSA TEST - // kToken: startCallRes.openTokenID, - // kSessionId: startCallRes.openSessionID, - // kApiKey:'46209962', - kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", - kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", - kApiKey:'47247954', + kToken: startCallRes.openTokenID, + kSessionId: startCallRes.openSessionID, + kApiKey:'46209962', + // kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGUyZjgxMjFlYTFkNzU5NjcxNDY2ZTM2ZjM3YTVhNTI2NGY0NTI2NzpzZXNzaW9uX2lkPTJfTVg0ME56STBOemsxTkg1LU1UWXlOVGN5TmpnMk5qZzNOMzQ1YUhCcGRtcDFXbVpDTDFkNE1qbDRkWFY2TTA4cmIySi1mZyZjcmVhdGVfdGltZT0xNjI1NzI2ODg5Jm5vbmNlPTAuNjc2Nzc4OTQxNjA1MTMxNSZyb2xlPXB1Ymxpc2hlciZleHBpcmVfdGltZT0xNjI4MzE4ODg4JmluaXRpYWxfbGF5b3V0X2NsYXNzX2xpc3Q9", + // kSessionId: "2_MX40NzI0Nzk1NH5-MTYyNTcyNjg2Njg3N345aHBpdmp1WmZCL1d4Mjl4dXV6M08rb2J-fg", + // kApiKey:'47247954', vcId: patient.vcId, isRecording: isRecording, patientName: patient.fullName ?? @@ -51,8 +51,7 @@ class VideoCallService extends BaseService { onCallConnected: onCallConnected, onCallDisconnected: onCallDisconnected, onCallEnd: () { - // mosa todo uncomment - /* WidgetsBinding.instance.addPostFrameCallback((_) async { + WidgetsBinding.instance.addPostFrameCallback((_) async { GifLoaderDialogUtils.showMyDialog( locator().navigatorKey.currentContext); endCall( @@ -70,7 +69,7 @@ class VideoCallService extends BaseService { "patient": patient, }); }); - });*/ + }); }, onCallNotRespond: (SessionStatusModel sessionStatusModel) { WidgetsBinding.instance.addPostFrameCallback((_) { @@ -96,17 +95,16 @@ class VideoCallService extends BaseService { } Future endCall(int vCID, bool isPatient) async { - // mosa todo uncomment - // hasError = false; - // await getDoctorProfile(isGetProfile: true); - // EndCallReq endCallReq = new EndCallReq(); - // endCallReq.doctorId = doctorProfile.doctorID; - // endCallReq.generalid = 'Cs2020@2016\$2958'; - // endCallReq.vCID = vCID; - // endCallReq.isDestroy = isPatient; - // await _liveCarePatientServices.endCall(endCallReq); - // if (_liveCarePatientServices.hasError) { - // error = _liveCarePatientServices.error; - // } + hasError = false; + await getDoctorProfile(isGetProfile: true); + EndCallReq endCallReq = new EndCallReq(); + endCallReq.doctorId = doctorProfile.doctorID; + endCallReq.generalid = 'Cs2020@2016\$2958'; + endCallReq.vCID = vCID; + endCallReq.isDestroy = isPatient; + await _liveCarePatientServices.endCall(endCallReq); + if (_liveCarePatientServices.hasError) { + error = _liveCarePatientServices.error; + } } } diff --git a/lib/screens/home/home_screen.dart b/lib/screens/home/home_screen.dart index f5105953..c48fb789 100644 --- a/lib/screens/home/home_screen.dart +++ b/lib/screens/home/home_screen.dart @@ -339,28 +339,28 @@ class _HomeScreenState extends State { "${TranslationBase.of(context).liveCare}\n${TranslationBase.of(context).patients}", onTap: () { // TODO MOSA TEST - PatiantInformtion patient = PatiantInformtion( - patientStatusType: 43, - episodeNo: 0, - vcId: 42342, - fullName: "mosa test", - dateofBirth: "2000-05-01 10:42:35.790004" - ); - Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { - "patient": patient, - "patientType": "0", - "isSearch": false, - "isInpatient": false, - "arrivalType": "0", - "isSearchAndOut": false, - "isFromLiveCare": true, - }); - // Navigator.push( - // context, - // FadePage( - // page: LiveCarePatientScreen(), - // ), + // PatiantInformtion patient = PatiantInformtion( + // patientStatusType: 43, + // episodeNo: 0, + // vcId: 42342, + // fullName: "mosa test", + // dateofBirth: "2000-05-01 10:42:35.790004" // ); + // Navigator.of(context).pushNamed(PATIENTS_PROFILE, arguments: { + // "patient": patient, + // "patientType": "0", + // "isSearch": false, + // "isInpatient": false, + // "arrivalType": "0", + // "isSearchAndOut": false, + // "isFromLiveCare": true, + // }); + Navigator.push( + context, + FadePage( + page: LiveCarePatientScreen(), + ), + ); }, )); changeColorIndex(); diff --git a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart index 8040e88e..364e47f6 100644 --- a/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart +++ b/lib/screens/patients/profile/profile_screen/patient_profile_screen.dart @@ -309,18 +309,18 @@ class _PatientProfileScreenState extends State with Single disabled: isCallStarted || model.state == ViewState.BusyLocal, onPressed: () async { // TODO MOSA TEST - AppPermissionsUtils - .requestVideoCallPermission( - context: context, - onTapGrant: () { - locator() - .openVideo( - model.startCallRes, - patient, - model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected, - callDisconnected); - }); - /*if (isCallFinished) { + // AppPermissionsUtils + // .requestVideoCallPermission( + // context: context, + // onTapGrant: () { + // locator() + // .openVideo( + // model.startCallRes, + // patient, + // model.startCallRes != null ? model.startCallRes.isRecording : true, callConnected, + // callDisconnected); + // }); + if (isCallFinished) { Navigator.push( context, MaterialPageRoute( @@ -354,7 +354,7 @@ class _PatientProfileScreenState extends State with Single callDisconnected); }); } - }*/ + } }, ), ), diff --git a/lib/util/VideoChannel.dart b/lib/util/VideoChannel.dart index 94035d7d..0239bf57 100644 --- a/lib/util/VideoChannel.dart +++ b/lib/util/VideoChannel.dart @@ -35,7 +35,7 @@ class VideoChannel{ "kSessionId": kSessionId, "kToken": kToken, "appLang": "en", - "baseUrl": BASE_URL_LIVE_CARE,//TODO change it to live + "baseUrl": BASE_URL_LIVE_CARE, "VC_ID": vcId, "TokenID": tokenID, "generalId": generalId,