Agora Java API Reference for Android
Public Member Functions | Protected Member Functions | List of all members
io.agora.rte.media.track.AgoraRteScreenVideoTrack Class Referenceabstract
Inheritance diagram for io.agora.rte.media.track.AgoraRteScreenVideoTrack:

Public Member Functions

abstract int startCaptureScreen (Intent intent, AgoraRteVideoEncoderConfiguration.VideoDimensions dimensions)
 
abstract void stopCapture ()
 

Protected Member Functions

 AgoraRteScreenVideoTrack (long nativeHandle)
 

Member Function Documentation

◆ startCaptureScreen()

abstract int io.agora.rte.media.track.AgoraRteScreenVideoTrack.startCaptureScreen ( Intent  intent,
AgoraRteVideoEncoderConfiguration.VideoDimensions  dimensions 
)
abstract

Starts screen capturing by specifying the Intent data obtained from MediaProjection. This method shares the whole screen.

Parameters
intentThe Intent data from onActivityResult (int requestCode, int resultCode, Intent data) after you create an Intent from MediaProjection and sends the Intent to startActivityForResult.
dimensionsThe reference to the captured screen's resolution in terms of width × height. If you set width or height as 0, the dimensions will be the screen's width × height.
Returns
  • 0: success
  • < 0: failure

◆ stopCapture()

abstract void io.agora.rte.media.track.AgoraRteScreenVideoTrack.stopCapture ( )
abstract

Stops screen capture.