@express-document-sdk / IMediaContainerNode
Interface: IMediaContainerNode
Interface for nodes that contain media.
Accessors
maskShape
• get
maskShape(): INodeBounds
A read-only view of the mask shape used for cropping/clipping the media.
Returns
mediaRectangle
• get
mediaRectangle(): ImageRectangleNode
| UnknownMediaRectangleNode
The rectangular node representing the entire, uncropped bounds of the media (e.g. image, GIFs, or video). The media's position and rotation can be changed, but it cannot be resized yet via this API. Media types other than images will yield an UnknownMediaRectangleNode object for now.
Returns
ImageRectangleNode
| UnknownMediaRectangleNode
Methods
replaceMedia()
• replaceMedia(media
): void
Replace existing media inline. The new media is sized to completely fill the bounds of the existing maskShape; if the media's aspect ratio differs from the maskShape's, the media will be cropped by the maskShape on either the left/right or top/bottom edges. Currently only supports images as the new media, but previous media can be of any type.
Parameters
• media: BitmapImage
New content to display. Currently must be a BitmapImage.
Returns
void