     public function setCamera (camera :Camera) :void
     {
         if (_video != null) {
-            if (_bitmap.parent != null) {
+            if (_bitmap != null && _bitmap.parent != null) {
                 removeChild(_bitmap);
             }
             if (_video.parent != null) {

            detachVideo();
        }

        _camera = camera;
        if (_camera == null) {
            return;
        }

        attachVideo();
    }

    public function getCameraName () :String

    public function setMode (width :int, height :int, fps :Number, favorArea :Boolean = true) :void
    {
        clearSnapshot();
        if (_video != null) {
            removeChild(_video);
        }

        detachVideo();
        _camera.setMode(width, height, fps, favorArea);
