brianwernick / ExoMedia

An Android ExoPlayer wrapper to simplify Audio and Video implementations
Apache License 2.0
2.14k stars 380 forks source link

EMVideoView continue black or white seconds when activity resume #345

Open recwert opened 8 years ago

recwert commented 8 years ago

the EMVideoView show video right immediately

Actual Result

the EMVideoView continue black or white seconds(audio is normal), after seconds, the EMVideoView show video right

brianwernick commented 8 years ago

Even though I have marked this as a Bug, I'm not sure if there is much I can do because of the SurfaceView and TextureView surface functionality and how the ExoPlayer (and other VideoPlayers) interact with them. I'll see if there are any optimizations I can do to minimize the duration of the blank screen (this should just be the color of the activity or other views behind the EMVideoView bleeding through)

frel commented 7 years ago

Perhaps this is of interest https://github.com/google/ExoPlayer/issues/852

brianwernick commented 7 years ago

Hmm, interesting... For reference, the link ojw28 points to is now invalid (because of repo changes); the full versioned link is https://github.com/google/ExoPlayer/blob/6a5cd6889258df6b9a08b770e2bf351a5bb30e18/demo/src/main/java/com/google/android/exoplayer/demo/PlayerActivity.java#L193

brianwernick commented 7 years ago

I'm having a difficult time reproducing the issue in the current master branch on KitKat through Nougat. Are there other devices that you have noticed this with?

rohan31710 commented 7 years ago

I got the same issue. But why my last rendered frame is not visible after resuming the activity. You can observe this issue in all devices above 4.3. Even with demo app you will see the same issue.

brianwernick commented 7 years ago

You can observe this issue in all devices above 4.3. Even with demo app you will see the same issue.

Nope, I have 8 different devices I have tried this with that don't have the issue as I mentioned above. What I do see is the TextureView or SurfaceView being blank for a moment however no audio is played until I see video frames. If you can reproduce it I would appreciate if you would look in to the issue and find the culprit

If you are wondering why the last frame isn't still visible it is because of how the SurfaceView and TextureView handle data.

artworkad commented 7 years ago

@brianwernick I see exactly the issue you describe on my Nexus 4 5.1, ExoMedia 4.0.2

leimenghao commented 7 years ago

@brianwernick I get the same black-screen issue on my MI5, android 7.0

kaka2009 commented 7 years ago

how to solve it?@brianwernick

kaka2009 commented 7 years ago

how to solve it?@ArtworkAD

1242128273wangpeng commented 6 years ago

Is it still unsolved ? @brianwernick

RomanSytnyk commented 6 years ago

I have the same problem. Android 7.0, Samsung SM-T825. Audio starts before video (2-3 secs), blank screen and audio.

hamzaahmedkhan commented 4 years ago

Same problem

lmislm commented 2 years ago

use TextureView can solve this problem.

impeterwayne commented 1 year ago

can i set useTextureViewBacking programatically

Romie0606 commented 1 year ago

Is this issue still unsolved? please help.

vantangst commented 9 months ago

Is this issue still unsolved? please help.

check here: https://github.com/brianwernick/ExoMedia/issues/345#issuecomment-281441526