MediaRouteButtonViewProvider


@UnstableApi
public final class MediaRouteButtonViewProvider implements ViewProvider


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

Summary

Public constructors

Public methods

ListenableFuture<View>
getView(ViewGroup viewGroup)

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

Public constructors

MediaRouteButtonViewProvider

public MediaRouteButtonViewProvider()

Public methods

getView

public ListenableFuture<ViewgetView(ViewGroup viewGroup)

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.