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 {
compileSdkVersion 30
// signingConfigs {
// release {
// storeFile file('C:\\Users\\admin\\Downloads\\DQKey.jks')
// storePassword 'HmGsa123'
// keyAlias 'key'
// keyPassword 'HmGsa123'
// }
// }
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
@ -50,10 +59,25 @@ android {
buildTypes {
release {
// 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.
signingConfig signingConfigs.debug
}
}
// flavorDimensions 'environment'
// productFlavors {
// production {
// dimension 'environment'
// }
// }
//
// configurations {
// productionDebugImplementation
// productionReleaseImplementation
// }
compileOptions {
sourceCompatibility 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);
// progressBarTextView=findViewById(R.id.progress_bar_text);
// progressBar.setVisibility(View.GONE);
hiddenButtons()
// hiddenButtons()
checkClientConnected()
if (appLang == "ar") {
@ -359,6 +361,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
}
mPublisherViewContainer.addView(mPublisher!!.view)
mSession!!.publish(mPublisher)
if (!resume) {
@ -562,7 +565,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
mSubscriberViewContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
} else {
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.height = localPreviewHeight
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.width = remotePreviewIconSize
remotePreviewLayoutParam.height = remotePreviewIconSize
@ -657,6 +665,11 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
localPreviewLayoutParam.width = 0
localPreviewLayoutParam.height = 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)
//// localPreviewLayoutParam = RelativeLayout.LayoutParams(localPreviewWidthSmall, localPreviewHeightSmall)
// localPreviewLayoutParam.width = localPreviewWidthSmall
@ -820,7 +833,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() {
mParams.x = -(szWindow.x - videoCallContainer.width)
dialog!!.window!!.attributes = mParams
dialog?.window!!.attributes = mParams
}
}.start()
}
@ -846,7 +859,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
override fun onFinish() {
mParams.x = szWindow.x - videoCallContainer.width
dialog!!.window!!.attributes = mParams
dialog?.window!!.attributes = mParams
}
}.start()
}
@ -866,7 +879,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
private class MyGestureListener(val onTabCall: () -> Unit, val miniCircleDoubleTap: () -> Unit) : GestureDetector.SimpleOnGestureListener() {
override fun onSingleTapConfirmed(event: MotionEvent): Boolean {
onTabCall()
// onTabCall()
return true
}

@ -27,9 +27,9 @@ class VideoCallService extends BaseService{
this.patient = patientModel;
DoctorProfileModel doctorProfile = await getDoctorProfile(isGetProfile: true);
await VideoChannel.openVideoCallScreen(
kToken: startCallRes.openTokenID,//"T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==",
kSessionId:startCallRes.openSessionID,//1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg
kApiKey: '46209962',//'47247954'
kToken: "T1==cGFydG5lcl9pZD00NzI0Nzk1NCZzaWc9NGIyZDljOTY3YjFiNWU1YzUzNzFmMjIyNjJmNmEzY2Y5NzZjOTdlYzpzZXNzaW9uX2lkPTFfTVg0ME56STBOemsxTkg1LU1UWXlNekEyTlRRMU9EVXhObjVrVFRoMFlVdFJXaXRYTWpadFZGZHFhSGxZVGpOdE1UVi1mZyZjcmVhdGVfdGltZT0xNjIzMDY1NDk1Jm5vbmNlPTAuMjM2Mjk0NTIwMTkyOTA4OTcmcm9sZT1wdWJsaXNoZXImZXhwaXJlX3RpbWU9MTYyNTY1NzQ5NCZpbml0aWFsX2xheW91dF9jbGFzc19saXN0PQ==", // startCallRes.openTokenID,
kSessionId:"1_MX40NzI0Nzk1NH5-MTYyMzA2NTQ1ODUxNn5kTTh0YUtRWitXMjZtVFdqaHlYTjNtMTV-fg", // startCallRes.openSessionID,
kApiKey: '47247954' ,//'46209962'
vcId: patient.vcId,
patientName: patient.fullName ?? (patient.firstName != null ? "${patient.firstName} ${patient.lastName}" : "-"),
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
setDataAfterSendActivationSuccess(SendActivationCodeForDoctorAppResponseModel sendActivationCodeForDoctorAppResponseModel) {
print("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
// DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
DrAppToastMsg.showSuccesToast("VerificationCode : " + sendActivationCodeForDoctorAppResponseModel.verificationCode);
sharedPref.setString(VIDA_AUTH_TOKEN_ID,
sendActivationCodeForDoctorAppResponseModel.vidaAuthTokenID);
sharedPref.setString(VIDA_REFRESH_TOKEN_ID,

@ -337,8 +337,12 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
// builder: (BuildContext context) =>
// 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(
builder: (BuildContext context) => EndCallScreen(patient:patient)));
} else {
@ -357,10 +361,8 @@ class _PatientProfileScreenState extends State<PatientProfileScreen>
AppPermissionsUtils.requestVideoCallPermission(context: context,onTapGrant: (){
locator<VideoCallService>().openVideo(model.startCallRes, patient, callConnected, callDisconnected);
});
}
}
}*/
},

Loading…
Cancel
Save