SCVideoStreamAnalysisChangeHandler
A handler your app provides to receive video-stream analysis results.
Declaration
typedef void (^)(SCSensitivityAnalysis *, NSError *) SCVideoStreamAnalysisChangeHandler;Discussion
Your app implements this handler and the framework calls it when the analyzer’s video stream detects sensitive content, or when the analyzer encounters an error providing analysis or an error in input parameters.
This handler receives an instance of SCSensitivityAnalysis, and an Error, as in the following example:
analyzer.analysisChangedHandler = { analysis, error in
self.analysis = analysis
if analysis.shouldInterruptVideo {
// ...
}
if analysis.shouldIndicateSensitivity {
// ...
}
if analysis.shouldMuteAudio {
// ...
}
}