androidx / androidx/media

Hide disabled seekbar and position display in Android Auto for live streams

Open
#376 7 comments 1 reaction 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since May 3, 2023.

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

Description

I apologise if this project is not the right place to ask this, but I figured i'd give it a shot.

My app plays streams of internet radio stations and my MediaItems are very concise:

MediaItem.Builder()
        .setMediaId(id)
        .setUri(url.toUri())
        .setMediaMetadata(
            MediaMetadata.Builder()
                .setMediaType(MediaMetadata.MEDIA_TYPE_RADIO_STATION)
                .setArtist(title)
                .setArtworkUri(imageUrl.toUri())
                .setIsPlayable(true)
                .setIsBrowsable(false)
                .build()
        )
        .build()

They all play fine and the media session notifications only show the title of the radio station, the dynamic track as updated through the stream and play, pause, previous and next actions.

But when I expose my content to Android Auto on the head unit there is also a duration timer and an empty seekbar visible:

image

Both are not needed since it is a live stream, but I cant seem to figure out how to remove those elements from the UI. I tried disabling all seek commands from the session via MediaLibrarySession.setAvailableCommands() but to no avail.

Care to point me in the right direction? Thanks in advance.

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.