Video
This page provides information on using the Video widget, which allows playback of various URLs, including file paths, YouTube, Facebook, Twitch, SoundCloud, Streamable, Vimeo, Wistia, Mixcloud, and DailyMotion.
Content properties
These properties are customizable options present in the property pane of the widget, allowing users to modify the widget according to their preferences.
Data
URL string
Allows you to set the video source to be played, supporting both URL and IPv4-based addresses:
Example:
- IP Based:
127.0.0.10:8080/path/to/video.mp4
- URL Based:
https://assets.appsmith.com/widgets/bird.mp4
You can display dynamic data by binding the response from a query or a JavaScript function to the URL property. For instance, if you have a table with a column containing video URLs, clicking on a specific row plays the corresponding video:
Example:
{{Table1.selectedRow.videoURL}}
General
Auto Play boolean
Allows you to play the video automatically on page load, without requiring any action from the user. Default value is false
.
Visible boolean
Controls the visibility of the widget. If you turn off this property, the widget would not be visible in View Mode. Additionally, you can use JavaScript by clicking on JS next to the Visible property to conditionally control the widget's visibility. The default value for the property is true
.
For example, if you want to make the widget visible only when the user selects "Yes" from a Select widget, you can use the following JavaScript expression:
{{Select1.selectedOptionValue === "Yes"}}