Skip to content

Instantly share code, notes, and snippets.

@Arunshaik2001
Created November 28, 2022 05:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Arunshaik2001/f0c8f957db7a161be1db4b23803c003a to your computer and use it in GitHub Desktop.
Save Arunshaik2001/f0c8f957db7a161be1db4b23803c003a to your computer and use it in GitHub Desktop.
Column(verticalArrangement = Arrangement.Bottom, modifier = Modifier.fillMaxHeight()) {
Row(modifier = Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.Center) {
Image(
modifier = Modifier.clickable {
isAudio = !isAudio
WebRTCUtil.callJavaScriptFunction(
webViewCompose!!,
"javascript:toggleAudio(\"$isAudio\")"
);
},
painter = painterResource(id = if (isAudio) R.drawable.btn_mute_normal else R.drawable.btn_unmute_normal),
contentDescription = "audio"
)
Image(
modifier = Modifier.clickable {
WebRTCUtil.callJavaScriptFunction(
webViewCompose!!,
"javascript:disconnectCall()"
);
mainActivity.finish()
},
painter = painterResource(id = R.drawable.btn_endcall_normal),
contentDescription = "end"
)
Image(
modifier = Modifier.clickable {
isVideo = !isVideo
WebRTCUtil.callJavaScriptFunction(
webViewCompose!!,
"javascript:toggleVideo(\"$isVideo\")"
);
},
painter = painterResource(id = if (isVideo) R.drawable.btn_video_muted else R.drawable.btn_video_normal),
contentDescription = "video"
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment