OTVEvent
public class OTVEvent : NSObject
An instance of a player event
-
Initailize
OTVEvent
instance with parametersDeclaration
Swift
@objc public init(timestamp: Date, type: String, command: String, extra: String?)
Parameters
timestamp
the timestamp of the event
type
the type of the event. SDK generated events will have types from
EventType
command
the command of the event. SDK generated events will have commands from
EventCommand
extra
optional extra information for the event. SDK generated events will have extras formatted as a JSON string, with keys from
ExtraKey
Return 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
EventType
Declaration
Swift
public let type: String
-
The command of the event. SDK generated events will have commands from
EventCommand
Declaration
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
ExtraKey
Declaration
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
dict
a dictionary of values for the JSON string