Skip to content

Add ImageOutput support to Playerview #1144

Closed

Description

@pawaom

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,

Activity

  1. icbaker commented on Mar 5, 2024

    @icbaker
    Collaborator

    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.

  2. changed the title [-]Image is not rendered in Exoplayer Playerview[/-] [+]Add ImageOutput support to Playerview[/+] on Mar 25, 2024
  3. tonihei commented on Oct 10, 2024

    @tonihei
    Collaborator

    This has been implemented and published in 1.4.0

  4. chileanne commented on Nov 7, 2024

    @chileanne

    please can you indicate an example of the fix @tonihei

  5. tonihei commented on Nov 7, 2024

    @tonihei
    Collaborator

    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

  6. locked and limited conversation to collaborators on Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions