java.lang.Object | |
↳ | android.support.v7.media.MediaRouter.RouteInfo |
Provides information about a media route.
Each media route has a list of media control
intent filters
that describe the capabilities of the
route and the manner in which it is used and controlled.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | PLAYBACK_TYPE_LOCAL | The default playback type, "local", indicating the presentation of the media is happening on the same device (e.g. | |||||||||
int | PLAYBACK_TYPE_REMOTE | A playback type indicating the presentation of the media is happening on a different device (i.e. | |||||||||
int | PLAYBACK_VOLUME_FIXED | Playback information indicating the playback volume is fixed, i.e. | |||||||||
int | PLAYBACK_VOLUME_VARIABLE | Playback information indicating the playback volume is variable and can be controlled from this object. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Gets a list of
media control intent filters that
describe the capabilities of this route and the media control actions that
it supports. | |||||||||||
Gets the user-visible description of the route.
| |||||||||||
Gets a collection of extra properties about this route that were supplied
by its media route provider, or null if none.
| |||||||||||
Gets the unique id of the route.
| |||||||||||
Gets the user-visible name of the route.
| |||||||||||
Gets the audio stream over which the playback associated with this route is performed.
| |||||||||||
Gets the type of playback associated with this route.
| |||||||||||
Gets the
Display that should be used by the application to show
a Presentation on an external display when this route is selected. | |||||||||||
Gets information about the provider of this media route.
| |||||||||||
Gets the current volume for this route.
| |||||||||||
Gets information about how volume is handled on the route.
| |||||||||||
Gets the maximum volume at which the playback associated with this route is performed.
| |||||||||||
Returns true if the route is in the process of connecting and is not
yet ready for use.
| |||||||||||
Returns true if this route is the default route.
| |||||||||||
Returns true if this route is enabled and may be selected.
| |||||||||||
Returns true if this route is currently selected.
| |||||||||||
Returns true if the route supports at least one of the capabilities
described by a media route selector.
| |||||||||||
Requests a volume change for this route asynchronously.
| |||||||||||
Requests an incremental volume update for this route asynchronously.
| |||||||||||
Selects this media route.
| |||||||||||
Sends a
media control request to be performed
asynchronously by the route's destination. | |||||||||||
Returns true if the route supports the specified
media control category and action. | |||||||||||
Returns true if the route supports the specified
media control category. | |||||||||||
Returns true if the route supports the specified
media control request. | |||||||||||
Returns a string containing a concise, human-readable description of this
object.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
The default playback type, "local", indicating the presentation of the media is happening on the same device (e.g. a phone, a tablet) as where it is controlled from.
A playback type indicating the presentation of the media is happening on a different device (i.e. the remote device) than where it is controlled from.
Playback information indicating the playback volume is fixed, i.e. it cannot be controlled from this object. An example of fixed playback volume is a remote player, playing over HDMI where the user prefers to control the volume on the HDMI sink, rather than attenuate at the source.
Playback information indicating the playback volume is variable and can be controlled from this object.
Gets a list of media control intent
filters that
describe the capabilities of this route and the media control actions that
it supports.
Gets the user-visible description of the route.
The route description describes the kind of destination represented by the route. It may be a user-supplied string, a model number or brand of device.
Gets a collection of extra properties about this route that were supplied by its media route provider, or null if none.
Gets the unique id of the route.
The route unique id functions as a stable identifier by which the route is known. For example, an application can use this id as a token to remember the selected route across restarts or to communicate its identity to a service.
Gets the user-visible name of the route.
The route name identifies the destination represented by the route. It may be a user-supplied name, an alias, or device serial number.
Gets the audio stream over which the playback associated with this route is performed.
Gets the type of playback associated with this route.
PLAYBACK_TYPE_LOCAL
or PLAYBACK_TYPE_REMOTE
.
Gets the Display
that should be used by the application to show
a Presentation
on an external display when this route is selected.
Depending on the route, this may only be valid if the route is currently
selected.
The preferred presentation display may change independently of the route being selected or unselected. For example, the presentation display of the default system route may change when an external HDMI display is connected or disconnected even though the route itself has not changed.
This method may return null if there is no external display associated with the route or if the display is not ready to show UI yet.
The application should listen for changes to the presentation display
using the onRoutePresentationDisplayChanged(MediaRouter, MediaRouter.RouteInfo)
callback and
show or dismiss its Presentation
accordingly when the display
becomes available or is removed.
This method only makes sense for
live video
routes.
Gets information about the provider of this media route.
Gets the current volume for this route. Depending on the route, this may only be valid if the route is currently selected.
Gets information about how volume is handled on the route.
PLAYBACK_VOLUME_FIXED
or PLAYBACK_VOLUME_VARIABLE
.
Gets the maximum volume at which the playback associated with this route is performed.
Returns true if the route is in the process of connecting and is not yet ready for use.
Returns true if this route is the default route.
Returns true if this route is enabled and may be selected.
Returns true if this route is currently selected.
Returns true if the route supports at least one of the capabilities described by a media route selector.
selector | The selector that specifies the capabilities to check. |
---|
Requests a volume change for this route asynchronously.
This function may only be called on a selected route. It will have no effect if the route is currently unselected.
volume | The new volume value between 0 and getVolumeMax() .
|
---|
Requests an incremental volume update for this route asynchronously.
This function may only be called on a selected route. It will have no effect if the route is currently unselected.
delta | The delta to add to the current volume. |
---|
Selects this media route.
Sends a media control
request to be performed
asynchronously by the route's destination.
Media control requests are used to request the route to perform actions such as starting remote playback of a media item.
This function may only be called on a selected route. Control requests sent to unselected routes will fail.
intent | A media control intent . |
---|---|
callback | A MediaRouter.ControlRequestCallback to invoke with the result
of the request, or null if no result is required. |
Returns true if the route supports the specified
media control
category and action.
Media control actions describe specific requests that an application can ask a route to perform.
category | A media control category
such as CATEGORY_LIVE_AUDIO ,
CATEGORY_LIVE_VIDEO ,
CATEGORY_REMOTE_PLAYBACK , or a provider-defined
media control category. |
---|---|
action | A media control action
such as ACTION_PLAY . |
Returns true if the route supports the specified
media control
category.
Media control categories describe the capabilities of this route such as whether it supports live audio streaming or remote playback.
category | A media control category
such as CATEGORY_LIVE_AUDIO ,
CATEGORY_LIVE_VIDEO ,
CATEGORY_REMOTE_PLAYBACK , or a provider-defined
media control category. |
---|
Returns true if the route supports the specified
media control
request.
Media control requests are used to request the route to perform actions such as starting remote playback of a media item.
intent | A media control intent . |
---|
Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
getClass().getName() + '@' + Integer.toHexString(hashCode())
See Writing a useful
toString
method
if you intend implementing your own toString
method.