Inherits from OlapicEntity : NSObject
Declared in OlapicMediaEntity.h

Overview

Represents media on the SDK

Properties

originalSize

The size of the original image (in case it’s not a video)

@property (nonatomic) CGSize originalSize

Declared In

OlapicMediaEntity.h

uploader

The media uploader information

@property (nonatomic, strong) OlapicUploaderEntity *uploader

Declared In

OlapicMediaEntity.h

Instance Methods

getImageWithSize:onSuccess:onFailure:

Download a media image to an UIImage

- (void)getImageWithSize:(OlapicMediaImageSize)size onSuccess:(void ( ^ ) ( NSData *mediaData , UIImage *mediaImage ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

size

The media image size

success

A callback block for when the image is successfully retrieved

failure

A callback block for when the SDK can’t get the image

Availability

v1.0

Declared In

OlapicMediaEntity.h

getMediaURLForImageSize:

Get the URL of one of the sizes of the media if it’s an image

- (NSString *)getMediaURLForImageSize:(OlapicMediaImageSize)size

Parameters

size

The image size

Return Value

NSString with the image URL

Availability

v1.0

Declared In

OlapicMediaEntity.h

getRelatedStreams:onFailure:

Get streams related to this media

- (void)getRelatedStreams:(void ( ^ ) ( NSDictionary *streams ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

success

A callback block for when the streams are successfully retrieved

failure

A callback block for when the SDK can’t get the streams

Availability

v1.0

Declared In

OlapicMediaEntity.h

getUploader:onFailure:

Get an uploader entity from a media

- (void)getUploader:(void ( ^ ) ( OlapicUploaderEntity *uploader ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

success

A callback block for when the uploader is successfully retrieved

failure

A callback block for when the SDK can’t get the uploader

Availability

v1.0

Declared In

OlapicMediaEntity.h

isVideo

Check if the media is a video

- (BOOL)isVideo

Return Value

BOOL

Availability

v1.0

Declared In

OlapicMediaEntity.h

report:onSuccess:onFailure:

Report this media

- (void)report:(NSDictionary *)metadata onSuccess:(void ( ^ ) ( void ))success onFailure:(void ( ^ ) ( NSError *error ))failure

Parameters

metadata

A list with the report information

  • email: The email of the user who wants to report the media
  • reason: The reason why the media will be reported
success

A callback block for when the media is successfully reported

failure

A callback block for when the SDK can’t report the media

Availability

v1.0

Declared In

OlapicMediaEntity.h