fyhertz / libstreaming

A solution for streaming H.264, H.263, AMR, AAC using RTP on Android
Apache License 2.0
3.49k stars 1.08k forks source link

Focus: How can we set focus on single touch #162

Open ghost opened 8 years ago

ghost commented 8 years ago

I found some unanswered issues in the issues list. #27 #49 I tried in this way, but nothing's happening. This is getting executed on single touch event in MainActivity.java class-

List supportedFocusModes = params.getSupportedFocusModes(); if (supportedFocusModes != null && supportedFocusModes.contains(Camera.Parameters.FOCUS_MODE_AUTO)) { VideoStream.mCamera.autoFocus(new Camera.AutoFocusCallback() { @Override public void onAutoFocus(boolean b, Camera camera) { // currently set to auto-focus on single touch

            }
        });
    }