1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-06-24 21:25:23 +00:00

Implemented main window with QR code for desktop receiver.

This commit is contained in:
Koen 2023-12-06 13:03:23 +01:00
parent 85530ca218
commit cefe19e9ff
18 changed files with 501 additions and 35 deletions

View file

@ -81,6 +81,8 @@ class PlayerActivity : AppCompatActivity() {
} else if (playbackState == ExoPlayer.STATE_BUFFERING) {
setStatus(true, null)
}
//TODO: Send playback update
}
override fun onPlayerError(error: PlaybackException) {
@ -103,6 +105,8 @@ class PlayerActivity : AppCompatActivity() {
}
}
//TODO: Send error notification
setStatus(false, getFullExceptionMessage(error))
}
@ -110,7 +114,7 @@ class PlayerActivity : AppCompatActivity() {
super.onVolumeChanged(volume)
_scope.launch(Dispatchers.IO) {
try {
NetworkService.instance?.sendCastVolumeUpdate(VolumeUpdateMessage(volume.toDouble()))
NetworkService.instance?.sendCastVolumeUpdate(VolumeUpdateMessage(System.currentTimeMillis(), volume.toDouble()))
} catch (e: Throwable) {
Log.e(TAG, "Unhandled error sending volume update", e)
}