Interface StreamServer

    • Method Detail

      • enableStreaming

        void enableStreaming​(boolean enable)
        Drone streaming control.

        Provides global control of the ability to start streams.

        When streaming gets enabled, currently suspended stream will be resumed.
        When streaming is enabled, streams can be started.

        When streaming gets disabled, currently started stream gets suspended, in case it supports being resumed, or stopped otherwise.
        When streaming is disabled, no stream can be started.

        Parameters:
        enable - true to enable streaming, false to disable it
      • streamingEnabled

        boolean streamingEnabled()
        Tells whether streaming is currently enabled.
        Returns:
        true if streaming is enabled, otherwise false
      • live

        @NonNull
        Ref<CameraLive> live​(@NonNull
                             Ref.Observer<CameraLive> observer)
        Provides access to the drone camera live stream.

        There is only one live stream instance that is shared amongst all open references.

        Closing the returned reference does NOT automatically stops the referenced camera live stream.

        Parameters:
        observer - observer notified when the stream state changes
        Returns:
        a reference onto the camera live stream interface
      • replay

        @NonNull
        Ref<MediaReplay> replay​(@NonNull
                                MediaReplay.Source source,
                                @NonNull
                                Ref.Observer<MediaReplay> observer)
        Creates a new replay stream for some remote media.

        This method creates a new replay stream instance for the given media stream identifier that must be disposed by closing the returned reference once that stream is not needed.

        Closing the returned reference automatically stops the referenced media replay stream.

        Parameters:
        source - identifies remote media stream
        observer - observer notified when the stream state changes
        Returns:
        a reference onto a new replay stream for the given media stream identifier