Skip to content
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

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

POC Compose Desktop #32

wants to merge 14 commits into from

Conversation

timrijckaert
Copy link
Owner

@timrijckaert timrijckaert commented Feb 20, 2022

)

// delay(status.media.duration.seconds)
delay(5.seconds)
Copy link
Owner Author

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?

Copy link
Collaborator

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" }
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥲

Copy link
Collaborator

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()))
Copy link
Owner Author

@timrijckaert timrijckaert Feb 21, 2022

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?

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants