DJI Mobile SDK Documentation

class FPVWidget

class FPVWidget extends TextureViewWidget implements SurfaceTextureListener
Package:dji.ux.widget
Inherits From:TextureViewWidget implements SurfaceTextureListener
Display:

The video feed from camera.

Usage:

To allow user to interact with the video feed, use this widget in conjunction with FPVOverlayWidget

Class Members:
Video Source
method
method setVideoSource
void setVideoSource(VideoSource videoSource)
Package:dji.ux.widget
Description:

User can set video source to these three options: AUTO, PRIMARY, SECONDARY. By default, the video source is set to "AUTO" if user does not specify it.

Input Parameters:
VideoSource videoSourceAn enum value of VideoSource.
method getVideoSource
VideoSource getVideoSource()
Package:dji.ux.widget
Description:

Retrieves the type of the video feed selection.

Return:
VideoSourceAn enum value of VideoSource.
Source Camera Name
method
method setSourceCameraNameVisibility
void setSourceCameraNameVisibility(boolean isVisible)
Package:dji.ux.widget
Description:

Shows or Hides the video feed source's camera name on the video feed.

Input Parameters:
boolean isVisibleA boolean value that determines whether to show the source camera name.
Source Camera Side
method
method setSourceCameraSideVisibility
void setSourceCameraSideVisibility(boolean isVisible)
Package:dji.ux.widget
Description:

Flag to show/hide the side (starboard / port) of the camera on the video feed. Only works on aircrafts that support multiple gimbals.

Input Parameters:
boolean isVisibleA boolean value that determines whether to show the source camera side.
Video Source Enum
enum
enum VideoSource
enum VideoSource
Package:dji.ux.widget
Description:

Options for the user to select the video feed to associate with the FPVWidget. Please be aware that the video feed can only associate with one FPVWidget object. If several FPVWidget objects are associated with the same VideoSource, only the last one can get the live video.

Enum Members:
AUTOAuto switch from PRIMARY video feed to SECONDARY video feed to show the DJICamera live video when connecting with M600, M600Pro, A3, or N3 product. It is PRIMARY video feed by default when connecting with other products.
PRIMARYThe first video feed of getVideoFeeds array list in VideoFeeder singleton object.
SECONDARYThe second video feed of getVideoFeeds array list in VideoFeeder singleton object.
Class Members: