public interface MediaReceivers extends Observable<MediaReceiversEvent>, ProfileService
MediaReceiverDiscovered
Modifier and Type | Method and Description |
---|---|
MediaReceiver |
await(java.util.function.Predicate<MediaReceiver> predicate)
Blocks the current thread until the first receiver matching the
predicate is
discovered. |
MediaReceiver |
await(java.util.function.Predicate<MediaReceiver> predicate,
java.time.Duration timeout)
Blocks the current thread until the first receiver matching the
predicate is
discovered. |
java.util.List<MediaReceiver> |
list()
Returns the list of connected (not unavailable)
media receivers.
|
on
profile
java.util.List<MediaReceiver> list()
The initial list of media receivers can be empty or not full. This is because receivers are discovered asynchronously in Chromium.
ObjectClosedException
- when the profile is deleted or its engine is closedMediaReceiver await(java.util.function.Predicate<MediaReceiver> predicate)
predicate
is
discovered.
If a matching receiver has already been discovered, returns it immediately.
predicate
ObjectClosedException
- when the profile is deleted or its engine is closedReceiverNotDiscoveredException
- when the receiver has not been discovered within 45 secondsMediaReceiver await(java.util.function.Predicate<MediaReceiver> predicate, java.time.Duration timeout)
predicate
is
discovered.
If a matching receiver has already been discovered, returns it immediately.
predicate
ObjectClosedException
- when the profile is deleted or its engine is closedReceiverNotDiscoveredException
- when the receiver has not been discovered within timeout