feat: adding more command handlers in WebRtcCallService.kt

This commit is contained in:
jubb
2021-11-04 17:14:07 +11:00
parent 5cff5ffb45
commit de4d8e9be4
7 changed files with 471 additions and 23 deletions

View File

@@ -33,6 +33,20 @@ class CallMessage(): ControlMessage() {
companion object {
const val TAG = "CallMessage"
fun answer(sdp: String, callId: UUID) = CallMessage(SignalServiceProtos.CallMessage.Type.ANSWER,
listOf(sdp),
listOf(),
listOf(),
callId
)
fun offer(sdp: String, callId: UUID) = CallMessage(SignalServiceProtos.CallMessage.Type.OFFER,
listOf(sdp),
listOf(),
listOf(),
callId
)
fun endCall(callId: UUID) = CallMessage(SignalServiceProtos.CallMessage.Type.END_CALL, emptyList(), emptyList(), emptyList(), callId)
fun fromProto(proto: SignalServiceProtos.Content): CallMessage? {