Live Photo inline video player using JavaFX MediaPlayer
Add OpenJFX dependencies (javafx-media, javafx-swing, javafx-graphics, javafx-base 21.0.3 mac platform) to build.gradle.kts. LivePhotoPlayer.kt: embeds JavaFX MediaPlayer in a SwingPanel via JFXPanel Swing interop. Auto-plays, loops infinitely, muted. PhotoPreviewDialog: pulls MOV companion to temp file, shows still HEIC above and looping video below in a 16:9 panel. Falls back gracefully if JavaFX is not available (isJavaFxMediaAvailable() check).
This commit is contained in:
@@ -31,6 +31,15 @@ dependencies {
|
||||
implementation(libs.serialization.json)
|
||||
implementation(libs.slf4j.api)
|
||||
implementation(libs.logback.classic)
|
||||
|
||||
// JavaFX media for Live Photo video playback in preview dialog
|
||||
// Using OpenJFX which works with both Corretto and other JDK distributions
|
||||
val javafxVersion = "21.0.3"
|
||||
val javafxPlatform = "mac" // mac, mac-aarch64, win, linux
|
||||
implementation("org.openjfx:javafx-media:$javafxVersion:$javafxPlatform")
|
||||
implementation("org.openjfx:javafx-swing:$javafxVersion:$javafxPlatform")
|
||||
implementation("org.openjfx:javafx-graphics:$javafxVersion:$javafxPlatform")
|
||||
implementation("org.openjfx:javafx-base:$javafxVersion:$javafxPlatform")
|
||||
}
|
||||
|
||||
compose.desktop {
|
||||
|
||||
Reference in New Issue
Block a user