HighlightObject
public struct HighlightObject : Equatable, Hashable, Comparable, Codable
A struct that represents a single highlight (event) in the video associated with a single person
-
Comparable implementation
Declaration
Swift
public static func < (lhs: HighlightObject, rhs: HighlightObject) -> Bool -
Equatable implementation
Declaration
Swift
public static func == (lhs: HighlightObject, rhs: HighlightObject) -> Bool -
Hashable implementation
Declaration
Swift
public func hash(into hasher: inout Hasher) -
the unique id of the highlight
Note
this id is set only if the highlight is saved in the SDK, i.e was processed with video results. Metadata only highlights will have this set tonil.Declaration
Swift
public var id: Int64? -
the frame number and offset corresponding to the start of the highlight (startFrame = {first event frame} - startFrameBuffer)
Declaration
Swift
public var startFrame: FrameInfo -
the frame number and offset corresponding to the end of the highlight (endFrame = {last event frame} + endFrameBuffer)
Declaration
Swift
public var endFrame: FrameInfo -
The detected jersey number for the track corresponding to the highlight
Declaration
Swift
public var jerseyNumber: Int? -
the frame number and offset corresponding to the start of the chunk within the original video
Declaration
Swift
public var chunkStartFrame: FrameInfo -
video chunk name that contains this highlight
to get the full url to this chunk, use
chunkURLDeclaration
Swift
public var chunkName: String? -
the date when this highlight was recorded
Declaration
Swift
public var dateRecorded: Date -
the date when this highlight was created (i.e processed)
Declaration
Swift
public var dateCreated: Date? -
the url to the chunk that contains this highlight
Declaration
Swift
public var chunkURL: URL { get } -
a sequence of bounding boxes for the player track corresponding to the highlight
Declaration
Swift
public var playerBboxHistory: [TimedBBox] -
time range covered by this highlight within the video chunk
Declaration
Swift
public var timeRange: CMTimeRange { get } -
the group name for this highlight
Note
This is used to group highlights together. All highlights processed in the same session have the same groupDeclaration
Swift
public var group: String -
Undocumented
Declaration
Swift
public var thumbnailURL: URL { get } -
saveVideo(toCameraRoll:AsynchronouscropFormat: debug: ) Save the video of the highlight to the local file and to the camera roll
Declaration
Swift
@discardableResult public func saveVideo(toCameraRoll: Bool, cropFormat: HighlightCropFormat = .landscape, debug: Bool = false) async -> URL?Parameters
toCameraRollsave the video to the camera roll
cropFormatcrop the video to the given proportion
debugif true, save the video with debug information, i.e bounding boxes
Return Value
the url to the saved video
-
Undocumented
Declaration
Swift
public func videoAnimationPoints(videoSize: CGSize, visibleSize: CGSize, duration: Double) -> ([NSNumber], [Double], [CGPoint])
HighlightObject Structure Reference