I had to alter the source of the plugin to add this for my clients – it’s a simple change, hopefully this will be added so I don’t have to keep track of plugin updates.
I had to alter the source of the plugin to add this for my clients – it’s a simple change, hopefully this will be added so I don’t have to keep track of plugin updates.
Were you unable to add it as an add-on plug-in to the BC Video Connect plug-in?
I didn’t bother making it a plugin, it’s like two lines – I just diff when a new version comes out and re-add it.
@bcolflesh – Let us know what changes you are making and we will look into adding incorporating it.
WinMerge patch file for class-bc-utility.php:
804a805
> * @param string $autoStart Autoplay setting.
808c809
< public static function player( $type, $id, $account_id, $player_id = ‘default’, $width = 0, $height = 0 ) {
—
> public static function player( $type, $id, $account_id, $player_id = ‘default’, $width = 0, $height = 0, $autostart = ” ) {
816a818,822
> $autoStart = $autostart;
>
> if($autostart == “true”){
> $autoStart = “autoplay”;
> }
838c844
< ‘<iframe src=”//players.brightcove.net/%s/%s_default/index.html?%sId=%s” allowfullscreen=”” webkitallowfullscreen=”” mozallowfullscreen=”” style=”width: %s; height: %s;%s”></iframe>’,
—
> ‘<iframe src=”//players.brightcove.net/%s/%s_default/index.html?%sId=%s&%s” allowfullscreen=”” webkitallowfullscreen=”” mozallowfullscreen=”” style=”width: %s; height: %s;%s”></iframe>’,
842a849
> $autoStart,
-
This reply was modified 7 years, 4 months ago by bcolflesh. Reason: add file name
WinMerge patch file for class-bc-video-shortcode.php:
31a32
> ‘autostart’ => ”,
36c37
< return BC_Utility::player( ‘video’, $atts[‘video_id’], $atts[‘account_id’], $atts[‘player_id’], $atts[‘width’], $atts[‘height’] );
—
> return BC_Utility::player( ‘video’, $atts[‘video_id’], $atts[‘account_id’], $atts[‘player_id’], $atts[‘width’], $atts[‘height’], $atts[‘autostart’] );
Thanks! We’ll take a look at incorporating it.
Tim
Is there no way to use a shortcode attribute to get the videos to autoplay with this plugin? Editing the plugin file and updating that after each plugin update is bad practice, surely the plugin maker has a feature to get autoplay to work?
We have a dev project underway to add more configurability to the player embed including enabling/disabling autoplay. We hope to have it complete in the July/August timeframe.