This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //forEachIndexed, forEach ile aynı işi yapıyor. Sadece index değerini de alıyor. | |
| //forEachIndexed does the same thing as forEach. It just takes the index value. | |
| val list = listOf("a", "b", "c") | |
| list.forEachIndexed { index, s -> | |
| println("foreachindexed -> $index: $s") | |
| } | |
| ------------------------------------------------------------------------------------------------ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onIceCandidateReceivedCallback = { | |
| Log.d( | |
| SIGNALING_LISTENER_TAG, | |
| "handlingSignalingClient: onIceCandidateReceivedCallback called" | |
| ) | |
| webRtcClient.addIceCandidate(it) | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private val mCallsCandidatesSnaphostListener = | |
| OnSnapshotListener<CallsCandidates> { cloudDBZoneSnapshot, e -> | |
| e?.let { | |
| Log.w(TAG, "onSnapshot: " + e.message) | |
| return@OnSnapshotListener | |
| } | |
| val snapshot = cloudDBZoneSnapshot.snapshotObjects | |
| val callsCandidatesTemp = arrayListOf<CallsCandidates>() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun addIceCandidate(iceCandidate: IceCandidate) = peerConnection?.addIceCandidate(iceCandidate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun sendIceCandidateModelToUser(iceCandidate: IceCandidate, isJoin: Boolean) = runBlocking { | |
| Log.d(TAG, "sendIceCandidateModelToUser: called") | |
| val type: String = when (isJoin) { | |
| true -> Constants.USERTYPE.ANSWER_USER.name | |
| false -> Constants.USERTYPE.OFFER_USER.name | |
| } | |
| val callsCandidates = CallsCandidates() | |
| callsCandidates.uuid = UUID.randomUUID().toString() | |
| callsCandidates.meetingID = meetingID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onIceCandidateCallback = { | |
| signalingClient.sendIceCandidateModelToUser(it, isJoin) | |
| webRtcClient.addIceCandidate(it) | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onAnswerReceivedCallback = { | |
| Log.d( | |
| SIGNALING_LISTENER_TAG, | |
| "handlingSignalingClient: onAnswerReceivedCallback called" | |
| ) | |
| webRtcClient.setRemoteDescription(it) | |
| runOnUiThread { | |
| binding.clVideoLoading.gone() | |
| handleRing(binding.clVideoLoading.isVisible) | |
| handler?.postDelayed(runnable, 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fun setRemoteDescription(sessionDescription: SessionDescription) = | |
| peerConnection?.setRemoteDescription(SdpObserverImpl(), sessionDescription) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onOfferReceivedCallback = { | |
| Log.d( | |
| SIGNALING_LISTENER_TAG, | |
| "handlingSignalingClient: onOfferReceivedCallback called" | |
| ) | |
| webRtcClient.setRemoteDescription(it) | |
| webRtcClient.answer() | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.hms.quickline.presentation.call.webrtc | |
| import android.content.BroadcastReceiver | |
| import android.content.Context | |
| import android.content.Intent | |
| import android.content.IntentFilter | |
| import android.content.pm.PackageManager | |
| import android.media.AudioDeviceInfo | |
| import android.media.AudioManager | |
| import android.media.AudioManager.OnAudioFocusChangeListener |
NewerOlder