Example usage for com.google.gwt.tok.client.event DeviceStatusEvent getCameras

List of usage examples for com.google.gwt.tok.client.event DeviceStatusEvent getCameras

Introduction

In this page you can find the example usage for com.google.gwt.tok.client.event DeviceStatusEvent getCameras.

Prototype

public List<Camera> getCameras() 

Source Link

Document

A list of Camera objects corresponding to available cameras.

Usage

From source file:com.google.gwt.tok.test.client.model.TokModel.java

@Override
public void onDeviceStatus(DeviceStatusEvent event) {
    for (Camera camera : event.getCameras()) {
        this.log("Camera detected : " + camera.getName() + "(" + camera.getStatus() + ")");
    }/*from   w  ww.  ja v a  2 s . c  o m*/
    for (Microphone microphone : event.getMicrophones()) {
        this.log("Microphone detected : " + microphone.getName() + "(status:" + microphone.getStatus() + ")");
    }
    Camera selectedCamera = event.getSelectedCamera();
    Microphone selectedMicrophone = event.getSelectedMicrophone();
    this.log("Microphone selected : " + selectedMicrophone.getName() + "(status:"
            + selectedMicrophone.getStatus() + ")");
    this.log("Camera selected : " + selectedCamera.getName() + "(status:" + selectedCamera.getStatus() + ")");
}