@@ -25,6 +25,8 @@ import android.content.Context
25
25
import android.media.MediaRecorder.AudioSource
26
26
import android.os.Handler
27
27
import android.os.Looper
28
+ import com.google.gson.Gson
29
+ import com.google.gson.reflect.TypeToken
28
30
import com.huddle01.kotlin_client.common.EnhancedMap
29
31
import com.huddle01.kotlin_client.common.ProtoParsing
30
32
import com.huddle01.kotlin_client.constants.maxDataMessageSize
@@ -39,8 +41,6 @@ import com.huddle01.kotlin_client.types.TransportType
39
41
import com.huddle01.kotlin_client.types.estimateSize
40
42
import com.huddle01.kotlin_client.utils.EventEmitter
41
43
import com.huddle01.kotlin_client.utils.PeerConnectionUtils
42
- import com.google.gson.Gson
43
- import com.google.gson.reflect.TypeToken
44
44
import io.github.crow_misia.mediasoup.Consumer
45
45
import io.github.crow_misia.mediasoup.Device
46
46
import io.github.crow_misia.mediasoup.Producer
@@ -76,7 +76,7 @@ import java.util.Locale
76
76
* Where Client Means the currently Running Application.
77
77
*/
78
78
class LocalPeer (
79
- context : Context
79
+ context : Context ,
80
80
) : EventEmitter() {
81
81
82
82
private val scope = CoroutineScope (Job () + Dispatchers .Main )
@@ -432,7 +432,7 @@ class LocalPeer(
432
432
433
433
434
434
suspend fun produce (
435
- label : String , audioTrack : AudioTrack ? , videoTrack : VideoTrack ? , appData : String?
435
+ label : String , audioTrack : AudioTrack ? , videoTrack : VideoTrack ? , appData : String? ,
436
436
) {
437
437
Timber .i(" produce called" )
438
438
try {
@@ -642,7 +642,7 @@ class LocalPeer(
642
642
* @returns Consumer?; Returns null if consumer is not found
643
643
*/
644
644
fun getConsumer (
645
- label : String , peerId : String
645
+ label : String , peerId : String ,
646
646
): Consumer ? {
647
647
val consumer = consumers.get(label, peerId)
648
648
return consumer
@@ -1520,7 +1520,7 @@ class LocalPeer(
1520
1520
}
1521
1521
1522
1522
override fun onProduce (
1523
- transport : Transport , kind : String , rtpParameters : String , appData : String?
1523
+ transport : Transport , kind : String , rtpParameters : String , appData : String? ,
1524
1524
): String {
1525
1525
try {
1526
1526
socket.publish(
@@ -1544,7 +1544,7 @@ class LocalPeer(
1544
1544
sctpStreamParameters : String ,
1545
1545
label : String ,
1546
1546
protocol : String ,
1547
- appData : String?
1547
+ appData : String? ,
1548
1548
): String {
1549
1549
TODO (" Not yet implemented" )
1550
1550
}
@@ -1582,7 +1582,7 @@ class LocalPeer(
1582
1582
dtlsParameters : String ,
1583
1583
sctpParameters : String? = null,
1584
1584
rtcConfig : PeerConnection .RTCConfiguration ? = null,
1585
- appData : String? = null
1585
+ appData : String? = null,
1586
1586
): Transport ? {
1587
1587
Timber .i(" createDeviceTransport called for $transportType " )
1588
1588
val transport = when (transportType) {
@@ -1618,7 +1618,7 @@ class LocalPeer(
1618
1618
}
1619
1619
1620
1620
private fun connectionStateChangeHandler (
1621
- transport : Transport ? , state : String , transportType : String
1621
+ transport : Transport ? , state : String , transportType : String ,
1622
1622
) {
1623
1623
try {
1624
1624
Timber .d(" 🔔 $transportType Transport Connection State Changed, state: $state " )
@@ -1715,7 +1715,7 @@ class LocalPeer(
1715
1715
* Helper function to close the consumer of a remote peer
1716
1716
*/
1717
1717
private fun closeRemotePeerConsumer (
1718
- peerId : String , label : String
1718
+ peerId : String , label : String ,
1719
1719
) {
1720
1720
try {
1721
1721
val remotePeer = room.getRemotePeerById(peerId)
0 commit comments