solve video stream publisher popup window bug

merge-requests/750/head
mosazaid 3 years ago
parent 78338ebc64
commit 321bf7825e

@ -28,6 +28,15 @@ apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android { android {
compileSdkVersion 30 compileSdkVersion 30
// signingConfigs {
// release {
// storeFile file('C:\\Users\\admin\\Downloads\\DQKey.jks')
// storePassword 'HmGsa123'
// keyAlias 'key'
// keyPassword 'HmGsa123'
// }
// }
sourceSets { sourceSets {
main.java.srcDirs += 'src/main/kotlin' main.java.srcDirs += 'src/main/kotlin'
} }
@ -50,10 +59,25 @@ android {
buildTypes { buildTypes {
release { release {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
signingConfig signingConfigs.debug
}
debug {
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
} }
} }
// flavorDimensions 'environment'
// productFlavors {
// production {
// dimension 'environment'
// }
// }
//
// configurations {
// productionDebugImplementation
// productionReleaseImplementation
// }
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8 sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8

@ -284,7 +284,9 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
// progressBar=findViewById(R.id.progress_bar); // progressBar=findViewById(R.id.progress_bar);
// progressBarTextView=findViewById(R.id.progress_bar_text); // progressBarTextView=findViewById(R.id.progress_bar_text);
// progressBar.setVisibility(View.GONE); // progressBar.setVisibility(View.GONE);
hiddenButtons()
// hiddenButtons()
checkClientConnected() checkClientConnected()
if (appLang == "ar") { if (appLang == "ar") {
@ -359,6 +361,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
} }
mPublisherViewContainer.addView(mPublisher!!.view) mPublisherViewContainer.addView(mPublisher!!.view)
mSession!!.publish(mPublisher) mSession!!.publish(mPublisher)
if (!resume) { if (!resume) {
@ -562,7 +565,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
mSubscriberViewContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape) mSubscriberViewContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
} else { } else {
videoCallContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.text_color)) videoCallContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.text_color))
mSubscriberViewContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.text_color)) mSubscriberViewContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.remoteBackground))
} }
} }
@ -635,6 +638,11 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
localPreviewLayoutParam.width = localPreviewWidth localPreviewLayoutParam.width = localPreviewWidth
localPreviewLayoutParam.height = localPreviewHeight localPreviewLayoutParam.height = localPreviewHeight
localPreviewLayoutParam.setMargins(0, localPreviewMargin, localPreviewMargin, 0) localPreviewLayoutParam.setMargins(0, localPreviewMargin, localPreviewMargin, 0)
if (mPublisher != null && mPublisher!!.view.parent == null){
mPublisherViewContainer.addView(mPublisher!!.view)
}
mPublisherViewContainer.visibility = View.VISIBLE
// remotePreviewLayoutParam = FrameLayout.LayoutParams(remotePreviewIconSize, remotePreviewIconSize) // remotePreviewLayoutParam = FrameLayout.LayoutParams(remotePreviewIconSize, remotePreviewIconSize)
remotePreviewLayoutParam.width = remotePreviewIconSize remotePreviewLayoutParam.width = remotePreviewIconSize
remotePreviewLayoutParam.height = remotePreviewIconSize remotePreviewLayoutParam.height = remotePreviewIconSize
@ -657,6 +665,11 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
localPreviewLayoutParam.width = 0 localPreviewLayoutParam.width = 0
localPreviewLayoutParam.height = 0 localPreviewLayoutParam.height = 0
localPreviewLayoutParam.setMargins(0, localPreviewMargin / 2, localPreviewMargin / 2, 0) localPreviewLayoutParam.setMargins(0, localPreviewMargin / 2, localPreviewMargin / 2, 0)
if (mPublisher != null){
mPublisherViewContainer.removeView(mPublisher!!.view)
}
mPublisherViewContainer.visibility = View.GONE
// localPreviewLayoutIconParam = FrameLayout.LayoutParams(localPreviewIconSmall, localPreviewIconSmall) // localPreviewLayoutIconParam = FrameLayout.LayoutParams(localPreviewIconSmall, localPreviewIconSmall)
//// localPreviewLayoutParam = RelativeLayout.LayoutParams(localPreviewWidthSmall, localPreviewHeightSmall) //// localPreviewLayoutParam = RelativeLayout.LayoutParams(localPreviewWidthSmall, localPreviewHeightSmall)
// localPreviewLayoutParam.width = localPreviewWidthSmall // localPreviewLayoutParam.width = localPreviewWidthSmall
@ -820,7 +833,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() { override fun onFinish() {
mParams.x = -(szWindow.x - videoCallContainer.width) mParams.x = -(szWindow.x - videoCallContainer.width)
dialog!!.window!!.attributes = mParams dialog?.window!!.attributes = mParams
} }
}.start() }.start()
} }
@ -846,7 +859,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() { override fun onFinish() {
mParams.x = szWindow.x - videoCallContainer.width mParams.x = szWindow.x - videoCallContainer.width
dialog!!.window!!.attributes = mParams dialog?.window!!.attributes = mParams
} }
}.start() }.start()
} }
@ -866,7 +879,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
private class MyGestureListener(val onTabCall: () -> Unit, val miniCircleDoubleTap: () -> Unit) : GestureDetector.SimpleOnGestureListener() { private class MyGestureListener(val onTabCall: () -> Unit, val miniCircleDoubleTap: () -> Unit) : GestureDetector.SimpleOnGestureListener() {
override fun onSingleTapConfirmed(event: MotionEvent): Boolean { override fun onSingleTapConfirmed(event: MotionEvent): Boolean {
onTabCall() // onTabCall()
return true return true
} }

@ -27,9 +27,9 @@ class VideoCallService extends BaseService{
this.patient = patientModel; this.patient = patientModel;
DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true); DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen( await VideoChannel.openVideoCallScreen(
kToken: startCallRes.openTokenID,//"T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==", kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==", // startCallRes.openTokenID,
kSessionId:startCallRes.openSessionID,//1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg kSessionId:"1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg", // startCallRes.openSessionID,
kApiKey: '46209962',//'47247954' kApiKey: '47247954' ,//'46209962'
vcId: patient.vcId, vcId: patient.vcId,
patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"), patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"),
tokenID: await sharedPref.getString(TOKEN), tokenID: await sharedPref.getString(TOKEN),

@ -255,7 +255,7 @@ class AuthenticationViewModel extends BaseViewModel {
/// add  token to shared preferences in case of send activation code is success /// add  token to shared preferences in case of send activation code is success
setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) { setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) {
print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
// DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode); DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
sharedPref.setString(VIDA_AUTH_TOKEN_ID, sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID); sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
sharedPref.setString(VIDA_REFRESH_TOKEN_ID, sharedPref.setString(VIDA_REFRESH_TOKEN_ID,

@ -337,8 +337,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
// builder: (BuildContext context) => // builder: (BuildContext context) =>
// EndCallScreen(patient:patient))); // EndCallScreen(patient:patient)));
// TODO MOSA remov it and uncomment the below code
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
});
if(isCallFinished) { /* if(isCallFinished) {
Navigator.push(context, MaterialPageRoute( Navigator.push(context, MaterialPageRoute(
builder: (BuildContext context) => EndCallScreen(patient:patient))); builder: (BuildContext context) => EndCallScreen(patient:patient)));
} else { } else {
@ -357,10 +361,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){ AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected); locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
}); });
}
} }
}*/
}, },

Loading…
Cancel
Save