Example usage for com.google.gwt.tok.client Microphone getStatus

List of usage examples for com.google.gwt.tok.client Microphone getStatus

Introduction

In this page you can find the example usage for com.google.gwt.tok.client Microphone getStatus.

Prototype

public native String getStatus() ;

Source Link

Document

The status of the client device : either Status#ACTIVE , Status#INACTIVE , or Status#UNKNOWN .

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   www  .j  a  v a 2s . 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() + ")");
}