Skip to content

Media

Video or image attachment

Name Description
component media
src url of the media (image of video)
attachmentId the dispatch attachment id (optional)
kind type of media (optional), if not defined, will try to determine from the url
autoplay true/false value that would indicate if video is auto play
action action to perform when user tap/click on the button, this can be text such as close and platform
will implement the action or an action object. Some valid actions are
createDispatch, dispatch, etc, with each action provided proper params
child optional child objected that is added into the frame as a Positioned object
options if child is provided optional top, left, right, bottom positions

Actions

Name Description
close close the current screen
object if object is a json object that has target attribute, will invoke the target (see Actions targets below)

Action targets

Name Description
invokeScript invoke a script with options as jsonParams
moveToBucket Move item from one bucket to another, required fromBucketHandle and toBucketHandle in the options attribute

styles.image

Name Description
clipRadius double, radius of clipped container
alignment centerLeft, centerRight, etc, see alignment property of styles
fit contain, fitWidth, fitHeight, etc, see BoxFit
width width of container
height height of container
minHeight min height, usually this should be provided when height is defined
maxHeight max height, usually this should be provided when height is defined

Examples

          {
            "component": "media",
            "kind": "image",
            "src": "{data.image}",
            "styles": {
              "image": {
                "fit": "contain",
                "alignment": "centerLeft",
                "height": 35,
                "minHeight": 35,
                "maxHeight": 35,
                "width": 60
              }
            }
          }

Notes

  1. Should support attachment id