Class MediaDevicesErrorEvent


public class MediaDevicesErrorEvent extends ClientEvent<MediaDevicesListener>
Event fired when a media devices operation fails.
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • MediaDevicesErrorEvent

      public MediaDevicesErrorEvent(String message, String errorType)
      Constructs a MediaDevicesErrorEvent.
      Parameters:
      message - The error message.
      errorType - The type of error.
  • Method Details

    • getMessage

      public String getMessage()
      Returns the error message.
      Returns:
      The error message.
    • getErrorType

      public String 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

      public void dispatchTo(MediaDevicesListener listener)
      Description copied from class: Event
      Dispatches this event to the specified listener.

      Subclasses implement this method to call the appropriate handler method on the listener interface.

      Specified by:
      dispatchTo in class Event<MediaDevicesListener>
      Parameters:
      listener - the listener to dispatch this event to
    • toString

      public String toString()
      Overrides:
      toString in class Object