DJIMediaManager(VideoPlayback)
@interface DJIMediaManager (VideoPlayback)
Category of DJIMediaManager
includes methods to control the video playback.
-
Checks if the media manager supports video playback or not. Video playback is supported only by Mavic Pro.
Declaration
Objective-C
- (BOOL)isVideoPlaybackSupported;
Return Value
YES
if the media manager supports video playback. -
Start video playback through
DJIMediaManager
. When the media manager is playing a video, video data can be received from[camera:didReceiveVideoData:length:]
ofDJICameraDelegate
and playback state received from[manager:didUpdateVideoPlaybackState:]
ofDJIMediaManagerDelegate
. Video playback throughDJIMediaManager
is fixed at 720p.Declaration
Objective-C
- (void)playVideo:(nonnull DJIMedia *)videoMedia withCompletion:(DJICompletionBlock)block;
Parameters
videoMedia
The video to play.
block
The completion block to receive the command execution result.
-
Video playback resumes the paused video.
Declaration
Objective-C
- (void)resumeWithCompletion:(DJICompletionBlock)block;
Parameters
block
The completion block to receive the command execution result.
-
Pause video playback.
Declaration
Objective-C
- (void)pauseWithCompletion:(DJICompletionBlock)block;
Parameters
block
The completion block to receive the command execution result.
-
The media manager stops the playing video.
Declaration
Objective-C
- (void)stopWithCompletion:(DJICompletionBlock)block;
Parameters
block
The completion block to receive the command execution result.
-
Video playback is skipped to the new position in seconds from the start of the video.
Declaration
Objective-C
- (void)moveToPosition:(float)position withCompletion:(DJICompletionBlock)block;
Parameters
position
New position to play in seconds from start of video. Input with precision of greater than 3 decimal places, will be rounded to 3.
block
The completion block to receive the command execution result.