android-components /



Name Summary
findPlayingSession fun MediaState.findPlayingSession(): Pair<String, List<Element>>?
Find a SessionState with playing Media and return this Pair or null if no such SessionState could be found.
getActiveElements fun MediaState.getActiveElements(): List<Element>
Returns the list of active MediaState.Elements.
getActiveMediaTab fun BrowserState.getActiveMediaTab(): SessionState?
Get the SessionState that caused this MediaState (if any).
getPausedMedia fun MediaState.getPausedMedia(tabId: String?): List<Element>
Get the list of paused Media for the tab with the provided tabId.
getPlayingMediaIdsForTab fun MediaState.getPlayingMediaIdsForTab(tabId: String?): List<String>
Returns a list of of playing media on the tab with the given tabId.
pauseIfPlaying fun MediaState.pauseIfPlaying(): Unit
If this state is MediaState.State.PLAYING then pause all playing Media.
playIfPaused fun MediaState.playIfPaused(): Unit
If this state is MediaState.State.PAUSED then resume playing all paused Media.
playing fun MediaState.playing(): Boolean
If this state is MediaState.State.PLAYING then return true, else return false.