add video call permissions

merge-requests/745/head
mosazaid 4 years ago
parent b66b624f14
commit 3c2abb66c6

@ -329,7 +329,7 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
@AfterPermissionGranted(RC_VIDEO_APP_PERM) @AfterPermissionGranted(RC_VIDEO_APP_PERM)
private fun requestPermissions() { private fun requestPermissions() {
val perms = arrayOf(Manifest.permission.INTERNET, Manifest.permission.CAMERA) val perms = arrayOf(Manifest.permission.INTERNET, Manifest.permission.CAMERA, Manifest.permission.RECORD_AUDIO, Manifest.permission.MODIFY_AUDIO_SETTINGS, Manifest.permission.CALL_PHONE)
if (EasyPermissions.hasPermissions(requireContext(), *perms)) { if (EasyPermissions.hasPermissions(requireContext(), *perms)) {
try { try {
mSession = Session.Builder(context, apiKey, sessionId).build() mSession = Session.Builder(context, apiKey, sessionId).build()
@ -496,19 +496,19 @@ class VideoCallFragment : DialogFragment(), PermissionCallbacks, Session.Session
private fun onMiniCircleClicked(){ private fun onMiniCircleClicked(){
if (isCircle) { if (isCircle) {
videoCallContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.text_color))
mSubscriberViewContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.remoteBackground))
dialog?.window?.setLayout( dialog?.window?.setLayout(
400, 400,
600 600
) )
videoCallContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.text_color))
mSubscriberViewContainer.setBackgroundColor(ContextCompat.getColor(requireContext(), R.color.remoteBackground))
} else { } else {
videoCallContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
mSubscriberViewContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
dialog?.window?.setLayout( dialog?.window?.setLayout(
200, 200,
200 200
) )
videoCallContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
mSubscriberViewContainer.background = ContextCompat.getDrawable(requireContext(), R.drawable.circle_shape)
} }
isCircle = !isCircle isCircle = !isCircle

Loading…
Cancel
Save