NIMSDK-AOS  10.6.0
AVChatManagerLite.java
浏览该文件的文档.
1 /*
2  * Copyright (c) 2014-2018 NetEase, Inc.
3  * All right reserved.
4  */
5 
6 package com.netease.nimlib.sdk.avchat;
7 
8 
9 import android.content.Context;
10 
11 import com.netease.nimlib.avchat.AVChatManagerImpl;
39 import com.netease.nrtc.video.render.IVideoRender;
40 
41 import java.util.List;
42 
43 
118 public abstract class AVChatManagerLite {
119 
127  public static AVChatManagerLite getInstance() {
128  return AVChatManagerImpl.InstanceHolder.instance;
129  }
130 
131 
141  public abstract boolean enableRtc();
142 
154  @Deprecated
155  public abstract boolean enableRtc(int osType);
156 
169  @Deprecated
170  public abstract boolean enableRtc(AVChatServerAddresses serverAddresses);
171 
185  @Deprecated
186  public abstract boolean enableRtc(int osType, boolean lowEnergy);
187 
188 
203  @Deprecated
204  public abstract boolean enableRtc(int osType, boolean lowEnergy, AVChatServerAddresses address);
205 
206 
219  public abstract boolean enableRtc(AVChatEngineConfig config);
220 
221 
231  public abstract boolean disableRtc();
232 
233 
246  public abstract boolean enableVideo();
247 
248 
258  public abstract boolean disableVideo();
259 
260 
291  public abstract void call2(String account,
292  AVChatType callType,
293  AVChatNotifyOption notifyOption,
294  AVChatCallback<AVChatData> callback);
295 
324  public abstract void accept2(long chatId, AVChatCallback<Void> callback);
325 
326 
349  public abstract void hangUp2(long chatId, AVChatCallback<Void> callback);
350 
351 
371  public abstract void createRoom(String roomName,
372  String extraMessage,
374 
375 
399  public abstract void createRoom(String roomName,
400  String extraMessage,
401  List<AVChatLiveTaskConfig> liveConfigList,
403 
404 
436  public abstract void joinRoom2(String roomName,
437  final AVChatType callType,
438  AVChatCallback<AVChatData> callback);
439 
458  public abstract void leaveRoom2(String roomName,
459  AVChatCallback<Void> callback);
460 
461 
479  public abstract void sendControlCommand(long chatId,
480  byte controlCommand,
481  AVChatCallback<Void> callback);
482 
483 
493  public abstract long getCurrentChatId();
494 
495 
501  public abstract Long getUidByAccount(String account);
502 
519  public abstract boolean setChannelProfile(int profile);
520 
521 
537  public abstract boolean setVideoQualityStrategy(int strategy);
538 
539 
557  public abstract boolean setupVideoCapturer(AVChatVideoCapturer videoCapturer);
558 
559 
568  public abstract boolean startVideoPreview();
569 
570 
578  public abstract boolean stopVideoPreview();
579 
580 
594  public abstract void setParameters(AVChatParameters params) throws IllegalArgumentException;
595 
611  public abstract <T> void setParameter(AVChatParameters.Key<T> key, T value) throws IllegalArgumentException;
612 
626  public abstract AVChatParameters getParameters(AVChatParameters params);
627 
642  public abstract <T> T getParameter(AVChatParameters.Key<T> key);
643 
644 
651  public abstract boolean isLocalAudioMuted();
652 
658  public abstract boolean isLocalVideoMuted();
659 
665  public abstract void muteLocalAudio(boolean muted);
666 
667 
674  @Deprecated
675  public abstract void muteLocalVideo(boolean muted);
676 
682  public abstract void setSpeaker(boolean enable);
683 
684 
690  public abstract boolean speakerEnabled();
691 
692 
698  public abstract void setMicrophoneMute(boolean mute);
699 
700 
706  public abstract boolean isMicrophoneMute();
707 
708 
715  public abstract void muteRemoteAudio(String account, boolean muted);
716 
722  public abstract void muteAllRemoteAudio(boolean muted);
723 
730  public abstract void selectAudioDevice(int audioDevice);
731 
739  @Deprecated
740  public abstract void muteRemoteVideo(String account, boolean muted);
741 
742 
749  public abstract boolean isRemoteAudioMuted(String account);
750 
756  public abstract boolean isAllRemoteAudioMuted();
757 
764  public abstract boolean isRemoteVideoMuted(String account);
765 
777  public abstract boolean setupLocalVideoRender(IVideoRender render, boolean mirror, int scalingType);
778 
790  public abstract boolean setupRemoteVideoRender(String account, IVideoRender render, boolean mirror, int scalingType);
791 
792 
808  public abstract void observeIncomingCall(Observer<AVChatData> observer, boolean register);
809 
817  public abstract void observeAVChatState(AVChatStateObserverLite observer, boolean register);
818 
825  public abstract void observeCalleeAckNotification(Observer<AVChatCalleeAckEvent> observer, boolean register);
826 
833  public abstract void observeOnlineAckNotification(Observer<AVChatOnlineAckEvent> observer, boolean register);
834 
841  public abstract void observeHangUpNotification(Observer<AVChatCommonEvent> observer, boolean register);
842 
843 
852  public abstract void observeControlNotification(Observer<AVChatControlEvent> observer, boolean register);
853 
860  public abstract void rate(int rate, String description);
861 
862 }
abstract void createRoom(String roomName, String extraMessage, AVChatCallback< AVChatChannelInfo > callback)
abstract void selectAudioDevice(int audioDevice)
设置音频输出设备 可选设备列表来自此回调 AVChatStateObserverLite#onAudioDeviceChanged ...
abstract boolean setupLocalVideoRender(IVideoRender render, boolean mirror, int scalingType)
设置本地用户视频画布。 如果需要预览,设置自己视频画面的画布需要在call或者joinRoom的onSuccess回调中调...
abstract boolean isLocalVideoMuted()
是否发送本地视频流数据.
abstract void setParameters(AVChatParameters params)
设置参数。 参数类型参考 AVChatParameters.Key#type()。 参数可设置时机参考 AVChatParameters.Key#runtime(),支持
abstract void muteAllRemoteAudio(boolean muted)
设置是否允许播放远端用户数据.
abstract void muteLocalAudio(boolean muted)
开/关本地音频.
abstract void muteRemoteVideo(String account, boolean muted)
设置是否允许播放远端用户数据.
abstract boolean setupRemoteVideoRender(String account, IVideoRender render, boolean mirror, int scalingType)
设置远端用户视频画布。 设置远端用户视频画面的画布需要在 AVChatStateObserver::onUserJoined 后调用...
abstract void observeHangUpNotification(Observer< AVChatCommonEvent > observer, boolean register)
注册/注销网络通话对方挂断的通知
abstract boolean setVideoQualityStrategy(int strategy)
abstract void observeControlNotification(Observer< AVChatControlEvent > observer, boolean register)
注册/注销网络通话控制消息(音视频模式切换通知)
abstract void rate(int rate, String description)
当前通话打分
abstract void setSpeaker(boolean enable)
是否使用扬声器
引擎初始化的一些自定义配置,使用Builder 去构造
abstract void sendControlCommand(long chatId, byte controlCommand, AVChatCallback< Void > callback)
abstract boolean setupVideoCapturer(AVChatVideoCapturer videoCapturer)
abstract void observeAVChatState(AVChatStateObserverLite observer, boolean register)
注册/注销网络通话状态通知 网络通话开始后,所有的通话状态通过 AVChatStateObserverLite 进行通知。 ...
abstract void muteRemoteAudio(String account, boolean muted)
设置是否允许播放远端用户数据.
abstract void observeCalleeAckNotification(Observer< AVChatCalleeAckEvent > observer, boolean register)
注册/注销网络通话被叫方的响应(接听、拒绝、忙)
abstract boolean isAllRemoteAudioMuted()
当前是否关闭用户语音数据播放.
abstract void observeOnlineAckNotification(Observer< AVChatOnlineAckEvent > observer, boolean register)
注册/注销同时在线的其他端对主叫方的响应
abstract void hangUp2(long chatId, AVChatCallback< Void > callback)
abstract void observeIncomingCall(Observer< AVChatData > observer, boolean register)
注册/注销网络来电.
abstract boolean isRemoteVideoMuted(String account)
当前是否关闭用户视频数据播放.
abstract boolean isLocalAudioMuted()
本地语音是否静音.
abstract void call2(String account, AVChatType callType, AVChatNotifyOption notifyOption, AVChatCallback< AVChatData > callback)
abstract boolean setChannelProfile(int profile)
abstract void muteLocalVideo(boolean muted)
开/关本地视频流的发送.
abstract void joinRoom2(String roomName, final AVChatType callType, AVChatCallback< AVChatData > callback)
abstract Long getUidByAccount(String account)
通过account 获取 uid
继承该类,实现自定义外部视频数据输入
abstract void leaveRoom2(String roomName, AVChatCallback< Void > callback)
abstract void accept2(long chatId, AVChatCallback< Void > callback)
网络通话控制命令(音视频开关及模式切换枚举)
abstract boolean isRemoteAudioMuted(String account)
当前是否关闭用户语音数据播放.
可选设置项, 可以获取参数是否支持可设置,以及参数是否能够在通话过程中进行操作
abstract< T > void setParameter(AVChatParameters.Key< T > key, T value)
设置参数。 参数类型参考 AVChatParameters.Key#type()。 参数可设置时机参考 AVChatParameters.Key#runtime(),支持
abstract< T > T getParameter(AVChatParameters.Key< T > key)
获取参数。 参数类型参考 AVChatParameters.Key#type()。 参数可设置时机参考 AVChatParameters.Key#runtime(),支持
abstract AVChatParameters getParameters(AVChatParameters params)
获取参数。 参数类型参考 AVChatParameters.Key#type()。 参数可设置时机参考 AVChatParameters.Key#runtime(),支持
abstract boolean isMicrophoneMute()
检查麦克风是否静音
编解码模式,主要用来区分软件编解码和硬件编解码
abstract void setMicrophoneMute(boolean mute)
设置麦克风是否静音
abstract boolean speakerEnabled()
扬声器是否打开