|
Processing... Click Enable Camera and allow browser access, then take a snapshot.
Description & Source Code
The Camera component lets users take snapshots directly from their device camera. Calling 🔉This demo uses the browser Camera API. Camera access is only activated after you grant permission, and captured images remain in your browser unless you explicitly upload them. camera.zul
<zk> <vlayout> <camera id="camera" width="480px" previewRecord="true" audio="false" maxsize="-1" onSnapshotUpload="snapshotImage.setContent(event.getMedia())"/> <hlayout> <button label="Enable Camera" onClick="camera.requestCamera()"/> <button label="Snapshot" onClick="camera.snapshot()"/> </hlayout> <label value="Snapshot result:"/> <image id="snapshotImage" style="max-width: 480px;"/> </vlayout> </zk>
Copyright © 2005-2026 Potix Corporation All rights reserved.
|
|
Processing... |