VideoImportSessionProtocol
public protocol VideoImportSessionProtocol : 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.
-
import video from a file on local disk
Declaration
Swift
@discardableResult func importVideo(fromFile: URL, useInPlace: Bool) -> VideoImportSessionProtocol -
Start reading and processing the imported video
Process the video within the given time range from
offsettooffset + duration. Observestatus.processingproperty to see if processing is finishedNote
the resultingHighlightObjectwill have the offset relative to the givenoffset, not the start of the video.Declaration
Swift
func start(offset: TimeInterval, duration: TimeInterval)Parameters
offsetoffset in seconds where to start processing the video
durationduration in seconds to process the video
-
start reading and processing the imported video
Observe
status.processingproperty to see if processing is finishedDeclaration
Swift
func start() -
stop video processing before it actually ended
use this function if you want to interrupt video processing before it finishes by itself, i.e before reading and processing all the frames.
Declaration
Swift
func stop() -
Set
VideoImportStatusobject to get processing updates or use the existingstatuspropertyDeclaration
Swift
func setStatusObject(_ obj: VideoImportStatus)Parameters
objVideoImportStatusobject to be updated -
current status of the video import
Declaration
Swift
var status: VideoImportStatus { get }
VideoImportSessionProtocol Protocol Reference