MediaAttachment

MediaAttachment

# new MediaAttachment(params)

Creates a new MediaAttachment
Parameters:
Name Type Description
params object Object with parms
Properties
Name Type Attributes Description
imageUrl string <optional>
Image URL
videoUrl string <optional>
Video URL
base64Image string <optional>
Base64 Image
base64Video string <optional>
Base64 Video
imageFile File <optional>
Image File
videoFile File <optional>
Video File

Methods

# (static) withBase64Image(image) → {MediaAttachment}

Creates media attachment instance with Base64 image.
Parameters:
Name Type Description
image string Uri of the image.
Returns:
Created media attachment instance.
Type
MediaAttachment

# (static) withBase64Video(video) → {MediaAttachment}

Creates media attachment instance with Base64 video.
Parameters:
Name Type Description
video string Uri of the video.
Returns:
Created media attachment instance.
Type
MediaAttachment

# (static) withImageFile(file) → {MediaAttachment}

Creates media attachment instance with File image.
Parameters:
Name Type Description
file File Image file.
Returns:
Created media attachment instance.
Type
MediaAttachment

# (static) withImageUrl(imageUrl) → {MediaAttachment}

Creates media attachment instance with image url.
Parameters:
Name Type Description
imageUrl string Url of the image.
Returns:
Created media attachment instance.
Type
MediaAttachment

# (static) withVideoFile(file) → {MediaAttachment}

Creates media attachment instance with File video.
Parameters:
Name Type Description
file File Video file.
Returns:
Created media attachment instance.
Type
MediaAttachment

# (static) withVideoUrl(videoUrl) → {MediaAttachment}

Creates media attachment instance with video url.
Parameters:
Name Type Description
videoUrl string Url of the video.
Returns:
Created media attachment instance.
Type
MediaAttachment

# getImageUrl() → {string}

Returns image url.
Returns:
Image url.
Type
string

# getVideoUrl() → {string}

Returns video url.
Returns:
Video url.
Type
string