Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Black video if playing started on hidden view. #2479

Closed
tprochazka opened this issue Feb 20, 2017 · 3 comments
Closed

Black video if playing started on hidden view. #2479

tprochazka opened this issue Feb 20, 2017 · 3 comments
Labels

Comments

@tprochazka
Copy link

In version 2.0.2 I was SimpleExoPlayerView with visibility = GONE.
And when I reach the ExoPlayer.STATE_READY I changed visibility to VISIBLE.
But after update to 2.2.0 video remain still black after change to VISIBLE, just audio was working.
If I will keep SimpleExoPlayerView visible for whole time it is working correctly.
I don't know if it is bug or feature.

@khacpv
Copy link

khacpv commented Mar 6, 2017

My workaround is set alpha to 0 or 1 instead of set GONE/VISIBLE.

@gajendrakumartwinwal
Copy link

gajendrakumartwinwal commented Mar 15, 2017

Getting same issue while removing the exoplayer surfaceview and and adding it to another viewgroup:(

@ojw28
Copy link
Contributor

ojw28 commented May 24, 2017

The ability to switch surface is difficult due to underlying platform constraints, as discussed in #677. Making a parent view invisible/gone or detaching it from the view hierarchy will normally cause the surface to be destroyed. A new surface will be created when the view is made visible or reattached to the hierarchy. Hence the use cases described here do result in surface switches and so run into the same underlying constraints.

There's a class called DummySurface that we recently added to mitigate this behavior. You currently need to wire it up manually, however. Follow #677 for more details.

@ojw28 ojw28 closed this as completed May 24, 2017
@ojw28 ojw28 added the question label May 24, 2017
@google google locked and limited conversation to collaborators Sep 22, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants