VideoMedia

@interface VideoMedia : VoucherMedia

VideoMedia is a VouchrMedia for videos.

  • The data of the video. Can be used for caching the video data, or saving the video data before it has been uploaded.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSData *videoData;

    Swift

    var videoData: Data? { get }
  • Thumbnail data for saving the thumbnail image pre-upload or for caching. Shown before a video plays / the video is buffering.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) NSData *thumbnailData;

    Swift

    var thumbnailData: Data? { get }
  • Initializer for VideoMedia.

    Declaration

    Objective-C

    + (nonnull instancetype)videoMediaWithData:(nullable NSData *)videoData
                                 thumbnailData:(nonnull NSData *)thumbnailData
                                videoUrlString:(nullable NSString *)videoUrlString;

    Swift

    convenience init(data videoData: Data?, thumbnailData: Data, videoUrlString: String?)

    Parameters

    videoData

    - The data of the video.

    thumbnailData

    - The data of the thumbnail image.

    videoUrlString

    - The url string of a video.

    Return Value

    Instance of VideoMedia.

  • Initializer for VideoMedia.

    Declaration

    Objective-C

    + (nonnull instancetype)videoMediaWithDictionary:
        (nonnull NSDictionary *)dictionary;

    Parameters

    dictionary

    - Dictionary form of a VideoMedia.

    Return Value

    Instance of VideoMedia.

  • Sets videoData for VideoMedia.

    Declaration

    Objective-C

    - (void)videoDataWithUrlString:(nonnull NSString *)urlString;

    Swift

    func videoData(withUrlString urlString: String)

    Parameters

    urlString

    - URL string used to create the video data for a VideoMedia.

  • Sets thumbnailData for VideoMedia.

    Declaration

    Objective-C

    - (void)thumbnailDataWithUrlString:(nonnull NSString *)urlString;

    Swift

    func thumbnailData(withUrlString urlString: String)

    Parameters

    urlString

    - URL string used to create the thumbnail data for a VideoMedia.

  • Determines if the VideoMedia is a localFile or remote.

    Declaration

    Objective-C

    - (BOOL)isLocalFile;

    Swift

    func isLocalFile() -> Bool

    Return Value

    YES if the file is local, NO otherwise.