Giter Site home page Giter Site logo

numq / jetpack-compose-desktop-media-player Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 198 KB

Jetpack Compose media player implementation techniques for desktop development

License: MIT License

Kotlin 100.00%
javafx jetpack-compose-desktop media-player vlcj kotlin audio-player jetpack-compose video-player

jetpack-compose-desktop-media-player's Introduction

About

This repository includes various media player implementation methods that can be useful if you want to add multimedia components to your Jetpack Compose project.

AWT component

The standard way to create a media player using the media player library component and container for the AWT component provided by Jetpack Compose SwingPanel.

Frame grabbing

Using a byte array of pixels as the key of the remember function will result in an exponential memory leak due to comparing by reference and creating a new key, which will result in an accumulation of unused values!

   remember(pixels) // don't do this!
   remember(pixels.contentHashCode()) // do this instead

A more flexible method that captures video frames as an array of bytes, converts to the required format, and then displays.

plugins {
    id("org.openjfx.javafxplugin") version "19"
}

javafx {
    version = "19"
    modules("javafx.media", "javafx.swing")
}
implementation("uk.co.caprica:vlcj:4.8.2")

jetpack-compose-desktop-media-player's People

Contributors

numq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

saaric

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.