androidx / androidx/media

Image is skipped when mixing image and video media items in a exoplayer playlist

Open
#1,017 4 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Version

Media3 pre-release (alpha, beta or RC not in this list)

More version details

1.3.0-alpha01

Devices that reproduce the issue

OnePlus Nord running Android 11
Emulator running Android 14
Emulator running Android 10

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

In a default exoplayer with a simple ImageOutput set, setting a playlist with multiple media items:
e.g.:
mediaItems.add(imageMediaItemBuilder1.setImageDurationMs(3000).build()) //[Image1]
mediaItems.add(imageMediaItemBuilder2.setImageDurationMs(3000).build()) //[Image2]
mediaItems.add(videoMediaItem) //[Video]
videoPlayer.setMediaItems(mediaItems)
videoPlayer.playWhenReady = true
videoPlayer.prepare()

Expected result

Image 1 is shown 3000 ms, Image 2 is shown 3000 ms, Video is played in its entirety.

Actual result

The image right before the video is shown just a few milliseconds, transitioning directly to the video. That is, Image1 is shown 3000 ms, Image2 is shown a few ms, Video is played in its entirety.

For some reason, it seems having a video next in the playlist "overrides" the current image.

When the media items are only images it works as expected (all images are shown the set ms) and with only video it works as expected

Media

Not applicable

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.