Video Block
Block name : appmaker/video
You can use this block to display video in a page by placing below code
{
name: 'appmaker/video',
clientId: 'client-id',
attributes: {
url: 'http://example.com/video.mp4',
thumbnail:
'https://example.com/video-placeholder.jpg',
resizeMode: 'cover',
appmakerAction: { action: 'OPEN_CART' },
dimensions: {
height: 1000,
width: 1000,
},
},
},
Attributes:
Attribute Name | Description | Example Values | Required |
---|---|---|---|
url | Video url | Yes | |
thumbnail | An image to display while the video is loading | Image url | No |
resizeMode | Determines how to resize the video when the frame doesn't match the raw video dimensions | none , contain , cover , stretch | No, default: cover |
appmakerAction | Action to perform when the user clicks on the video | { action: 'OPEN_CART' } | No |
dimensions | The original video dimensions. These are used to calculate the in-app video dimensions, which are adjusted based on the width of the mobile screen. | { height: 1000, width: 1000, } | No |