Description
Filter the player settings of a video post. They are used by every embed of the post video, so it is the place to change one setting for all the videos — for example the width. Available since Video Hub 2.3.4.
Parameters
- $option
- (array)(required) Player settings of the post, like
width,aspect_ratio,volume,autoplay,controls,cc_load_policyorcc_lang_pref. - $post_id
- (int)(required) Post ID.
Examples
Give every video the same width.
add_filter( 'cbc_video_settings', function( $option, $post_id ) {
$option['width'] = 960;
return $option;
}, 10, 2 );