I have a video iframe it's can be youtube , vimeo etc
$iframe = get_field($field, $id);
if(empty($iframe)){
return;
}
preg_match('/src="(.+?)"/', $iframe, $matches);
$src = $matches[1];
$params = array(
'controls' => 1,
'hd' => 1,
'autohide' => 1,
'autoplay' => $set_auto,
);
apply_filters( 'video_parameters', $params );
$new_src = add_query_arg($params, $src);
$iframe = str_replace($src, $new_src, $iframe);
$attributes = 'frameborder="0"';
$iframe = str_replace('></iframe>', ' ' . $attributes . '></iframe>', $iframe);
echo $iframe;
As per documentation i have to use this wp_filter_oembed_result() but i dont know how ..please help