OTVEvent
public class OTVEvent : NSObject
An instance of a player event
-
Initailize
OTVEventinstance with parametersDeclaration
Swift
@objc public init(timestamp: Date, type: String, command: String, extra: String?)Parameters
timestampthe timestamp of the event
typethe type of the event. SDK generated events will have types from
EventTypecommandthe command of the event. SDK generated events will have commands from
EventCommandextraoptional extra information for the event. SDK generated events will have extras formatted as a JSON string, with keys from
ExtraKeyReturn Value
an event instance
-
The time at which the event occurred
Declaration
Swift
public let timestamp: Date -
The type of the event. SDK generated events will have types from
EventTypeDeclaration
Swift
public let type: String -
The command of the event. SDK generated events will have commands from
EventCommandDeclaration
Swift
public let command: String -
Optional extra information for the event. SDK generated events will have extras formatted as a JSON string, with keys from
ExtraKeyDeclaration
Swift
public let extra: String? -
Returns a Dictionary representing any JSON in the extra property
Declaration
Swift
public func parseExtra() -> [String : Any?]? -
Utility function to generate a JSON string for the extra property
Declaration
Swift
public static func buildExtra(_ dict: [String : Any?]) -> String?Parameters
dicta dictionary of values for the JSON string