eneim / toro

Video list auto playback made simple, specially built for RecyclerView
Apache License 2.0
1.42k stars 253 forks source link

Any budy fixed black screen issue?? #429

Open mahesha2 opened 5 years ago

mahesha2 commented 5 years ago

Any budy fixed black screen issue before playing video?? please help

eneim commented 5 years ago

@mahesha2 If your Video is from the Internet, it requires some time to load and prepare. How long does the black screen appear?

mahesha2 commented 5 years ago

4 to 5 seconds and how to play video more fast.

anubhavmalik commented 5 years ago

I have the same problem. I am covering it up with a thumbnail thought but still the black screen is quite noticeable. Happens right before video starts playing. I am caching videos beforehand so the black screen is not displayed for 3 - 4 seconds but for a shorter duration

anubhavmalik commented 5 years ago

Hey hey hey!

I just fixed the issue. But still I wonder why the library's play method caused this issue for me in the first place.

Screenshot 2019-06-21 at 5 01 02 PM

anubhavmalik commented 5 years ago

@mahesha2 .. You can try to solve this problem just the way I did, see the code snippet. @eneim .. you can dig into this whenever you have some time :)

amazing library by the way, saved me a lot of time. Would really like to contribute too.

sharan-salian commented 5 years ago

In PlayerView You can do something like this, though there will be a shutter. app:shutter_background_color="@android:color/transparent"

faisalvv commented 4 years ago

private final Playable.EventListener listener = new Playable.DefaultEventListener() { @Override public void onPlayerStateChanged(boolean playWhenReady, int playbackState) { super.onPlayerStateChanged(playWhenReady, playbackState); Log.d("faisal",format(Locale.getDefault(), "STATE: %d・PWR: %s", playbackState, playWhenReady)); if (playbackState==3) { readyToPlay(playWhenReady); } //state.setText(format(Locale.getDefault(), "STATE: %d・PWR: %s", playbackState, playWhenReady)); } }; private void readyToPlay(boolean isReady){ Log.d("faisal","video is play"); videoCover.setVisibility(isReady?View.GONE:View.VISIBLE); progressBar.setVisibility(isReady?View.GONE:View.VISIBLE); }