-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
POC Compose Desktop #32
base: main
Are you sure you want to change the base?
Conversation
timrijckaert
commented
Feb 20, 2022
•
edited
Loading
edited
- Show list of Programs
- Add Decompose
Disable for now since it is jumping all over the place
Disable for now since it is jumping all over the place
) | ||
|
||
// delay(status.media.duration.seconds) | ||
delay(5.seconds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a POC but why do we need the delay
?
Was it exiting too quickly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, otherwise it exists immediately. load
just sends a command to the Chromecast
and immediately returns similar to sending a POST
.
mockk = "io.mockk:mockk:v1.10.2" | ||
|
||
kotlin-gradle = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } | ||
|
||
chromecast = { module = "su.litvak.chromecast:api-v2", version.ref="chromecast" } | ||
jackson-annotations = { module ="com.fasterxml.jackson.core:jackson-annotations", version.ref="jackson" } | ||
jackson-databind = { module ="com.fasterxml.jackson.core:jackson-databind", version.ref="jackson" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥲
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason we had to manually include jackson
, it wasn't being pulled from the Chromecast dependency.
public suspend fun example() { | ||
val cast = discovery( | ||
// Ip-address of MacOs WiFi Adapter. | ||
InetAddress.getByAddress(byteArrayOf(192.toByte(), 168.toByte(), 0, 246.toByte())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for the POC, but a follow-up question can this be discovered dynamically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, absolutely. Still have to write a piece of code that uses NetworkInterfaces
and retrieves the currently active ethernet adapter.