Skip to content

Commit d54eeb0

Browse files
pedroSG94pedro.sanchez.garcia.contractor
authored andcommitted
avoid throw error on call setAuthorization with GenericStream class
1 parent 1af26b2 commit d54eeb0

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

library/src/main/java/com/pedro/library/util/streamclient/SrtStreamClient.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class SrtStreamClient(
5252
}
5353

5454
override fun setAuthorization(user: String?, password: String?) {
55-
srtClient.setAuthorization(user, password)
5655
}
5756

5857
override fun setReTries(reTries: Int) {

srt/src/main/java/com/pedro/srt/srt/SrtClient.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,12 @@ class SrtClient(private val connectChecker: ConnectChecker) {
135135
srtSender.setDelay(millis)
136136
}
137137

138-
fun setAuthorization(user: String?, password: String?) {
139-
TODO("unimplemented")
140-
}
141-
142138
/**
143139
* Set passphrase for encrypt. Use empty value to disable it.
144140
*/
145141
fun setPassphrase(passphrase: String, type: EncryptionType) {
146142
if (!isStreaming) {
147-
if (passphrase.length < 10 || passphrase.length > 79) {
143+
if (passphrase.length !in 10..79) {
148144
throw IllegalArgumentException("passphrase must between 10 and 79 length")
149145
}
150146
commandsManager.setPassphrase(passphrase, type)

0 commit comments

Comments
 (0)