public interface MediaReceiver extends Observable<MediaReceiverDisconnected>
Usually, a media receiver is a device that supports the ChromeCast technology but in Chromium's logic it can be even a wired display (HDMI, DVI, or similar).
Modifier and Type | Method and Description |
---|---|
java.lang.String |
description()
Returns the description of the receiver or an empty string if no description provided.
|
java.lang.String |
domain()
Returns the domain of the receiver or an empty string if the domain is not set.
|
java.util.List<CastMode> |
modes()
Returns the list of compatible cast modes for the receiver.
|
java.lang.String |
name()
Returns the name of the receiver.
|
Profile |
profile()
Returns profile whose media router discovered the receiver.
|
MediaReceiverState |
state()
Returns the current state of the receiver.
|
boolean |
supports(CastMode mode)
A convenience method that returns
true if the receiver supports the mode . |
on
java.lang.String name()
MediaReceiverState state()
ObjectClosedException
- when the profile is deleted or its engine is closedjava.util.List<CastMode> modes()
If the list is empty then the receiver is already unavailable.
These cast modes must be checked when starting casting media content. Otherwise, if the
cast mode is unsupported the CastSessionStartFailed
event is invoked.
ObjectClosedException
- when the profile is deleted or its engine is closedjava.lang.String description()
ObjectClosedException
- when the profile is deleted or its engine is closedjava.lang.String domain()
ObjectClosedException
- when the profile is deleted or its engine is closedboolean supports(CastMode mode)
true
if the receiver supports the mode
.
An equivalent to:
boolean isSupported = receiver.modes().contains(mode);
Profile profile()