Protocols
The following protocols are available globally.
-
Authentification handler protocol One instance per SDK that controlls the access. Use
TraceVisionFactory.shared.getAuthHandler()to get the instanceSee moreNote
This is used for authenticating users in the TraceVision apps, please ignore.Declaration
Swift
public protocol AuthHandlerProtocol -
Common result of any operation, usually async
See moreDeclaration
Swift
public protocol OperationResult -
A protocol that defines a reader of HighlightObjects
See moreDeclaration
Swift
public protocol HighlightReaderProtocol -
Protocol to create and handle a video session
Video session should be used to process one video The video can be recorded or uploaded from local file URL usually from the camera roll
See moreNote
you can’t mix recording and importing in one sessionDeclaration
Swift
public protocol VideoSessionProtocol -
Protocol for a video session that can be recorded
This session has a video recorder that can be controlled to start/stop the recording with the rear camera. You can configure the session to record full video and save it to camera roll or just record the highlights. Highlights can also be exported to camera roll or viewed with this SDK
See moreDeclaration
Swift
public protocol VideoRecordSessionProtocol : VideoRecorderProtocol, VideoSessionProtocol -
Protocol for a video session that can be imported
Create this type of session for every video file that should be processed. Video file should be accessible for within the app.
See moreDeclaration
Swift
public protocol VideoImportSessionProtocol : VideoSessionProtocol -
Protocol for a video session that can be processed frame by frame
This is a low level highlight processing session that can be used to process video frames one by one. You should obtain the video frame in any way you want and call
processFramemethod to process it. Sequence of calls to process the video:start()to start processingprocessFrame(buffer)for every frame of the videostop()to stop processing and finalize the results
See moreNote
Listen tostatus.highlightsobservable property to get the highlights found in the video.Declaration
Swift
public protocol VideoByFrameSessionProtocol : VideoSessionProtocol -
Protocol to record a video with the rear camera.
Provides control over the recording process and camera preview. You can access the current state of the recording with
statusobservable property.The sequence of calls should be as follows:
initVideoRecorder(orientation)(usually onAppear and orientation change) call to init the rear camera and start receiving the preview into thepreviewLayerstartRecording()when the user presses the record button. This will start supplying the video frames to the recording session
When done:
stopRecording()when the user presses the stop button. Recording stops butpreviewLayercontinues to show the camera viewstopVideoRecorder()(usually onDisappear) to stop the preview and shutdown the camera
Declaration
Swift
public protocol VideoRecorderProtocol
Protocols Reference