public class CameraCaptureEvent extends com.google.gwt.event.shared.GwtEvent<CameraCaptureHandler>
Event that holds informartion about the state of a HasCameraCaptureHandlers
, such
as MaterialCameraCapture
.
When the stream has started, after the user allows the browser to use the camera, an event
with CameraCaptureEvent.CaptureStatus.STARTED
is raised. If the stream is paused, an event with
CameraCaptureEvent.CaptureStatus.PAUSED
is raised. If the user doesn't allow the browser to use the camera,
or if any other error occurs, an event with CameraCaptureEvent.CaptureStatus.ERRORED
is raised, with the
getErrorMessage()
set.
Modifier and Type | Class and Description |
---|---|
static class |
CameraCaptureEvent.CaptureStatus |
Modifier and Type | Method and Description |
---|---|
protected void |
dispatch(CameraCaptureHandler handler) |
static <T> void |
fire(HasCameraCaptureHandlers source,
CameraCaptureEvent.CaptureStatus status)
Fires an event with the
CameraCaptureEvent.CaptureStatus . |
static <T> void |
fire(HasCameraCaptureHandlers source,
String errorMessage)
Fires an event with the
CameraCaptureEvent.CaptureStatus.ERRORED status and the error message. |
com.google.gwt.event.shared.GwtEvent.Type<CameraCaptureHandler> |
getAssociatedType() |
CameraCaptureEvent.CaptureStatus |
getCaptureStatus()
Returns the
CameraCaptureEvent.CaptureStatus that raised this event. |
String |
getErrorMessage()
Returns the error message when the
getCaptureStatus() is CameraCaptureEvent.CaptureStatus.ERRORED . |
static com.google.gwt.event.shared.GwtEvent.Type<CameraCaptureHandler> |
getType() |
assertLive, getSource, isLive, kill, revive
public static <T> void fire(HasCameraCaptureHandlers source, CameraCaptureEvent.CaptureStatus status)
CameraCaptureEvent.CaptureStatus
.public static <T> void fire(HasCameraCaptureHandlers source, String errorMessage)
CameraCaptureEvent.CaptureStatus.ERRORED
status and the error message.public CameraCaptureEvent.CaptureStatus getCaptureStatus()
CameraCaptureEvent.CaptureStatus
that raised this event.public String getErrorMessage()
getCaptureStatus()
is CameraCaptureEvent.CaptureStatus.ERRORED
.public com.google.gwt.event.shared.GwtEvent.Type<CameraCaptureHandler> getAssociatedType()
getAssociatedType
in class com.google.gwt.event.shared.GwtEvent<CameraCaptureHandler>
public static com.google.gwt.event.shared.GwtEvent.Type<CameraCaptureHandler> getType()
protected void dispatch(CameraCaptureHandler handler)
dispatch
in class com.google.gwt.event.shared.GwtEvent<CameraCaptureHandler>
Copyright © 2018. All rights reserved.