android - Video Previewing in CWAC-CAMERA -
in cwac-camera document written "from ui standpoint, camerafragment solely handles preview pane.".but videos don't see preview avalaible after capture video.do cwac-camera library has inbuilt video previewing?below code using.
f = new camerafragment(); getfragmentmanager().begintransaction() .add(r.id.preview_view, f, tag_camera_fragment) .commit(); builder=new simplecamerahost.builder(new democamerahost(getapplicationcontext())); switchtovideoopen.setonclicklistener(new view.onclicklistener() { @override public void onclick(view view) { if (!isvideoopen) { isvideoopen = true; takevideo(); } else{ isvideoopen = false; stopvideo(); } } }); private void takevideo() { camerafragment f = (camerafragment) getfragmentmanager().findfragmentbytag(tag_camera_fragment); if (f != null && f.isvisible()) { try { f.record(); } catch (exception e) { } } } private void stopvideo() { camerafragment f = (camerafragment) getfragmentmanager().findfragmentbytag(tag_camera_fragment); if (f != null && f.isvisible()) { try { f.stoprecording(); } catch (exception e) { } } }
previews user sees while lining photo or video captured.
but videos don't see preview avalaible after capture video
you can call whatever want, not calling "preview". cwac-camera not display photos or videos after taken. if want that, need yourself.
Comments
Post a Comment