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

When setMediaItems is called playerCommandsFromPlayer does not include commands included via getAvailableCommands of ForwardingPlayer #1021

@aljohnston112

Description

@aljohnston112

Version

Media3 1.2.1

More version details

No response

Devices that reproduce the issue

Samsung Galaxy A12 SM-A125U

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Not tested

Reproduction steps

Create a ForwardingPlayer like so

class MyPlayer(
    private var context: Context,
) : ForwardingPlayer(
    ExoPlayer.Builder(context)
        .setSkipSilenceEnabled(true)
        .setSeekParameters(SeekParameters.EXACT)
        .build()
) {

    override fun seekToNextMediaItem() {
        // custom behavior
    }

}

Create a MediaLibrarySession like so

        mediaSession = MediaLibraryService.MediaLibrarySession.Builder(
            service,
            player,
            callback
        ).build()

Create a MediaBrowser like so:

            browser = MediaBrowser.Builder(applicationContext, sessionToken)
                .buildAsync()
                .await()

Then call MediaBrowser.seekToNextMediaItem()

browser.seekToNextMediaItem()

and notice that ForwardingPlayer.seekToNextMediaItem() is not called.

Expected result

For the ForwardingPlayer to get the seekToNextMediaItem() call.

Actual result

The seekToNextMediaItem() method of the ForwardingPlayer is not called.

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