Forum Replies Created
-
AuthorPosts
-
Sorry for the thread necromancy, but I needed this functionality for one of my sites as well, so I threw together a quick modification to the video shortcode, in enfold/config-templatebuilder/avia-shortcodes/video.php, which adds a media library picker for the ‘poster’ image, and adds the poster to the html5 video tag that gets generated. Diff is below (vs enfold v3.2), and here is a dropbox link to the modified video.php file:
53a54,61
> array(
> “name” => __(“Poster Image”,’avia_framework’),
> “desc” => __(“Enter URL of image to use as placeholder before video starts.”, ‘avia_framework’),
> “id” => “poster”,
> “type” => “image”,
> “title” => __(“Insert Image”,’avia_framework’ ),
> “button” => __(“Insert”,’avia_framework’ ),
> “std” => “”),
133c141
< extract(shortcode_atts(array(‘src’ => ”, ‘src_1’ => ”, ‘src_2’ => ”, ‘autoplay’ => ”, ‘format’ => ”, ‘height’=>’9’, ‘width’=>’16’), $atts, $this->config[‘shortcode’]));
—
> extract(shortcode_atts(array(‘src’ => ”, ‘src_1’ => ”, ‘src_2’ => ”, ‘autoplay’ => ”, ‘format’ => ”, ‘height’=>’9’, ‘width’=>’16’, ‘poster’=>”), $atts, $this->config[‘shortcode’]));
187c195
< $output = avia_html5_video_embed($src);
—
> $output = avia_html5_video_embed($src,”poster=’$poster'”);`- This reply was modified 9 years, 3 months ago by Josh McKee.
-
AuthorPosts