Exemple #1
0
  private void updateRecordTip() {

    if (CallStateEnum.isAudioMode(callingState)) {
      avChatAudio.showRecordView(AVChatManager.getInstance().isRecording(), recordWarning);
    }
    if (CallStateEnum.isVideoMode(callingState)) {
      avChatVideo.showRecordView(AVChatManager.getInstance().isRecording(), recordWarning);
    }
  }
Exemple #2
0
 public void resetRecordTip() {
   uiHandler.removeCallbacks(runnable);
   recordWarning = false;
   if (CallStateEnum.isAudioMode(callingState)) {
     avChatAudio.showRecordView(AVChatManager.getInstance().isRecording(), recordWarning);
   }
   if (CallStateEnum.isVideoMode(callingState)) {
     avChatVideo.showRecordView(AVChatManager.getInstance().isRecording(), recordWarning);
   }
 }
Exemple #3
0
 /** 音频切换为视频 */
 public void onAudioToVideo() {
   onCallStateChange(CallStateEnum.VIDEO);
   avChatVideo.onAudioToVideo(
       AVChatManager.getInstance().isMute(),
       AVChatManager.getInstance().isRecording(),
       recordWarning); // isMute是否处于静音状态
   if (!AVChatManager.getInstance().isVideoSend()) { // 是否在发送视频 即摄像头是否开启
     AVChatManager.getInstance().toggleLocalVideo(true, null);
     avChatSurface.localVideoOn();
     isClosedCamera = false;
   }
 }
Exemple #4
0
 /**
  * 关闭本地音视频各项功能
  *
  * @param exitCode 音视频类型
  */
 public void closeSessions(int exitCode) {
   // not  user  hang up active  and warning tone is playing,so wait its end
   Log.i(TAG, "close session -> " + AVChatExitCode.getExitString(exitCode));
   if (avChatAudio != null) avChatAudio.closeSession(exitCode);
   if (avChatVideo != null) avChatVideo.closeSession(exitCode);
   uiHandler.removeCallbacks(runnable);
   showQuitToast(exitCode);
   isCallEstablish.set(false);
   canSwitchCamera = false;
   isClosedCamera = false;
   aVChatListener.uiExit();
 }
Exemple #5
0
 /**
  * 状态改变
  *
  * @param stateEnum
  */
 public void onCallStateChange(CallStateEnum stateEnum) {
   callingState = stateEnum;
   avChatSurface.onCallStateChange(stateEnum);
   avChatAudio.onCallStateChange(stateEnum);
   avChatVideo.onCallStateChange(stateEnum);
 }