commit 15/10/2025
Overview menu belum beres
This commit is contained in:
9
src/web/StreamerOutputData.kt
Normal file
9
src/web/StreamerOutputData.kt
Normal file
@@ -0,0 +1,9 @@
|
||||
package web
|
||||
|
||||
class StreamerOutputData(val index: UInt, val channel: String, val ipaddress: String, val vu: Int, val bufferRemain: Int, var isPlaying: Boolean) {
|
||||
companion object{
|
||||
fun fromBarixConnection(bc: barix.BarixConnection): StreamerOutputData {
|
||||
return StreamerOutputData(bc.index, bc.channel, bc.ipaddress, bc.vu, bc.bufferRemain, bc.isPlaying())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -143,7 +143,8 @@ class WebApp(val listenPort: Int, val userlist: List<Pair<String, String>>) {
|
||||
}
|
||||
|
||||
"getStreamerOutputs" -> {
|
||||
SendReply(wsMessageContext, cmd.command, objectmapper.writeValueAsString(StreamerOutputs.values.toList()))
|
||||
val reply : List<StreamerOutputData> = StreamerOutputs.map { so -> StreamerOutputData.fromBarixConnection(so.value) }
|
||||
SendReply(wsMessageContext, cmd.command, objectmapper.writeValueAsString(reply))
|
||||
}
|
||||
|
||||
else -> {
|
||||
|
||||
Reference in New Issue
Block a user