Skip to main content

Video

Overview

The LMVideo component is designed to handle video playback within the application. It supports various video formats and provides controls for play, pause, and seeking, allowing users to interactively engage with video content.

LMFeedPostContent

Callbacks

  • onCancel: Callback to handle tap events trigerred by on clicking of the cancel button.

Customisation

PropertyTypeDescription
heightnumberHeight of the video.
widthnumberWidth of the video.
videoStyleViewStyleStyle for the video container.
boxFitstretch or contain or cover or noneDefines how the video should fit in the container.
boxStyleViewStyleStyle for the container (box) that holds the video.
aspectRatio0 or 0.1 or 0.2 or 0.3 or 0.4 or 0.5 or 0.6 or 0.7 or 0.8 or 0.9 or 1Aspect ratio of the video.
showControlsbooleanWhether to show the video controls.
loopingbooleanWhether the video should loop.
loaderWidgetReact.ReactNodeCustom loader widget to show while the video is loading.
errorWidgetReact.ReactNodeCustom error widget to show if the video fails to load.
playButtonReact.ReactNodeCustom play button to show for the video.
pauseButtonReact.ReactNodeCustom pause button to show for the video.
autoPlaybooleanWhether the video should autoplay.
showCancelbooleanWhether to show a cancel button for the video view.
onCancelFunctionFunction to execute when the cancel button is pressed.

CancelButton Object

PropertyTypeDescription
textLMTextPropsCustomization for the text in the cancel button.
iconLMIconPropsCustomization for the icon in the cancel button.
onTapFunctionFunction triggered when the cancel button is tapped.
placementstart or endPosition of the icon or text in the cancel button.
buttonStyleViewStyleStyle for the cancel button container.
isClickablebooleanDetermines if the cancel button is clickable.