Remote Action

2026-11-05Loading rating…

1. Feature Overview

The remote control capability lets the plugin control which camera Pilot's primary view shows. An aircraft usually has multiple cameras (main, FPV, left/right payloads, etc.), and the plugin can switch Pilot's primary video view to a specific one as the workflow requires—for example, switch to FPV to assist takeoff and landing, or switch to a payload camera during a task.

1.1 Capability Overview

CapabilityDescription
Switch primary camera viewSwitch Pilot's primary video view to a specific camera

1.2 Use Cases

  • Takeoff/landing assist: switch to the FPV camera to observe below and around the aircraft
  • Task viewing: switch to a payload camera to view the task feed

2. Interface Call Examples

The examples below assume you have completed SDK initialization and the plugin is connected to Pilot (for connection state, see the Plugin Connection State documentation). All interfaces are called through the manager singleton RemoteControlManager.getInstance().

2.1 Switch the Primary Camera View (switchToPrimaryCameraView)

Pass the target camera's ComponentIndexType; the callback is success / failure:

val rcManager = RemoteControlManager.getInstance()              // get the manager singleton

rcManager.switchToPrimaryCameraView(
    ComponentIndexType.FPV,                                     // target camera: switch to FPV
    object : CommonCallbacks.CompletionCallback {
        override fun onSuccess() { /* switched */ }
        override fun onFailure(error: IDJIError) { /* error.errorCode() */ }
    }
)

ComponentIndexType is MSDK's general camera-index enum; common values:

ValueMeaning
LEFT_OR_MAINMain camera (or left camera)
FPVFPV camera
RIGHTRight camera
UPUpward camera

3. API Reference

For the full definitions of these interface methods (including parameter enums), see the API documentation: IRemoteControlManageropen in new window.

IRemoteControlManager is the entry point of the remote control interface, exposing the following methods:

ItemDescription
IRemoteControlManagerEntry point of the remote control interface
switchToPrimaryCameraViewSwitch Pilot's primary view to a specific camera

4. FAQ

Q1: The switch callback returns REMOTE_DISCONNECTED?

Calling before the connection is ready (delegate not injected) returns this error immediately. Call after the connection state is CONNECTED, or handle the error and retry in the callback.

Q2: Which ComponentIndexType value should I pass?

It is MSDK's general camera-index enum; choose based on the aircraft's actual camera layout: main / left uses LEFT_OR_MAIN, FPV uses FPV, and right / up use RIGHT / UP. If the target camera does not exist on the current model, the switch fails—check error.errorCode().

Appendix: Error Code Quick Reference

The error codes below come from dji.open.pilot.base.error.RemoteError:

Error code constantTriggerSuggested handling
REMOTE_DISCONNECTEDCalled before the connection is readyRetry after the connection state is CONNECTED; see Q1
Last Updated: