MediaRouteButtonViewProvider


@UnstableApi
class MediaRouteButtonViewProvider : ViewProvider


A provider of a media route button view to be displayed in the player UI.

Summary

Public constructors

Public functions

ListenableFuture<View!>!
getView(viewGroup: ViewGroup!)

Returns a ListenableFuture with the view of a media route button.

Public constructors

MediaRouteButtonViewProvider

MediaRouteButtonViewProvider()

Public functions

getView

fun getView(viewGroup: ViewGroup!): ListenableFuture<View!>!

Returns a ListenableFuture with the view of a media route button.

If a media route button cannot be provided, the future may fail with an exception. Consumers should handle the failure gracefully, for example by not showing the media route button.

Clicking on the media route button opens a dialog that allows the user to select a remote device for transferring media.

Parameters
viewGroup: ViewGroup!

The parent ViewGroup into which the returned view will be inserted.

Returns
ListenableFuture<View!>!

A ListenableFuture that will resolve to the media route button View.