闪光流式麦克风(不带摄像头)



如果我想让它不使用网络摄像头,只使用麦克风,我如何修改这个代码?

我想如果它运行不打开相机。

谢谢,

private function InitCameraAndMicrophone():void {               
m_Microphone = Microphone.getEnhancedMicrophone(this.cameraSettingsDialog.dropDownListMicrophones.selectedIndex);
var options:MicrophoneEnhancedOptions = new MicrophoneEnhancedOptions();
options.mode = MicrophoneEnhancedMode.FULL_DUPLEX;
options.autoGain = true;
options.nonLinearProcessing = true;
m_Microphone.enhancedOptions = options;
m_Microphone.codec = "Speex";
m_Microphone.encodeQuality = 10; 
m_Microphone.setUseEchoSuppression(true);
memberCamera = Camera.getCamera(this.cameraSettingsDialog.dropDownListCameras.selectedIndex.toString());    
if (memberCamera == null) 
{
    var informationTitle:String = localizatonProvider.localize('flash_information');
    var alertMessage:String = localizatonProvider.localize('flash_connect_your_camera');
    CommonHelper.javascriptFunctionCallWrap("jAlert", alertMessage + ';' + informationTitle);
    return;
}
memberCamera.setMode(this.cameraSettingsDialog.selectedResolution.x, this.cameraSettingsDialog.selectedResolution.y, 15);
memberCamera.setQuality(0, 90);
memberCamera.setKeyFrameInterval(100); */
memberVideo = new Video(405, 305);
memberVideo.attachCamera(this.memberCamera);
this.stateWhenStartedCamToCam = this.currentState;
if(userAllowedCameraAccess)
{
    ConnectCamToCam();
}
memberCamera.addEventListener(StatusEvent.STATUS, memberCameraStatusHandler);

}

private  function  InitCameraAndMicrophone():void  {                
    m_Microphone = Microphone.getEnhancedMicrophone(this.cameraSettingsDialog.dropDownListMicrophones.selectedIndex ); 
    var options:MicrophoneEnhancedOptions  =  new  MicrophoneEnhancedOptions(); 
    options.mode = MicrophoneEnhancedMode.FULL_DUPLEX ; 
    options.autoGain = true; 
    options.nonLinearProcessing =  true; 
    m_Microphone.enhancedOptions = options; 
    m_Microphone.codec =  "Speex";
    m_Microphone.encodeQuality =  10;
    m_Microphone.setUseEchoSuppression(true);
    selectedIndex.toString();    
    var informationTitle:String  = localizatonProvider.localize( 'flash_information' ); 
    var alertMessage:String  = localizatonProvider.localize( 'flash_connect_your_camera' ); 
    CommonHelper.javascriptFunctionCallWrap ( "jAlert" , alertMessage +  ';'  + informationTitle ); 
}

相关内容

  • 没有找到相关文章

最新更新