JWCue

@objcMembers
public final class JWCue : NSObject, JWJSONCodable, JWInitializableFromJSON

Defines a point of interest in the content.

  • id

    Undocumented

    Declaration

    Swift

    public let id: String?
  • When the cue begins, defined by a number of seconds after the beginning of the content.

    Declaration

    Swift

    public let begin: JWCueTime
  • end

    When the cue ends, defined by a number seconds after the beginning o the content.

    Declaration

    Swift

    public let end: JWCueTime?
  • Text to display in the timeline.

    Declaration

    Swift

    public let text: String
  • The type of cue.

    Declaration

    Swift

    public let type: JWCueType
  • Equality testing.

    Declaration

    Swift

    public static func == (lhs: JWCue, rhs: JWCue) -> Bool

    Parameters

    lhs

    The lefthand value.

    rhs

    The righthand value.

  • Undocumented

    Declaration

    Swift

    public override func isEqual(_ object: Any?) -> Bool

JWJSONCodable

  • Initializes a JWCue representation of a JSONObject.

    The JSONObject is expected to have the following values. If required properties are not found within the JSONObject, this initializer returns nil.

    “begin” Double or String

    If this is a Double, it represents a number of seconds from the beginning of the content, otherwise if it is a String, it represents a position defined by a pecentage of the duration, and is of the format "{percent}%".

    “cueType” String

    Valid values are "chapters" and "ads".

    “end” Double or String

    If this is a Double, it represents a number of seconds from the beginning of the content, otherwise if it is a String, it represents a position defined by a pecentage of the duration, and is of the format "{percent}%".

    “text” String

    The text for the queue.

    Declaration

    Swift

    public init?(from json: JSONObject)

    Return Value

    A JWCue object, or nil if it does not succeed.

  • Declaration

    Swift

    public func toJSONObject() -> JSONObject
  • Calling this method converts a JSONObject into a JWCue.

    The JSONObject is expected to have the following values. If required properties are not found within the JSONObject, this method return nil.

    “begin” Double or String

    If this is a Double, it represents a number of seconds from the beginning of the content, otherwise if it is a String, it represents a position defined by a pecentage of the duration, and is of the format "{percent}%".

    “cueType” String

    Valid values are "chapters" and "ads".

    “end” Double or String

    If this is a Double, it represents a number of seconds from the beginning of the content, otherwise if it is a String, it represents a position defined by a pecentage of the duration, and is of the format "{percent}%".

    “text” String

    The text for the queue.

    Declaration

    Swift

    public static func from(json: JSONObject) -> `Self`?

    Return Value

    A JWCue object, or nil if it does not succeed.