Media Node

Media is an images, videos, or audio file embedded into your app.

By default, Dynaboard will automatically discover the appropriate media player to use. You can also explicitly specify the type.

Properties

Visible

PropmediaNode.isVisible
Typeboolean
Default{{true}}

Whether or not this node is visible.

Enabled

PropmediaNode.isEnabled
Typeboolean
Default{{true}}

Whether or not this node is enabled.

Tooltip

PropmediaNode.tooltip
Typestring
Defaultundefined

The tooltip text to display when hovered or focused over this node.

Top

PropmediaNode.top
Typestring
Default1

The position of the node from the top side of the grid (grid-row-start).

Left

PropmediaNode.left
Typestring
Default1

The position of the node from the left side of the grid (grid-column-start).

Width

PropmediaNode.width
Typestring
Default100px

The width of the node. When this node is in a grid layout, this should be done using unitless grid column units (specifying 4 will become grid-column-end: span 4). When this node is in a stack layout, the width must be specified using CSS units (e.g. 100px or 100%).

Min Width

PropmediaNode.minWidth
Typestring
Defaultnone

The minimum width of the node. When this node is in a grid layout, this property is ignored.

Max Width

PropmediaNode.maxWidth
Typestring
Defaultnone

The maximum width of the node. When this node is in a grid layout, this property is ignored.

Height

PropmediaNode.height
Typestring
Default100px

The height of the node. When this node is in a grid layout, this should be done using unitless grid row units (specifying 4 will become grid-row-end: span 4). When this node is in a stack layout, the height must be specified using CSS units (e.g. 100px or 100%).

Min Height

PropmediaNode.minHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Max Height

PropmediaNode.maxHeight
Typestring
Defaultnone

The minimum height of the node. When this node is in a grid layout, this property is ignored.

Overflow

PropmediaNode.overflow
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal and vertical axes for content that is larger than its container.

Overflow X

PropmediaNode.overflowX
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the horizontal axis for content that is larger than its container.

Overflow Y

PropmediaNode.overflowY
TypeOverflow ('auto' | 'visible' | 'hidden' | 'scroll')
Defaultauto

The strategy used to handle overflow in the vertical axis for content that is larger than its container.

Custom Styles

PropmediaNode.styles
Typestring
Defaultelement.styles { }

Custom CSS styles to be applied to the node. Use element.styles to refer to the current node.

URL

PropmediaNode.url
Typestring
Defaulthttps://placekitten.com/g/200/200

URL of media resource to display.

Alternative Text

PropmediaNode.alt
Typestring
Defaultundefined

The alternative text to use instead of media resource on assistive devices.

Type

PropmediaNode.type
TypeMediaResourceType ('auto' | 'image' | 'video' | 'audio')
Defaultauto

The type of media to be displayed. When set to auto (the default), the media type will be guessed automatically.

Disabled

PropmediaNode.isDisabled
Typeboolean
Default{{false}}

Whether or not the media player is disabled.

Event Handlers

On Load

HandlermediaNode.onLoad

Called when the media has loaded.

On Error

HandlermediaNode.onError

Called when there was an error while loading or playing the media.

On Play

HandlermediaNode.onPlay

Called when the media has started playing.

On Pause

HandlermediaNode.onPause

Called when the media has paused.