Skip to content

Commit

Permalink
fix(api): don't return Job in AudioSender#start method
Browse files Browse the repository at this point in the history
  • Loading branch information
Apehum committed May 28, 2024
1 parent f817c23 commit e206bcd
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ class AudioSender(
private val onEnd: (sequenceNumber: Long) -> Boolean
) {

private var job: Job? = null
/**
* Gets a coroutine job started by [start].
*
* Use this field only with [kotlin relocation](https://plasmovoice.com/docs/api/#kotlin).
* Otherwise, you will get class not found exception.
*/
var job: Job? = null
private set

private var onStop: Runnable? = null

Expand All @@ -27,7 +34,7 @@ class AudioSender(
*
* This will also resume the sender if it was paused using [pause].
*/
fun start(): Job {
fun start() {
resume()

val job = CoroutineScope(Dispatchers.Default).launch {
Expand Down Expand Up @@ -87,7 +94,6 @@ class AudioSender(
}

this.job = job
return job
}

/**
Expand Down

0 comments on commit e206bcd

Please sign in to comment.