DJI Mobile SDK Documentation

      class ILiveStreamManager

      interface ILiveStreamManager
      Package:dji.v5.manager.interfaces
      Description:

      Class that used to manage the live steam. It is used to configure the live stream settings, start and stop the live streaming.

      Supported since MSDK 5.0.0

      Class Members:
      method isStreaming
      boolean isStreaming()
      Package:dji.v5.manager.interfaces
      Description:

      Get whether the aircraft is live streaming now.

      Supported since MSDK 5.0.0

      Return:
      booleantrue means it is live streaming now.
      method setLiveStreamSettings
      void setLiveStreamSettings(LiveStreamSettings settings)
      Package:dji.v5.manager.interfaces
      Description:

      Set live stream settings.

      Supported since MSDK 5.0.0

      Input Parameters:
      LiveStreamSettings settingsLive stream settings.
      method getLiveStreamSettings
      LiveStreamSettings getLiveStreamSettings()
      Package:dji.v5.manager.interfaces
      Description:

      Get the live stream settings.

      Supported since MSDK 5.0.0

      Return:
      LiveStreamSettingsReturn the live stream settings.
      method setVideoChannelType
      @Deprecated
      void setVideoChannelType(VideoChannelType videoChannelType)
      Package:dji.v5.manager.interfaces
      Description:

      Set the video channel for live streaming.
      Note:
      This interface is deprecated starting from MSDK 5.8.0. Please call setCameraIndex to set the camera index to live stream.


      Supported since MSDK 5.0.0

      Input Parameters:
      VideoChannelType videoChannelTypeThe type of video channel.
      method getVideoChannelType
      @Deprecated
      VideoChannelType getVideoChannelType()
      Package:dji.v5.manager.interfaces
      Description:

      Get the type of video channel for live streaming.
      Note:
      This interface is deprecated starting from MSDK 5.8.0. Please call getCameraIndex to get the camera index.


      Supported since MSDK 5.0.0

      Return:
      VideoChannelTypeReturn the type of video channel.
      method setCameraIndex
      void setCameraIndex(@NonNull ComponentIndexType cameraIndex)
      Package:dji.v5.manager.interfaces
      Description:

      Set the camera index that needs to live stream.

      Supported since MSDK 5.8.0

      Input Parameters:
      @NonNull ComponentIndexType cameraIndexCamera index set for live stream.
      method getCameraIndex
      ComponentIndexType getCameraIndex()
      Package:dji.v5.manager.interfaces
      Description:

      Gets the set camera index.

      Supported since MSDK 5.8.0

      Return:
      ComponentIndexTypeReturns the set camera index.
      method startStream
      void startStream(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Start live streaming.

      Supported since MSDK 5.0.0

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackReturn the result of execution.
      method stopStream
      void stopStream(CommonCallbacks.CompletionCallback callback)
      Package:dji.v5.manager.interfaces
      Description:

      Stop live streaming.

      Supported since MSDK 5.0.0

      Input Parameters:
      CommonCallbacks.CompletionCallback callbackReturn the result of execution.
      method setLiveStreamQuality
      void setLiveStreamQuality(StreamQuality quality)
      Package:dji.v5.manager.interfaces
      Description:

      Set the type of live stream video quality.

      Supported since MSDK 5.0.0

      Input Parameters:
      StreamQuality qualityThe type of live stream video quality.
      method getLiveStreamQuality
      StreamQuality getLiveStreamQuality()
      Package:dji.v5.manager.interfaces
      Description:

      Get the type of live stream video quality.

      Supported since MSDK 5.0.0

      Return:
      StreamQualityReturn the type of live stream video quality.
      method setLiveVideoBitrateMode
      void setLiveVideoBitrateMode(LiveVideoBitrateMode bitrateMode)
      Package:dji.v5.manager.interfaces
      Description:

      Set the mode of live stream video bit rate. Under AUTO mode, MSDK will set the live stream video bit rate automatically. Under MANUAL mode, you can callsetLiveVideoBitrateto set the live stream video bit rate.

      Supported since MSDK 5.0.0

      Input Parameters:
      LiveVideoBitrateMode bitrateModeThe mode of live stream video bit rate.
      method getLiveVideoBitrateMode
      LiveVideoBitrateMode getLiveVideoBitrateMode()
      Package:dji.v5.manager.interfaces
      Description:

      Get the mode of live stream video bitrate.

      Supported since MSDK 5.0.0

      Return:
      LiveVideoBitrateModeReturn the mode of live stream video bitrate.
      method setLiveVideoBitrate
      void setLiveVideoBitrate(int bitrate)
      Package:dji.v5.manager.interfaces
      Description:

      Set the live stream bitrate, unit: bit/s.

      Supported since MSDK 5.0.0

      Input Parameters:
      int bitrateLive stream video bitrate.
      method getLiveVideoBitrate
      int getLiveVideoBitrate()
      Package:dji.v5.manager.interfaces
      Description:

      Get the live stream video bitrate.

      Supported since MSDK 5.0.0

      Return:
      intReturn the live stream video bitrate.
      method setLiveStreamScaleType
      void setLiveStreamScaleType(ICameraStreamManager.ScaleType scaleType)
      Package:dji.v5.manager.interfaces
      Description:

      Set the live stream video scale type.

      Supported since MSDK 5.10.0

      Input Parameters:
      ICameraStreamManager.ScaleType scaleTypeScale type.
      method getLiveStreamScaleType
      ICameraStreamManager.ScaleType getLiveStreamScaleType()
      Package:dji.v5.manager.interfaces
      Description:

      Get the live stream video scale type.

      Supported since MSDK 5.10.0

      Return:
      ICameraStreamManager.ScaleTypeReturn the live stream video scale type.
      method addLiveStreamStatusListener
      void addLiveStreamStatusListener(LiveStreamStatusListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Add the listener of live stream status.

      Supported since MSDK 5.0.0

      Input Parameters:
      LiveStreamStatusListener listenerThe listener of live stream status
      method removeLiveStreamStatusListener
      void removeLiveStreamStatusListener(LiveStreamStatusListener listener)
      Package:dji.v5.manager.interfaces
      Description:

      Remove the listener of live stream status.

      Supported since MSDK 5.0.0

      Input Parameters:
      LiveStreamStatusListener listenerThe listener of live stream status
      enum LiveStreamType
      enum LiveStreamType
      Package:dji.v5.manager.datacenter.livestream
      Description:

      The type of live stream protocol.

      Supported since MSDK 5.0.0

      Enum Members:
      RTMPRTMP type.
      RTSPRTSP type.
      GB28181GB28181 type.
      AGORAAgora type.
      Class Members:
      enum StreamQuality
      enum StreamQuality
      Package:dji.v5.manager.datacenter.livestream
      Description:

      The type of live video stream quality.

      Supported since MSDK 5.0.0

      Enum Members:
      SDStandard definition, resolution is 960*540, FPS is 30, bit rate is about 74KByte/s.
      HDHigh definition, resolution is 1280*720, FPS is 30, bit rate is about 168KByte/s.
      FULL_HDFull high definition, resolution is 1920*1080, FPS is 30, bit rate is about 380KByte/s.
      Class Members:
      enum LiveVideoBitrateMode
      enum LiveVideoBitrateMode
      Package:dji.v5.manager.datacenter.livestream
      Description:

      The mode of live stream video bitrate.

      Supported since MSDK 5.0.0

      Enum Members:
      AUTOAUTO. Under this mode, the MSDK will set the bitrate automatically according to fluency of live video.
      MANUALMANUAL, the default mode of live video bitrate mode. The deafult bit rate is 2*1024kbps.
      Class Members: