CameraLive
@objc(GSCameraLive)
public protocol CameraLive : Stream
Camera live stream interface. Provides control over the drone camera live stream, allowing to pause, resume or stop playback. There is only one instance of this interface that is shared amongst all clients that have an open reference on this stream.
This stream supports ‘suspended’ state. When it is started and gets interrupted because another stream starts, or because streaming gets disabled globally, it moves to the ‘suspended’ state. Once the interruption stops, or streaming gets enabled, it is resumed in the state it was before suspension. Also, this implies that this stream can be started even while streaming is globally disabled. In such case, it will move to the ‘suspended’ state until either it is stopped by client request, or streaming gets enabled.
-
Current playback state.
Declaration
Swift
var playState: CameraLivePlayState { get }
-
Requests playback to start.
The stream is started if necessary.
Declaration
Swift
func play() -> Bool
Return Value
‘true’ if playback request was sent, otherwise ‘false’
-
Requests playback to pause.
The stream is started if necessary.
Declaration
Swift
func pause() -> Bool
Return Value
‘true’ if playback request was sent, otherwise ‘false’
-
Stop the stream.
Declaration
Swift
func stop()