recheck preview size on toggling photo/video mode
This commit is contained in:
parent
4a13d766f0
commit
be0f949b19
|
@ -477,6 +477,7 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||||
cleanupRecorder()
|
cleanupRecorder()
|
||||||
mIsRecording = false
|
mIsRecording = false
|
||||||
mIsVideoMode = false
|
mIsVideoMode = false
|
||||||
|
refreshPreview()
|
||||||
}
|
}
|
||||||
|
|
||||||
// VIDEO RECORDING
|
// VIDEO RECORDING
|
||||||
|
@ -484,11 +485,8 @@ class Preview : ViewGroup, SurfaceHolder.Callback, MediaScannerConnection.OnScan
|
||||||
if (mCamera == null || mRecorder != null || !mIsSurfaceCreated)
|
if (mCamera == null || mRecorder != null || !mIsSurfaceCreated)
|
||||||
return false
|
return false
|
||||||
|
|
||||||
|
refreshPreview()
|
||||||
mSwitchToVideoAsap = false
|
mSwitchToVideoAsap = false
|
||||||
val preferred = mSupportedPreviewSizes!![0]
|
|
||||||
|
|
||||||
mParameters!!.setPreviewSize(preferred.width, preferred.height)
|
|
||||||
mCamera!!.parameters = mParameters
|
|
||||||
|
|
||||||
mIsRecording = false
|
mIsRecording = false
|
||||||
mIsVideoMode = true
|
mIsVideoMode = true
|
||||||
|
|
Loading…
Reference in New Issue