# new MediaAttachment(params)
Creates a new MediaAttachment
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
object | Object with parms
Properties
|
- Source:
Methods
# (static) withBase64Image(image) → {MediaAttachment}
Creates media attachment instance with Base64 image.
Parameters:
Name | Type | Description |
---|---|---|
image |
string | Uri of the image. |
- Source:
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. |
- Source:
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. |
- Source:
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. |
- Source:
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. |
- Source:
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. |
- Source:
Returns:
Created media attachment instance.
- Type
- MediaAttachment
# getImageUrl() → {string}
Returns image url.
- Source:
Returns:
Image url.
- Type
- string
# getVideoUrl() → {string}
Returns video url.
- Source:
Returns:
Video url.
- Type
- string