Hacky Fix for Google’s Own Media Player (TalkSPORT & Times Radio — Android)
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.
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:
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