Instance Method

setSession:showVideoPreview:showAudioPreview:

Sets the session represented by this view.

Declaration

- (void)setSession:(AVCaptureSession *)session showVideoPreview:(BOOL)showVideoPreview showAudioPreview:(BOOL)showAudioPreview;

Parameters

session

The session to be represented.

showVideoPreview

Indicates whether the video preview should be shown. If true, capture inputs for video media data will be added, removed, or modified depending on device availability and user selection.

showAudioPreview

Indicates whether the audio preview should be shown. If true, capture inputs for audio media data will be added, removed, or modified depending on device availability and user selection.

Discussion

The view must either show audio preview or video preview or both. Furthermore, the view may modify the capture session, for example, to access media data for preview or when the user select a new capture source. Only the default session is started and stopped automatically. The provided session must be manually started and stopped.

See Also

Configuring a Capture Session

session

A capture session represented by this view.