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

Display a placeholder(preview) before buffering #8761

Closed
maiconhellmann opened this issue Mar 26, 2021 · 2 comments
Closed

Display a placeholder(preview) before buffering #8761

maiconhellmann opened this issue Mar 26, 2021 · 2 comments
Assignees

Comments

@maiconhellmann
Copy link

I need to show a video placeholder without start buffering when using mobile data network.
I came up with a workaround that sets the buffer size of LoadControl to 1000ms and some visual components to set it back to its default value afterwards.

Is there a better way to achieve this?

Last releases the API has changed a bit with lots of deprecations.
In my opinion, the documentation is not very clear on how to use all those factories to achieve specific results although individually the java docs are quite detailed.

@lcf87
Copy link

lcf87 commented Mar 29, 2021

Please take a look at #2874. What you did makes sense to me.

As for the doc, I agree we lack some clarity on the higher level ones, may I ask which one is it that you find hard to follow?

@lcf87 lcf87 self-assigned this Mar 29, 2021
@ojw28
Copy link
Contributor

ojw28 commented Sep 6, 2021

If you control the serving side, then this would normally be done by extracting thumbnails on the serving side (e.g., when the video is uploaded or ingested) and then serving them as regular images (rather than videos).

If you don't control the serving side, then I think #3609 is tracking fixing this properly. Depending on what kind of media you're playing, you may also find https://developer.android.com/reference/android/media/MediaMetadataRetriever useful.

Closing as a duplicate of #3609.

@ojw28 ojw28 closed this as completed Sep 6, 2021
@ojw28 ojw28 added duplicate and removed question labels Sep 6, 2021
@google google locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants