The standard Bricks video element accepts several Sources:

- YouTube
- Vimeo
- Media
- File URL
- Dynamic Data
I just want to know how to use the Dynamic Data option.
I was expecting to be able to supply a string like “YouTube” or “Vimeo” in order to configure the element dynamically, but this doesn’t seem to work. The documentation is very lacking and does not describe what values are expected.
Any help gratefully received - thanks.
You may try this.
add_filter( 'bricks/element/settings', function( $settings, $element ) {
if ( $element->name === 'video' && $element->id === 'VIDEO ELEMENT ID HERE' ) {
// replace 'field_name' (ACF)
$video_type = strtolower(get_field('field_name', get_the_ID()));
/*
* or use get_post_meta
* replace 'key_name'
*/
// $video_type = strtolower(get_post_meta(get_the_ID(), 'key_name', true));
if ( !empty($video_type) && in_array($video_type, ['youtube', 'vimeo']) ) {
$settings['videoType'] = sanitize_text_field($video_type);
}
}
return $settings;
}, 10, 2 );