PhotoCam

PhotoCam is an input component to take photos with the webcam and send them to the backend model. Note that PhotoCam is not supported on IE.

Source

<h:form>

    <h:panelGrid columns="3">
        <p:photoCam widgetVar="pc" listener="#{photoCamBean.oncapture}" update="photos"/>

        <p:commandButton type="button" value="Capture" onclick="PF('pc').capture()"/>

        <p:imageSwitch effect="zoom" id="photos">
            <ui:repeat value="#{photoCamBean.photos}" var="photo">
                <p:graphicImage value="/photocam/#{photo}.png" />
            </ui:repeat>
        </p:imageSwitch>
    </h:panelGrid>

</h:form>