|
|
@ -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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|