public static abstract class InCallService.VideoCall.Callback
extends Object
| java.lang.Object | |
| android.telecom.InCallService.VideoCall.Callback | |
InCallService扩展了这个类以提供从 Connection.VideoProvider接收回调的 Connection.VideoProvider 。
当 InCallService接收 onVideoCallChanged(Call, VideoCall)回调,应该创建一个实例它 InCallService.VideoCall.Callback执行,并将其设置在 InCallService.VideoCall使用 registerCallback(Callback) 。
Public constructors |
|
|---|---|
InCallService.VideoCall.Callback() |
|
公共方法(Public methods) |
|
|---|---|
abstract void |
onCallDataUsageChanged(long dataUsage) 处理用于当前视频会话的总数据的更新。 |
abstract void |
onCallSessionEvent(int event) 处理与 |
abstract void |
onCameraCapabilitiesChanged(VideoProfile.CameraCapabilities cameraCapabilities) 处理当前所选相机功能的变化。 |
abstract void |
onPeerDimensionsChanged(int width, int height) 处理来自对等设备的视频尺寸更改。 |
abstract void |
onSessionModifyRequestReceived(VideoProfile videoProfile) 当 |
abstract void |
onSessionModifyResponseReceived(int status, VideoProfile requestedProfile, VideoProfile responseProfile) 当 |
abstract void |
onVideoQualityChanged(int videoQuality) 处理对视频质量的更改。 |
继承方法(Inherited methods) |
|
|---|---|
java.lang.Object
|
|
void onCallDataUsageChanged (long dataUsage)
处理用于当前视频会话的总数据的更新。
Connection.VideoProvider用于响应requestCallDataUsage() 。 也可能被Connection.VideoProvider定期Connection.VideoProvider 。
回 setCallDataUsage(long)源于 setCallDataUsage(long) 。
| 参数(Parameters) | |
|---|---|
dataUsage |
long: The updated data usage (in bytes). |
void onCallSessionEvent (int event)
处理与InCallService可能希望处理的当前视频会话相关的事件。 由于基础协议或连接,这些与会话的请求更改是分开的。
回 handleCallSessionEvent(int)源于 handleCallSessionEvent(int) 。
| 参数(Parameters) | |
|---|---|
event |
int: The event. Valid values are: SESSION_EVENT_RX_PAUSE, SESSION_EVENT_RX_RESUME, SESSION_EVENT_TX_START, SESSION_EVENT_TX_STOP, SESSION_EVENT_CAMERA_FAILURE, SESSION_EVENT_CAMERA_READY. |
void onCameraCapabilitiesChanged (VideoProfile.CameraCapabilities cameraCapabilities)
处理当前所选相机功能的变化。
Connection.VideoProvider用于响应requestCameraCapabilities() 。 Connection.VideoProvider也可能会在致电setCamera(String)后报告相机功能。
回 changeCameraCapabilities(VideoProfile.CameraCapabilities)源于 changeCameraCapabilities(VideoProfile.CameraCapabilities) 。
| 参数(Parameters) | |
|---|---|
cameraCapabilities |
VideoProfile.CameraCapabilities: The changed camera capabilities. |
void onPeerDimensionsChanged (int width,
int height)
处理来自对等设备的视频尺寸更改。 例如,如果对方改变其设备的方位或切换摄像头,就可能发生这种情况。
回叫源自 changePeerDimensions(int, int) 。
| 参数(Parameters) | |
|---|---|
width |
int: The updated peer video width. |
height |
int: The updated peer video height. |
void onSessionModifyRequestReceived (VideoProfile videoProfile)
当 Connection.VideoProvider收到来自对等设备的会话修改请求时调用。
InCallService可能会提示用户确认他们是希望接受请求,还是决定自动接受请求。 无论是哪种情况, InCallService都应该打电话给sendSessionModifyResponse(VideoProfile)以表明已达成一致的视频配置文件。
回 receiveSessionModifyRequest(VideoProfile)源于 receiveSessionModifyRequest(VideoProfile) 。
| 参数(Parameters) | |
|---|---|
videoProfile |
VideoProfile: The requested video profile. |
void onSessionModifyResponseReceived (int status,
VideoProfile requestedProfile,
VideoProfile responseProfile)
当 Connection.VideoProvider收到对先前发送给对等设备的会话修改请求的响应时调用。
新的视频状态不应该被视为积极 InCallService ,直到 Call视频状态更改( onDetailsChanged(Call, Call.Details)回调时触发录像状态变化)。
回 receiveSessionModifyResponse(int, VideoProfile, VideoProfile)源于 receiveSessionModifyResponse(int, VideoProfile, VideoProfile) 。
| 参数(Parameters) | |
|---|---|
status |
int: Status of the session modify request. Valid values are SESSION_MODIFY_REQUEST_SUCCESS, SESSION_MODIFY_REQUEST_FAIL, SESSION_MODIFY_REQUEST_INVALID, SESSION_MODIFY_REQUEST_TIMED_OUT, SESSION_MODIFY_REQUEST_REJECTED_BY_REMOTE. |
requestedProfile |
VideoProfile: The original request which was sent to the peer device. |
responseProfile |
VideoProfile: The actual profile changes made by the peer device. |
void onVideoQualityChanged (int videoQuality)
处理对视频质量的更改。
回调起源于 changeVideoQuality(int) 。
| 参数(Parameters) | |
|---|---|
videoQuality |
int: The updated peer video quality. Valid values: QUALITY_HIGH, QUALITY_MEDIUM, QUALITY_LOW, QUALITY_DEFAULT. |