VideoPlayerManager icon indicating copy to clipboard operation
VideoPlayerManager copied to clipboard

RuntimeException: cannot be in main thread

Open rusmichal opened this issue 9 years ago • 2 comments

Hello

I tried you library. it is nice. But I am implementing video player for webM/vp8 formats and I have to seekbar update about current state of movie. I want to use VideoPlayerView:setOnVideoStateChangedListener and receved error: "cannot be in main thread" Why did you check mainThread?

rusmichal avatar Feb 08 '16 14:02 rusmichal

We cannot call methods from MediaPlayer in main thread because they are directly calling the hardware.

I have written about it in the article. Please find more detailed explanation here: https://medium.com/@v.danylo/implementing-video-playback-in-a-scrolled-list-listview-recyclerview-d04bc2148429#.fq29bo818

danylovolokh avatar Feb 12 '16 22:02 danylovolokh

thx

rusmichal avatar Feb 16 '16 22:02 rusmichal