这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@kleiren

Description

@kleiren

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions