MediaRouteSelector.Builder


public final class MediaRouteSelector.Builder


Builder for media route selectors.

Summary

Public constructors

Creates an empty media route selector builder.

Creates a media route selector descriptor builder whose initial contents are copied from an existing selector.

Public methods

@NonNull MediaRouteSelector.Builder

Adds a list of media control categories to the builder.

@NonNull MediaRouteSelector.Builder

Adds a media control category to the builder.

@NonNull MediaRouteSelector.Builder

Adds the contents of an existing media route selector to the builder.

@NonNull MediaRouteSelector

Builds the media route selector.

Public constructors

Builder

Added in 1.1.0
public Builder()

Creates an empty media route selector builder.

Builder

Added in 1.1.0
public Builder(@NonNull MediaRouteSelector selector)

Creates a media route selector descriptor builder whose initial contents are copied from an existing selector.

Public methods

addControlCategories

Added in 1.1.0
public @NonNull MediaRouteSelector.Builder addControlCategories(@NonNull Collection<String> categories)

Adds a list of media control categories to the builder.

Parameters
@NonNull Collection<String> categories

The list categories to add to the set of desired capabilities, such as CATEGORY_LIVE_AUDIO.

Returns
@NonNull MediaRouteSelector.Builder

The builder instance for chaining.

addControlCategory

Added in 1.1.0
public @NonNull MediaRouteSelector.Builder addControlCategory(@NonNull String category)

Adds a media control category to the builder.

Parameters
@NonNull String category

The category to add to the set of desired capabilities, such as CATEGORY_LIVE_AUDIO.

Returns
@NonNull MediaRouteSelector.Builder

The builder instance for chaining.

addSelector

Added in 1.1.0
public @NonNull MediaRouteSelector.Builder addSelector(@NonNull MediaRouteSelector selector)

Adds the contents of an existing media route selector to the builder.

Parameters
@NonNull MediaRouteSelector selector

The media route selector whose contents are to be added.

Returns
@NonNull MediaRouteSelector.Builder

The builder instance for chaining.

build

Added in 1.1.0
public @NonNull MediaRouteSelector build()

Builds the media route selector.