mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2025-09-10 19:46:10 +00:00
casting: update propertiees when updates are received
This commit is contained in:
parent
e2a5665516
commit
42d886ba44
1 changed files with 9 additions and 1 deletions
|
@ -148,7 +148,10 @@ class ExpCastingDevice(val device: RsCastingDevice) : CastingDevice() {
|
|||
} catch (_: Throwable) {
|
||||
}
|
||||
|
||||
override fun changeVolume(timeSeconds: Double) = device.changeVolume(timeSeconds)
|
||||
override fun changeVolume(newVolume: Double) {
|
||||
device.changeVolume(newVolume)
|
||||
volume = newVolume
|
||||
}
|
||||
|
||||
override fun changeSpeed(speed: Double) = device.changeSpeed(speed)
|
||||
|
||||
|
@ -274,6 +277,11 @@ class ExpCastingDevice(val device: RsCastingDevice) : CastingDevice() {
|
|||
}
|
||||
}
|
||||
}
|
||||
eventHandler.onPlayChanged.subscribe { isPlaying = it }
|
||||
eventHandler.onTimeChanged.subscribe { time = it }
|
||||
eventHandler.onDurationChanged.subscribe { duration = it }
|
||||
eventHandler.onVolumeChanged.subscribe { volume = it }
|
||||
eventHandler.onSpeedChanged.subscribe { speed = it }
|
||||
}
|
||||
|
||||
override fun ensureThreadStarted() {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue