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.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 closedboolean supports(CastMode mode)
true
if the receiver supports the mode
.
An equivalent to:
boolean isSupported = receiver.modes().contains(mode);
Profile profile()