Giter Club home page Giter Club logo

compose-video-playback's People

Contributors

skyyo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

compose-video-playback's Issues

`remember {..}` calculation block in `VideoPlayer.kt` is called multiple times for the same video

Steps to reproduce:

  • Add a breakpoint at the following place in VideoPlayer.kt`:
val playerView = remember {
    /*** breakpoint here **/ val layout = LayoutInflater.from(context).inflate(R.layout.video_player, null, false)
    // [..] other code
}
  • Start the first video
  • Debugger stops at the added breakpoint
  • Resume the debugger
  • Stop the first video
  • Start the first video
  • Debugger stops again

I assume that it is not intended that the expensive inflate() inside of remember {} is called more than once for one video?

PS right now I have the same problem and I am looking for a solution. I discovered your slides at https://www.droidcon.com/2021/11/25/video-playback-in-lazycolumn-in-jetpack-compose/ and thought that your approach could be the solution :)

Question about Compose Video Player...

I am trying to implement the method you describe in your article and in this repository but have a question. Why does the video take a second to play? Even in your project when you scroll to the nest video it takes a second to play even if the sources is a has file.

Can you explain why the delay?

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.