BMPThumbnail
Objective-C
@interface BMPThumbnail : NSObject <_BMPJsonEncodable>
Swift
class Thumbnail : NSObject, _JsonEncodable
Represents a VTT thumbnail.
-
The start time of the entry
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval start;Swift
var start: TimeInterval { get } -
The end time of the entry
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval end;Swift
var end: TimeInterval { get } -
The raw cue data of the entry
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull text;Swift
var text: String { get } -
The URL of the spritesheet
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSURL *_Nonnull url;Swift
var url: URL { get } -
The horizontal offset of the thumbnail in its spritesheet
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger x;Swift
var x: UInt { get } -
The vertical offset of the thumbnail in its spritesheet
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger y;Swift
var y: UInt { get } -
The width of the thumbnail
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger width;Swift
var width: UInt { get } -
The height of the thumbnail
Declaration
Objective-C
@property (nonatomic, readonly) NSUInteger height;Swift
var height: UInt { get } -
Creates a new Thumbnail based on the given spritesheet URL and position in combination with start and end time. The offsets x and y represent the position of the thumbnail in the given spritesheet.
Declaration
Objective-C
- (nonnull instancetype)initWithStart:(NSTimeInterval)start end:(NSTimeInterval)end text:(nonnull NSString *)text url:(nonnull NSURL *)url x:(NSUInteger)x y:(NSUInteger)y width:(NSUInteger)width height:(NSUInteger)height;Swift
init(start: TimeInterval, end: TimeInterval, text: String, url: URL, x: UInt, y: UInt, width: UInt, height: UInt)Parameters
startThe start time of this thumbnail.
endThe end time of this thumbnail.
textThe raw cue data of this thumbnail.
urlThe spritesheet’s URL.
xThe horizontal offset of this thumbnail in its spritesheet.
yThe vertical offset of this thumbnail in its spritesheet.
widthThe actual width of this thumbnail.
heightThe actual height of this thumbnail.
Return Value
A new instance of BMPThumbnail initialized with the given properties.
BMPThumbnail Class Reference