Video properties in RenderScript
Duration
Duration in seconds, or 'media' to match the source video's full length.
Example
"duration": "media",Default
"duration": "media",Source
URL or GUID of the video file.
Example
"source": "https://...",Default
"source": null,Fit
Controls how the video is resized within the element bounds: 'cover' (fills area, may crop), 'contain' (fits entirely, may letterbox), or 'fill' (stretches to fill).
Example
"fit": "contain",Default
"fit": "cover",Video trimming
Extract a portion of the source video. 'trim_start' sets the starting point (seconds), 'trim_duration' limits the extracted length (seconds). Both work together to define the clip boundaries.
Example
"trim_start": 5,
"trim_duration": 10,Defaults
"trim_start": null,
"trim_duration": null,Loop
Repeats the video continuously when it ends. Cannot be used with trim_start or trim_duration properties.
Example
"loop": true,Default
"loop": false,Speed
Playback speed from 50% to 200%. A duration of 'media' is the file's length divided by the speed.
Example
"speed": "150%",Default
"speed": "100%",Volume
Audio volume level from 0% (muted) to 200%, where 100% is the original volume.
Example
"volume": "50%",Default
"volume": "100%",Audio fading
Gradual volume transitions at video boundaries. 'audio_fade_in' creates a fade from silence over the specified duration (seconds) at the start, 'audio_fade_out' fades to silence at the end.
Example
"audio_fade_in": 2,
"audio_fade_out": 2,Defaults
"audio_fade_in": null,
"audio_fade_out": null,