Package com.oorian.html.js.mediadevices
Class MediaDevicesErrorEvent
java.lang.Object
com.oorian.messaging.events.Event<MediaDevicesListener>
com.oorian.messaging.events.client.ClientEvent<MediaDevicesListener>
com.oorian.html.js.mediadevices.MediaDevicesErrorEvent
Event fired when a media devices operation fails.
- Author:
- Marvin P. Warble Jr.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMediaDevicesErrorEvent(String message, String errorType) Constructs a MediaDevicesErrorEvent. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispatchTo(MediaDevicesListener listener) Dispatches this event to the specified listener.Returns the error type.Returns the error message.booleanReturns whether no devices were found.booleanReturns whether permission was denied by the user.toString()Methods inherited from class com.oorian.messaging.events.client.ClientEvent
getSource, getTarget, setSource, setTarget
-
Constructor Details
-
MediaDevicesErrorEvent
Constructs a MediaDevicesErrorEvent.- Parameters:
message- The error message.errorType- The type of error.
-
-
Method Details
-
getMessage
Returns the error message.- Returns:
- The error message.
-
getErrorType
Returns the error type.Common error types:
- NotAllowedError: Permission was denied
- NotFoundError: No devices found
- NotReadableError: Device is in use by another application
- OverconstrainedError: Constraints cannot be satisfied
- SecurityError: Security restriction
- Returns:
- The error type.
-
isPermissionDenied
public boolean isPermissionDenied()Returns whether permission was denied by the user.- Returns:
- True if permission was denied.
-
isNotFound
public boolean isNotFound()Returns whether no devices were found.- Returns:
- True if no devices were found.
-
dispatchTo
Description copied from class:EventDispatches this event to the specified listener.Subclasses implement this method to call the appropriate handler method on the listener interface.
- Specified by:
dispatchToin classEvent<MediaDevicesListener>- Parameters:
listener- the listener to dispatch this event to
-
toString
-