List of usage examples for com.google.gwt.dom.client VideoElement play
public final native void play() ;
From source file:gwt.material.design.addins.client.ui.MaterialCameraCapture.java
License:Apache License
/** * <p>// w w w . ja va 2 s . co m * Starts the video stream from the camera. This is called when the component is loaded. * Use {@link CameraCaptureHandler}s to be notified when the stream actually starts or if * an error occurs. * </p> * <p> * At this point the user is requested by the browser to allow the application to use the camera. * If the user doesn't allow it, an error is notified to the {@link CameraCaptureHandler}s. * </p> */ public void play() { if (!isSupported()) { onCameraCaptureError("MaterialCameraCapture is not supported in this browser."); return; } VideoElement el = getElement().cast(); if (el.getSrc() == null) { nativePlay(getElement()); } else { el.play(); } }