Hacky Fix for Google’s Own Media Player (TalkSPORT & Times Radio — Android)

Darach Ronayne
News UK Technology
Published in
2 min readSep 4, 2020

While working on the new fullscreen player feature for the talkSPORT and Times Radio Android apps, we encountered a very annoying issue where the skip back and skip forward buttons on Google’s ExoPlayer UI element would not stay hidden for Live shows, after changing the visibility to ‘GONE’.

As seen below, the seek buttons are correctly shown for podcasts. They are a solid white colour to indicate they are enabled and clickable. When opening the player for a Live show, the buttons would be hidden for a moment then once again become visible all the while disabled/greyed out. It’s important for the seek buttons not to appear for live radios, because it’s pointless to have a button that does nothing.

Correct use of the seek buttons (LEFT), Seek buttons incorrectly shown for a Live Show (MIDDLE), Seek buttons correctly hidden for a Live Show (RIGHT)

Unable to find any sort of solution to this issue online, we implemented a suitable workaround where instead of hiding the buttons we applied an empty image to them when the content is a Live show. See below:

Provides an empty image url when Media Type is a Live Show

As the buttons are disabled and unclickable on Live shows, the button UI elements remaining on screen have no effect on the user when they click on them. This solution works well but is obviously not the way the ExoPlayer is intended to work for live streams.

This was our way around this problem, do you think we could have done something differently? Please let us know down below!

Darach Ronayne, Android Developer on the Wireless team

Seek buttons appearing and not appearing as they should

--

--