public abstract static class InCallService.VideoCall extends Object
Connection.VideoProvider
associated with a
Call
.Modifier and Type | Class and Description |
---|---|
static class |
InCallService.VideoCall.Callback
The
InCallService extends this class to provide a means of receiving callbacks
from the Connection.VideoProvider . |
Constructor and Description |
---|
VideoCall() |
Modifier and Type | Method and Description |
---|---|
abstract void |
destroy() |
abstract void |
registerCallback(InCallService.VideoCall.Callback callback)
Registers a callback to receive commands and state changes for video calls.
|
abstract void |
registerCallback(InCallService.VideoCall.Callback callback,
Handler handler)
Registers a callback to receive commands and state changes for video calls.
|
abstract void |
requestCallDataUsage()
Issues a request to the
Connection.VideoProvider to retrieve the cumulative data
usage for the video component of the current call (in bytes). |
abstract void |
requestCameraCapabilities()
Issues a request to the
Connection.VideoProvider to retrieve the capabilities
of the current camera. |
abstract void |
sendSessionModifyRequest(VideoProfile requestProfile)
Issues a request to modify the properties of the current video session.
|
abstract void |
sendSessionModifyResponse(VideoProfile responseProfile)
Provides a response to a request to change the current call video session
properties.
|
abstract void |
setCamera(String cameraId)
Sets the camera to be used for the outgoing video.
|
abstract void |
setDeviceOrientation(int rotation)
Sets the device orientation, in degrees.
|
abstract void |
setDisplaySurface(Surface surface)
Sets the surface to be used for displaying the video received from the remote device.
|
abstract void |
setPauseImage(Uri uri)
Provides the
Connection.VideoProvider with the Uri of an image to be
displayed to the peer device when the video signal is paused. |
abstract void |
setPreviewSurface(Surface surface)
Sets the surface to be used for displaying a preview of what the user's camera is
currently capturing.
|
abstract void |
setZoom(float value)
Sets camera zoom ratio.
|
abstract void |
unregisterCallback(InCallService.VideoCall.Callback callback)
Clears the video call callback set via
registerCallback(android.telecom.InCallService.VideoCall.Callback) . |
public abstract void destroy()
public abstract void registerCallback(InCallService.VideoCall.Callback callback)
callback
- The video call callback.public abstract void registerCallback(InCallService.VideoCall.Callback callback, Handler handler)
callback
- The video call callback.handler
- A handler which commands and status changes will be delivered to.public abstract void unregisterCallback(InCallService.VideoCall.Callback callback)
registerCallback(android.telecom.InCallService.VideoCall.Callback)
.callback
- The video call callback to clear.public abstract void setCamera(String cameraId)
Handled by Connection.VideoProvider.onSetCamera(String)
.
cameraId
- The id of the camera (use ids as reported by
CameraManager.getCameraIdList()
).public abstract void setPreviewSurface(Surface surface)
Handled by Connection.VideoProvider.onSetPreviewSurface(Surface)
.
surface
- The Surface
.public abstract void setDisplaySurface(Surface surface)
Handled by Connection.VideoProvider.onSetDisplaySurface(Surface)
.
surface
- The Surface
.public abstract void setDeviceOrientation(int rotation)
Handled by Connection.VideoProvider.onSetDeviceOrientation(int)
.
rotation
- The device orientation, in degrees.public abstract void setZoom(float value)
Handled by Connection.VideoProvider.onSetZoom(float)
.
value
- The camera zoom ratio.public abstract void sendSessionModifyRequest(VideoProfile requestProfile)
Example scenarios include: requesting an audio-only call to be upgraded to a
bi-directional video call, turning on or off the user's camera, sending a pause signal
when the InCallService
is no longer the foreground application.
Handled by
Connection.VideoProvider.onSendSessionModifyRequest(VideoProfile, VideoProfile)
.
requestProfile
- The requested call video properties.public abstract void sendSessionModifyResponse(VideoProfile responseProfile)
InCallService
has
received via InCallService.VideoCall.Callback.onSessionModifyRequestReceived(android.telecom.VideoProfile)
.
Handled by
Connection.VideoProvider.onSendSessionModifyResponse(VideoProfile)
.
responseProfile
- The response call video properties.public abstract void requestCameraCapabilities()
Connection.VideoProvider
to retrieve the capabilities
of the current camera. The current camera is selected using
setCamera(String)
.
Camera capabilities are reported to the caller via
InCallService.VideoCall.Callback.onCameraCapabilitiesChanged(VideoProfile.CameraCapabilities)
.
Handled by Connection.VideoProvider.onRequestCameraCapabilities()
.
public abstract void requestCallDataUsage()
Connection.VideoProvider
to retrieve the cumulative data
usage for the video component of the current call (in bytes). Data usage is reported
to the caller via InCallService.VideoCall.Callback.onCallDataUsageChanged(long)
.
Handled by Connection.VideoProvider.onRequestConnectionDataUsage()
.
public abstract void setPauseImage(Uri uri)
Connection.VideoProvider
with the Uri
of an image to be
displayed to the peer device when the video signal is paused.
Handled by Connection.VideoProvider.onSetPauseImage(Uri)
.
uri
- URI of image to display.