Link to plugin page: https://zeroqode.com/plugin/1689629086272x259608008752609800
Demo to preview the plugin:
Introduction
Get the media duration of a video or audio file before uploading it.
Supported formats:
AVI, mp3, mp4, mpeg, ogg
Plugin Element Properties
The plugin contains a Media Duration visual element that should be used on a page.
Element Actions
1. Select and Check -ย creates a file input field for the user to select a file and a video element to load the media for duration analysis. It handles file input changes, computes the duration of the selected media file, and publishes the duration in both seconds and minutes.Supported formats: avi,mp3,mp4,mpeg,ogg
- Upload - handles file uploads by converting a selected file to Base64 and then sending it to a server endpoint to be stored. Upon successful upload, the function updates the Bubble application's state with the URL of the uploaded file and triggers an event.
Exposed states
Name | Description | Type |
Duration in Seconds | The duration of the media file in seconds. | Number |
Duration in Minutes | The duration of the media file in minutes, calculated from the seconds. | Number |
Uploaded urlย | The URL of the uploaded file, made available to the Bubble application after a successful upload. | Text |
File Size | The size of the selected file | Text |
Element Events
Name | Description |
Duration | An event that is triggered after the media file's duration is successfully computed and published. |
File uploaded | An event triggered when the file upload is completed successfully. |
Workflow example
- Place the Media Duration visual element on the page
- Use the Select and check media action
- Use the returned states to display the media file duration