Most visited

Recently visited

Added in API level 23

InCallService.VideoCall.Callback

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)

Summary

Public constructors

InCallService.VideoCall.Callback()

Public methods

abstract void onCallDataUsageChanged(long dataUsage)

处理用于当前视频会话的总数据的更新。

abstract void onCallSessionEvent(int event)

处理与 InCallService可能希望处理的当前视频会话相关的事件。

abstract void onCameraCapabilitiesChanged(VideoProfile.CameraCapabilities cameraCapabilities)

处理当前所选相机功能的变化。

abstract void onPeerDimensionsChanged(int width, int height)

处理来自对等设备的视频尺寸更改。

abstract void onSessionModifyRequestReceived(VideoProfile videoProfile)

Connection.VideoProvider收到来自对等设备的会话修改请求时调用。

abstract void onSessionModifyResponseReceived(int status, VideoProfile requestedProfile, VideoProfile responseProfile)

Connection.VideoProvider收到对先前发送到对等设备的会话修改请求的响应时调用。

abstract void onVideoQualityChanged(int videoQuality)

处理对视频质量的更改。

Inherited methods

From class java.lang.Object

Public constructors

InCallService.VideoCall.Callback

Added in API level 23
InCallService.VideoCall.Callback ()

Public methods

onCallDataUsageChanged

Added in API level 23
void onCallDataUsageChanged (long dataUsage)

处理用于当前视频会话的总数据的更新。

Connection.VideoProvider用于响应requestCallDataUsage() 也可能被Connection.VideoProvider定期Connection.VideoProvider

setCallDataUsage(long)源于 setCallDataUsage(long)

Parameters
dataUsage long: The updated data usage (in bytes).

onCallSessionEvent

Added in API level 23
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.

onCameraCapabilitiesChanged

Added in API level 23
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.

onPeerDimensionsChanged

Added in API level 23
void onPeerDimensionsChanged (int width, 
                int height)

处理来自对等设备的视频尺寸更改。 例如,如果对方改变其设备的方位或切换摄像头,就可能发生这种情况。

回叫源自 changePeerDimensions(int, int)

Parameters
width int: The updated peer video width.
height int: The updated peer video height.

onSessionModifyRequestReceived

Added in API level 23
void onSessionModifyRequestReceived (VideoProfile videoProfile)

Connection.VideoProvider收到来自对等设备的会话修改请求时调用。

InCallService可能会提示用户确认他们是希望接受请求,还是决定自动接受请求。 无论是哪种情况, InCallService都应该打电话给sendSessionModifyResponse(VideoProfile)以表明已达成一致的视频配置文件。

receiveSessionModifyRequest(VideoProfile)源于 receiveSessionModifyRequest(VideoProfile)

Parameters
videoProfile VideoProfile: The requested video profile.

onSessionModifyResponseReceived

Added in API level 23
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.

onVideoQualityChanged

Added in API level 23
void onVideoQualityChanged (int videoQuality)

处理对视频质量的更改。

回调起源于 changeVideoQuality(int)

Parameters
videoQuality int: The updated peer video quality. Valid values: QUALITY_HIGH, QUALITY_MEDIUM, QUALITY_LOW, QUALITY_DEFAULT.

Hooray!