推流接口类 更多...
Public 成员函数 | |
void | init (Context context, AlivcLivePushConfig config) throws IllegalArgumentException, IllegalStateException |
void | destroy () throws IllegalStateException |
void | setLivePusherReference (AlivcLivePusher livePusher) |
void | startPreview (SurfaceView surfaceView) throws IllegalArgumentException, IllegalStateException |
void | startPreviewAsync (SurfaceView surfaceView) throws IllegalArgumentException, IllegalStateException |
void | startPreview (Context context, FrameLayout frameLayout, boolean isAnchor) throws IllegalArgumentException, IllegalStateException |
void | stopPreview () throws IllegalStateException |
void | startPush (String url) throws IllegalArgumentException, IllegalStateException |
void | startPushAsync (String url) throws IllegalArgumentException, IllegalStateException |
void | restartPush () throws IllegalStateException |
void | restartPushAsync () throws IllegalStateException |
void | reconnectPushAsync (String url) throws IllegalStateException |
void | stopPush () throws IllegalStateException |
void | pause () throws IllegalStateException |
void | resume () throws IllegalStateException |
void | resumeAsync () throws IllegalStateException |
void | switchCamera () throws IllegalStateException |
void | setAutoFocus (boolean autoFocus) throws IllegalStateException |
void | focusCameraAtAdjustedPoint (float x, float y, boolean autoFocus) throws IllegalArgumentException, IllegalStateException |
void | setZoom (int zoom) throws IllegalArgumentException, IllegalStateException |
int | getMaxZoom () throws IllegalStateException |
int | getCurrentZoom () throws IllegalStateException |
void | setMute (boolean mute) throws IllegalStateException |
void | setFlash (boolean flash) throws IllegalStateException |
void | setPushMirror (boolean mirror) throws IllegalStateException |
void | setPreviewMirror (boolean mirror) throws IllegalStateException |
void | setTargetVideoBitrate (int targetVideoBitrate) throws IllegalArgumentException, IllegalStateException |
void | setMinVideoBitrate (int minVideoBitrate) throws IllegalArgumentException, IllegalStateException |
boolean | isCameraSupportAutoFocus () |
boolean | isCameraSupportFlash () |
boolean | isPushing () throws IllegalStateException |
boolean | isNetworkPushing () throws IllegalStateException |
void | setCustomDetect (AlivcLivePushCustomDetect customVideoDetect) |
void | setCustomFilter (AlivcLivePushCustomFilter customVideoFilter) |
void | setCustomAudioFilter (AlivcLivePushCustomAudioFilter customAudioFilter) |
AlivcLivePushStats | getCurrentStatus () |
void | setLivePushErrorListener (AlivcLivePushErrorListener errorListener) |
void | setLivePushInfoListener (AlivcLivePushInfoListener infoListener) |
void | setLivePushNetworkListener (AlivcLivePushNetworkListener networkListener) |
void | setLivePushBGMListener (AlivcLivePushBGMListener pushBGMListener) |
void | setLivePushRenderContextListener (AlivcLivePusherRenderContextListener renderCtxListener) |
AlivcLivePushStatsInfo | getLivePushStatsInfo () throws IllegalStateException |
String | getPushUrl () |
void | setPreviewOrientation (AlivcPreviewOrientationEnum orientation) |
int | setAudioEffectVoiceChangeMode (AlivcLivePushAudioEffectVoiceChangeMode mode) |
int | setAudioEffectReverbMode (AlivcLivePushAudioEffectReverbMode mode) |
void | startBGMAsync (String path) throws IllegalStateException |
void | stopBGMAsync () throws IllegalStateException |
void | pauseBGM () throws IllegalStateException |
void | resumeBGM () throws IllegalStateException |
void | setBGMLoop (boolean isLoop) throws IllegalStateException |
void | setBGMEarsBack (boolean isOpen) throws IllegalStateException |
void | setBGMVolume (int volume) throws IllegalStateException, IllegalArgumentException |
void | setCaptureVolume (int volume) throws IllegalStateException, IllegalArgumentException |
void | setAudioDenoise (boolean on) |
int | startIntelligentDenoise () |
int | stopIntelligentDenoise () |
void | setQualityMode (AlivcQualityModeEnum mode) throws IllegalStateException |
void | setPreviewMode (AlivcPreviewDisplayMode mode) throws IllegalStateException |
void | pauseScreenCapture () throws IllegalStateException |
void | resumeScreenCapture () throws IllegalStateException |
AlivcLivePushError | getLastError () |
void | changeResolution (AlivcResolutionEnum resolution) |
void | addWaterMark (String path, float x, float y, float width) |
void | setWatermarkVisible (boolean visible) |
int | startCamera (SurfaceView surfaceView) throws IllegalStateException |
void | stopCamera () |
void | setScreenOrientation (int orientation) |
int | startCameraMix (float x, float y, float w, float h) |
void | stopCameraMix () |
void | snapshot (int count, int interval, AlivcSnapshotListener listener) |
void | inputStreamVideoPtr (long dataPtr, int width, int height, int stride, int size, long pts, int rotation) |
void | inputStreamVideoData (byte[] data, int width, int height, int stride, int size, long pts, int rotation) |
void | inputStreamAudioPtr (long dataPtr, int size, int sampleRate, int channels, long pts) |
void | inputStreamAudioData (byte[] data, int size, int sampleRate, int channels, long pts) |
int | addDynamicsAddons (String path, float x, float y, float w, float h) |
void | removeDynamicsAddons (int id) |
void | setExposure (int exposure) |
int | getCurrentExposure () |
int | getSupportedMinExposure () |
int | getSupportedMaxExposure () |
void | sendMessage (String info, int repeat, int delay, boolean isKeyFrame) |
int | setLiveMixTranscodingConfig (AlivcLiveTranscodingConfig config) |
int | muteLocalCamera (boolean mute) |
int | enableSpeakerphone (boolean enable) |
boolean | isSpeakerphoneOn () |
String | getLiveTraceId () |
推流接口类
在文件 AlivcLivePusher.java 第 32 行定义.
int com.alivc.live.pusher.AlivcLivePusher.addDynamicsAddons | ( | String | path, |
float | x, | ||
float | y, | ||
float | w, | ||
float | h | ||
) |
添加动态贴纸
path | 贴纸路径,带config.json |
x | 显示起始x位置(0~1.0f) |
y | 显示起始y位置(0~1.0f) |
w | 显示宽度(0~1.0f) |
h | 显示高度(0~1.0f) |
在文件 AlivcLivePusher.java 第 1143 行定义.
void com.alivc.live.pusher.AlivcLivePusher.addWaterMark | ( | String | path, |
float | x, | ||
float | y, | ||
float | width | ||
) |
添加水印,起点位置坐标x[0,width) y[0,height) 宽度(0,width],最多添加3个
path | 水印图片 |
x | 水印左上角x轴位置 相对位置 0~1 |
y | 水印右上角y轴位置 相对位置 0~1 |
width | 水印显示宽度 相对位置 0~1 |
在文件 AlivcLivePusher.java 第 951 行定义.
void com.alivc.live.pusher.AlivcLivePusher.changeResolution | ( | AlivcResolutionEnum | resolution | ) |
void com.alivc.live.pusher.AlivcLivePusher.destroy | ( | ) | throws IllegalStateException |
int com.alivc.live.pusher.AlivcLivePusher.enableSpeakerphone | ( | boolean | enable | ) |
设置音频输出为听筒还是扬声器
enable | true:扬声器模式(默认扬声器);false:听筒模式 |
在文件 AlivcLivePusher.java 第 1279 行定义.
void com.alivc.live.pusher.AlivcLivePusher.focusCameraAtAdjustedPoint | ( | float | x, |
float | y, | ||
boolean | autoFocus | ||
) | throws IllegalArgumentException, IllegalStateException |
对焦,对焦点的坐标x[0,屏幕宽度],y[0,屏幕宽度]
x | 对焦的点x坐标 |
y | 对焦的点y坐标y |
autoFocus | 是否自动聚焦 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 324 行定义.
int com.alivc.live.pusher.AlivcLivePusher.getCurrentExposure | ( | ) |
AlivcLivePushStats com.alivc.live.pusher.AlivcLivePusher.getCurrentStatus | ( | ) |
int com.alivc.live.pusher.AlivcLivePusher.getCurrentZoom | ( | ) | throws IllegalStateException |
获取当前缩放值
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 366 行定义.
AlivcLivePushError com.alivc.live.pusher.AlivcLivePusher.getLastError | ( | ) |
AlivcLivePushStatsInfo com.alivc.live.pusher.AlivcLivePusher.getLivePushStatsInfo | ( | ) | throws IllegalStateException |
String com.alivc.live.pusher.AlivcLivePusher.getLiveTraceId | ( | ) |
int com.alivc.live.pusher.AlivcLivePusher.getMaxZoom | ( | ) | throws IllegalStateException |
获取摄像头支持的最大缩放值
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 352 行定义.
String com.alivc.live.pusher.AlivcLivePusher.getPushUrl | ( | ) |
int com.alivc.live.pusher.AlivcLivePusher.getSupportedMaxExposure | ( | ) |
int com.alivc.live.pusher.AlivcLivePusher.getSupportedMinExposure | ( | ) |
void com.alivc.live.pusher.AlivcLivePusher.init | ( | Context | context, |
AlivcLivePushConfig | config | ||
) | throws IllegalArgumentException, IllegalStateException |
初始化推流参数
context | 上下文 |
config | 配置 |
IllegalArgumentException | 如果 config为空,或者config的值为无效(例如码率的值超过范围) |
IllegalStateException | 如果状态不对,例如已经初始化,但是还没有销毁 |
在文件 AlivcLivePusher.java 第 47 行定义.
void com.alivc.live.pusher.AlivcLivePusher.inputStreamAudioData | ( | byte[] | data, |
int | size, | ||
int | sampleRate, | ||
int | channels, | ||
long | pts | ||
) |
输入自定义音频数据
data | 音频数据 byte array |
size | 音频数据大小 |
sampleRate | 音频比特率 |
channels | 音频通道数 |
pts | 音频数据pts(US) |
在文件 AlivcLivePusher.java 第 1125 行定义.
void com.alivc.live.pusher.AlivcLivePusher.inputStreamAudioPtr | ( | long | dataPtr, |
int | size, | ||
int | sampleRate, | ||
int | channels, | ||
long | pts | ||
) |
输入自定义音频数据
dataPtr | 音频数据native内存指针 |
size | 音频数据大小 |
sampleRate | 音频比特率 |
channels | 音频通道数 |
pts | 音频数据pts(US) |
在文件 AlivcLivePusher.java 第 1106 行定义.
void com.alivc.live.pusher.AlivcLivePusher.inputStreamVideoData | ( | byte[] | data, |
int | width, | ||
int | height, | ||
int | stride, | ||
int | size, | ||
long | pts, | ||
int | rotation | ||
) |
输入自定义视频流
data | 视频图像byte array |
width | 视频图像宽度 |
height | 视频图像高度 |
stride | 视频图像stride |
size | 视频图像size |
pts | 视频图像pts(us) |
rotation | 视频图像旋转角度 |
在文件 AlivcLivePusher.java 第 1087 行定义.
void com.alivc.live.pusher.AlivcLivePusher.inputStreamVideoPtr | ( | long | dataPtr, |
int | width, | ||
int | height, | ||
int | stride, | ||
int | size, | ||
long | pts, | ||
int | rotation | ||
) |
输入自定义视频流
dataPtr | native内存指针 |
width | 视频图像宽度 |
height | 视频图像高度 |
stride | 视频图像高度 |
size | 视频图像size |
pts | 视频图像pts(us) |
rotation | 视频图像旋转角度 |
在文件 AlivcLivePusher.java 第 1066 行定义.
boolean com.alivc.live.pusher.AlivcLivePusher.isCameraSupportAutoFocus | ( | ) |
boolean com.alivc.live.pusher.AlivcLivePusher.isCameraSupportFlash | ( | ) |
boolean com.alivc.live.pusher.AlivcLivePusher.isNetworkPushing | ( | ) | throws IllegalStateException |
boolean com.alivc.live.pusher.AlivcLivePusher.isPushing | ( | ) | throws IllegalStateException |
是否正在推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush |
在文件 AlivcLivePusher.java 第 490 行定义.
boolean com.alivc.live.pusher.AlivcLivePusher.isSpeakerphoneOn | ( | ) |
获取当前音频输出为听筒还是扬声器
在文件 AlivcLivePusher.java 第 1293 行定义.
int com.alivc.live.pusher.AlivcLivePusher.muteLocalCamera | ( | boolean | mute | ) |
关闭/打开摄像头
mute | true表示不发送视频数据,false表示恢复正常 |
在文件 AlivcLivePusher.java 第 1264 行定义.
void com.alivc.live.pusher.AlivcLivePusher.pause | ( | ) | throws IllegalStateException |
暂停推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/已经pause |
在文件 AlivcLivePusher.java 第 255 行定义.
void com.alivc.live.pusher.AlivcLivePusher.pauseBGM | ( | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.pauseScreenCapture | ( | ) | throws IllegalStateException |
暂停录屏推流(隐私开)
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/已经pause |
在文件 AlivcLivePusher.java 第 895 行定义.
void com.alivc.live.pusher.AlivcLivePusher.reconnectPushAsync | ( | String | url | ) | throws IllegalStateException |
重新连接进行推流
url | 推流URL |
IllegalStateException | 例如还未初始化/未startPreview/未startPush/已经stopPush |
在文件 AlivcLivePusher.java 第 229 行定义.
void com.alivc.live.pusher.AlivcLivePusher.removeDynamicsAddons | ( | int | id | ) |
void com.alivc.live.pusher.AlivcLivePusher.restartPush | ( | ) | throws IllegalStateException |
重新开始推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/已经stopPush |
在文件 AlivcLivePusher.java 第 202 行定义.
void com.alivc.live.pusher.AlivcLivePusher.restartPushAsync | ( | ) | throws IllegalStateException |
重新开始推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/已经stopPush |
在文件 AlivcLivePusher.java 第 215 行定义.
void com.alivc.live.pusher.AlivcLivePusher.resume | ( | ) | throws IllegalStateException |
恢复推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/未pause/已resume |
在文件 AlivcLivePusher.java 第 268 行定义.
void com.alivc.live.pusher.AlivcLivePusher.resumeAsync | ( | ) | throws IllegalStateException |
异步恢复推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/未pause/已resume |
在文件 AlivcLivePusher.java 第 281 行定义.
void com.alivc.live.pusher.AlivcLivePusher.resumeBGM | ( | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.resumeScreenCapture | ( | ) | throws IllegalStateException |
恢复录屏推流(隐私关)
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/未pause/已resume |
在文件 AlivcLivePusher.java 第 908 行定义.
void com.alivc.live.pusher.AlivcLivePusher.sendMessage | ( | String | info, |
int | repeat, | ||
int | delay, | ||
boolean | isKeyFrame | ||
) |
推流端发送自定义消息
info | 需要插入流的SEI消息体,建议是json格式 |
repeat | 发送的帧数 |
delay | 延时多少毫秒发送 |
isKeyFrame | 是否只发送关键帧 |
在文件 AlivcLivePusher.java 第 1224 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setAudioDenoise | ( | boolean | on | ) |
int com.alivc.live.pusher.AlivcLivePusher.setAudioEffectReverbMode | ( | AlivcLivePushAudioEffectReverbMode | mode | ) |
int com.alivc.live.pusher.AlivcLivePusher.setAudioEffectVoiceChangeMode | ( | AlivcLivePushAudioEffectVoiceChangeMode | mode | ) |
void com.alivc.live.pusher.AlivcLivePusher.setAutoFocus | ( | boolean | autoFocus | ) | throws IllegalStateException |
设置自动对焦
autoFocus | 自动聚焦 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 308 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setBGMEarsBack | ( | boolean | isOpen | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.setBGMLoop | ( | boolean | isLoop | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.setBGMVolume | ( | int | volume | ) | throws IllegalStateException, IllegalArgumentException |
设置背景音乐音量
volume | 背景音乐音量 范围:[0 ~ 100] 默认:50 |
IllegalStateException | 状态错误 |
IllegalArgumentException | 参数错误 |
在文件 AlivcLivePusher.java 第 789 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setCaptureVolume | ( | int | volume | ) | throws IllegalStateException, IllegalArgumentException |
设置人声音量
volume | 人声音量 范围:[0 ~ 100] 默认:50 |
IllegalStateException | 状态错误 |
IllegalArgumentException | 参数错误 |
在文件 AlivcLivePusher.java 第 804 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setCustomAudioFilter | ( | AlivcLivePushCustomAudioFilter | customAudioFilter | ) |
void com.alivc.live.pusher.AlivcLivePusher.setCustomDetect | ( | AlivcLivePushCustomDetect | customVideoDetect | ) |
void com.alivc.live.pusher.AlivcLivePusher.setCustomFilter | ( | AlivcLivePushCustomFilter | customVideoFilter | ) |
void com.alivc.live.pusher.AlivcLivePusher.setExposure | ( | int | exposure | ) |
void com.alivc.live.pusher.AlivcLivePusher.setFlash | ( | boolean | flash | ) | throws IllegalStateException |
是否打开闪光灯
flash | true:打开闪光灯 false:关闭闪光灯 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 394 行定义.
int com.alivc.live.pusher.AlivcLivePusher.setLiveMixTranscodingConfig | ( | AlivcLiveTranscodingConfig | config | ) |
设置云端的混流转码参数
config | 云端混流转码参数 |
在文件 AlivcLivePusher.java 第 1246 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setLivePushBGMListener | ( | AlivcLivePushBGMListener | pushBGMListener | ) |
void com.alivc.live.pusher.AlivcLivePusher.setLivePusherReference | ( | AlivcLivePusher | livePusher | ) |
void com.alivc.live.pusher.AlivcLivePusher.setLivePushErrorListener | ( | AlivcLivePushErrorListener | errorListener | ) |
void com.alivc.live.pusher.AlivcLivePusher.setLivePushInfoListener | ( | AlivcLivePushInfoListener | infoListener | ) |
void com.alivc.live.pusher.AlivcLivePusher.setLivePushNetworkListener | ( | AlivcLivePushNetworkListener | networkListener | ) |
void com.alivc.live.pusher.AlivcLivePusher.setLivePushRenderContextListener | ( | AlivcLivePusherRenderContextListener | renderCtxListener | ) |
void com.alivc.live.pusher.AlivcLivePusher.setMinVideoBitrate | ( | int | minVideoBitrate | ) | throws IllegalArgumentException, IllegalStateException |
设置最小视频码率(Kbps)
minVideoBitrate | 最小视频编码码率 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush |
在文件 AlivcLivePusher.java 第 450 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setMute | ( | boolean | mute | ) | throws IllegalStateException |
是否静音
mute | true:静音推流 false:正常推流 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush |
在文件 AlivcLivePusher.java 第 380 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setPreviewMirror | ( | boolean | mirror | ) | throws IllegalStateException |
预览镜像开关
mirror | true:打开预览镜像 false:关闭预览镜像 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 422 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setPreviewMode | ( | AlivcPreviewDisplayMode | mode | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.setPreviewOrientation | ( | AlivcPreviewOrientationEnum | orientation | ) |
void com.alivc.live.pusher.AlivcLivePusher.setPushMirror | ( | boolean | mirror | ) | throws IllegalStateException |
推流端是否水平镜像
mirror | true:打开推流镜像 false:关闭推流镜像 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush |
在文件 AlivcLivePusher.java 第 408 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setQualityMode | ( | AlivcQualityModeEnum | mode | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.setScreenOrientation | ( | int | orientation | ) |
void com.alivc.live.pusher.AlivcLivePusher.setTargetVideoBitrate | ( | int | targetVideoBitrate | ) | throws IllegalArgumentException, IllegalStateException |
设置目标视频码率[100,5000](Kbps)
targetVideoBitrate | 目标视频编码码率 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush |
在文件 AlivcLivePusher.java 第 436 行定义.
void com.alivc.live.pusher.AlivcLivePusher.setWatermarkVisible | ( | boolean | visible | ) |
void com.alivc.live.pusher.AlivcLivePusher.setZoom | ( | int | zoom | ) | throws IllegalArgumentException, IllegalStateException |
设置缩放
zoom | 0~getMaxZoom() |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 338 行定义.
void com.alivc.live.pusher.AlivcLivePusher.snapshot | ( | int | count, |
int | interval, | ||
AlivcSnapshotListener | listener | ||
) |
视频流截图
count | 截取图片的个数,该参数仅在普通模式下生效 |
interval | 每张图片的间隔,该参数仅在普通模式下生效 |
listener | 截图回调 |
在文件 AlivcLivePusher.java 第 1046 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startBGMAsync | ( | String | path | ) | throws IllegalStateException |
int com.alivc.live.pusher.AlivcLivePusher.startCamera | ( | SurfaceView | surfaceView | ) | throws IllegalStateException |
录屏模式下,开启摄像头预览 如果不需要预览,则surfaceView填为null
surfaceView | surfaceView |
在文件 AlivcLivePusher.java 第 979 行定义.
int com.alivc.live.pusher.AlivcLivePusher.startCameraMix | ( | float | x, |
float | y, | ||
float | w, | ||
float | h | ||
) |
录屏模式下,开启摄像头混流
x | 混流显示x初始位置(0~1.0f) |
y | 混流显示y初始位置(0~1.0f) |
w | 混流显示宽度(0~1.0f) |
h | 混流显示高度(0~1.0f) |
在文件 AlivcLivePusher.java 第 1020 行定义.
int com.alivc.live.pusher.AlivcLivePusher.startIntelligentDenoise | ( | ) |
开启音频智能降噪
在文件 AlivcLivePusher.java 第 840 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startPreview | ( | SurfaceView | surfaceView | ) | throws IllegalArgumentException, IllegalStateException |
开始预览
surfaceView | surfaceView |
IllegalArgumentException | 如果surfaceView为空,或者surfaceView的surface未创建/已销毁 |
IllegalStateException | 如果状态不对,例如还未初始化 |
在文件 AlivcLivePusher.java 第 113 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startPreview | ( | Context | context, |
FrameLayout | frameLayout, | ||
boolean | isAnchor | ||
) | throws IllegalArgumentException, IllegalStateException |
开始预览
context | android context |
frameLayout | FrameLayout Container |
isAnchor | 是否主播 |
IllegalArgumentException | 参数错误 |
IllegalStateException | 状态错误 |
在文件 AlivcLivePusher.java 第 146 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startPreviewAsync | ( | SurfaceView | surfaceView | ) | throws IllegalArgumentException, IllegalStateException |
异步开始预览
surfaceView | surfaceView |
IllegalArgumentException | 如果surfaceView为空,或者surfaceView的surface未创建/已销毁 |
IllegalStateException | 如果状态不对,例如还未初始化 |
在文件 AlivcLivePusher.java 第 128 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startPush | ( | String | url | ) | throws IllegalArgumentException, IllegalStateException |
开始推流
url | 推流Url |
IllegalArgumentException | 如果url为空,或者不是有效的url格式 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 174 行定义.
void com.alivc.live.pusher.AlivcLivePusher.startPushAsync | ( | String | url | ) | throws IllegalArgumentException, IllegalStateException |
开始异步推流
url | 推流Url |
IllegalArgumentException | 如果url为空,或者不是有效的url格式 |
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview |
在文件 AlivcLivePusher.java 第 189 行定义.
void com.alivc.live.pusher.AlivcLivePusher.stopBGMAsync | ( | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.stopCamera | ( | ) |
录屏模式下,关闭摄像头预览
在文件 AlivcLivePusher.java 第 990 行定义.
void com.alivc.live.pusher.AlivcLivePusher.stopCameraMix | ( | ) |
录屏模式下,停止摄像头混流
在文件 AlivcLivePusher.java 第 1031 行定义.
int com.alivc.live.pusher.AlivcLivePusher.stopIntelligentDenoise | ( | ) |
void com.alivc.live.pusher.AlivcLivePusher.stopPreview | ( | ) | throws IllegalStateException |
void com.alivc.live.pusher.AlivcLivePusher.stopPush | ( | ) | throws IllegalStateException |
结束推流
IllegalStateException | 如果状态不对,例如还未初始化/未startPreview/未startPush/已经stopPush |
在文件 AlivcLivePusher.java 第 242 行定义.
void com.alivc.live.pusher.AlivcLivePusher.switchCamera | ( | ) | throws IllegalStateException |