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
start
The start time of this thumbnail.
end
The end time of this thumbnail.
text
The raw cue data of this thumbnail.
url
The spritesheet’s URL.
x
The horizontal offset of this thumbnail in its spritesheet.
y
The vertical offset of this thumbnail in its spritesheet.
width
The actual width of this thumbnail.
height
The actual height of this thumbnail.
Return Value
A new instance of BMPThumbnail initialized with the given properties.