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

Add ImageOutput support to Playerview #1144

Closed
pawaom opened this issue Mar 1, 2024 · 4 comments
Closed

Add ImageOutput support to Playerview #1144

pawaom opened this issue Mar 1, 2024 · 4 comments

Comments

@pawaom
Copy link

pawaom commented Mar 1, 2024

Image is not rendered in Exoplayer Playerview

I want to display image as video

I have referred this

I am trying this code

val playlist: MutableList<MediaItem> = mutableListOf<MediaItem>()
val mediaItem =   MediaItem.Builder().setImageDurationMs(30000).setUri("content://media/external/images/media/1000005827").build()  playlist.add(mediaItem)
player = ExoPlayer.Builder(this).build()
       playerView = findViewById(R.id.player_view)
       player.addMediaItems(playlist)
       playerView.player = player
       player.prepare()
player.play()

this creates a blank video with the duration 30000 but nothing is rendered , I have tried multiple images but nothing is rendered,

@icbaker
Copy link
Collaborator

icbaker commented Mar 5, 2024

I think this is expected, because images are emitted via ImageOutput and PlayerView does not implement this interface.


I will mark this as an enhancement, but we currently have no plans to work on this.

@tonihei
Copy link
Collaborator

tonihei commented Oct 10, 2024

This has been implemented and published in 1.4.0

@tonihei tonihei closed this as completed Oct 10, 2024
@chileanne
Copy link

please can you indicate an example of the fix @tonihei

@tonihei
Copy link
Collaborator

tonihei commented Nov 7, 2024

The image support is documented here: https://developer.android.com/media/media3/exoplayer/images PlayerView automatically display images played with ExoPlayer without any special configuration needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants