[英]Disable microphone when recording a video
我試着:
audioManager.setMicrophoneMute(true);
audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 0, 0);
它沒有幫助! (請幫助找到解決方案)
mrec = new MediaRecorder();
mCamera.unlock();
mrec.setCamera(mCamera);
mrec.setVideoSource(MediaRecorder.VideoSource.CAMERA);
CamcorderProfile profile = CamcorderProfile.get(CamcorderProfile.QUALITY_480P);
mrec.setOutputFormat(profile.fileFormat);
mrec.setVideoFrameRate(profile.videoFrameRate);
mrec.setVideoSize(profile.videoFrameWidth, profile.videoFrameHeight);
mrec.setVideoEncodingBitRate(profile.videoBitRate);
mrec.setVideoEncoder(profile.videoCodec);
mrec.setPreviewDisplay(surfaceHolder.getSurface());
mrec.setOutputFile("/sdcard/sample.3gp");
mrec.prepare();
mrec.start();
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.