Contents

addClipBufferingOutput(_:)

Declaration

func addClipBufferingOutput(_ clipBufferingOutput: SCClipBufferingOutput) throws

Parameters

  • clipBufferingOutput:

    A SCClipBufferingOutput object

Discussion

Add a SCClipBufferingOutput to the SCStream to start clip buffering. Samples will begin accumulating in a rolling buffer that retains the most recent content up to 15 seconds.

Returns a BOOL denoting if the add was successful. The stream must be actively capturing before clip buffering can be started. Only one clip buffering session can be active on a stream at a time. Once buffering is active, clips can be exported using the SCClipBufferingOutput’s exportClipToURL:duration:completionHandler: method. Media to be buffered is based on the SCStream configuration.