Title: Working with video shortcodes
Last modified: August 30, 2016

---

# Working with video shortcodes

 *  Resolved [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/)
 * Steve,
 * I note that this plugin doesn’t work with video shortcodes. I develop the popular
   YouTube Embed plugin and am currently working on another video embedding plugin.
   As a user of this plugin myself, I was wondering if there was a way to add in
   the compatibilty? In other words, is there a way I can hook my plugins into Lazy
   Load so that they work, or is it a consequence of the way that shortcodes are
   actioned by WordPress?
 * Thanks,
    David.
 * [https://wordpress.org/plugins/a3-lazy-load/](https://wordpress.org/plugins/a3-lazy-load/)

Viewing 9 replies - 1 through 9 (of 9 total)

 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6201942)
 * **Hello David**
 * Thanks for reaching out. Will download your video Embed plugin next week and 
   see what has to be done to add compatibility and let you know. It works with 
   shortcodes action by WordPress – no problems but will take a look at your plugin
   and give you the exact code you need to add for full compatibility between our
   2 plugins.
 * Have a great weekend
 * Steve
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6201946)
 * Thanks Steve. I’m also working on a much bigger video plugin, so I can then ensure
   that has the same compatibility “out of the box” too. Naturally in both cases
   I’ll promote the compatibility with your plugin too, which might help you too
   🙂
 * David.
 *  Plugin Contributor [Nguyen Tuan](https://wordpress.org/support/users/nguyencongtuan/)
 * (@nguyencongtuan)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202017)
 * **Hi David**
 * I’m lead developer from **a3rev**
 * First, thanks for you are using this plugin, i also have download and install
   your Youtube Embed plugin, i’m really like your plugin.
 * Yes, we don’t apply lazy load with all shortcodes from themes and another plugins,
   so it also does not work for your video shortcodes , but it still work for default
   shortcodes from WP. The reason we don’t support images/videos show from shortcodes
   so that it will have big problem with the slider/gallery plugins
 * But the lazy load plugin support some filter tags for themes or plugins can use
   to filter output content before show on frontend, below are 3 filter tags that
   we check if they are defined on themes or plugins:
 *     ```
       'a3_lazy_load_html' tag : apply lazy load for all what we support as image, video, Facebook iframe, twitter iframe, ...
       'a3_lazy_load_images' tag: apply lazy load for images only
       'a3_lazy_load_videos' tag: apply lazy load for videos, iframe
       ```
   
 * For example the code like
 * > `return $your_output_content`
 * then update it to
 * > `return apply_filters( 'a3_lazy_load_html', $your_output_content );`
 * I have look on your plugin code version 3.3.2 and see that you just need to change
   bit on your plugin code to it compatibility with a3 Lazy Load
 * **\* Update on line 147 path includes/shortcodes.php**
 * > `return do_shortcode( $youtube_code );`
 * to
 * > `return apply_filters( 'a3_lazy_load_html', do_shortcode( $youtube_code ) );`
 * **\* Update on line 59 path includes/generate-widgets.php**
 * >  `echo vye_generate_youtube_code ( $instance[ 'id' ], ... );`
 * to
 * > `echo apply_filters( 'a3_lazy_load_html', vye_generate_youtube_code ( $instance['
   > id' ], ... ) );`
 * Also want to tell you that current a3 Lazy Load just support videos loaded from`
   <iframe>, <embed>, <video>` tags . That mean that it just support for default
   type IFrame from your plugin settings, it does not support for another types 
   so that i checked and see they are using <object> tag. So to make it full compatibility
   between 2 plugins, you should change it to `<embed> or <video>` if can, or a3
   Lazy Load need to support the `<object>` tag ( Actual we don’t want to support
   <object> tag, for now, video usually use `<video> or <iframe> or <embed`> )
 * Regards,
    Nguyen
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [11 years, 3 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202022)
 * Many thanks Nguyen – I’ll get that implemented 🙂
 * David.
 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202146)
 * **Hi David,**
 * Yesterday we released a3 lazy Load [version 1.4.0](https://wordpress.org/plugins/a3-lazy-load/changelog/)
   which has the upgrade to our new plugin framework mobile first admin interface.
   As a fellow developer we think you will find what we have made with the a3 Plugin
   Framework interesting.
 * David if you let us know when you release your Youtube Embeded a3 Lazy Load compatibility
   version we will update Lazy Load plugin description to say it is 100% compatible
   with your plugin with a link to it from the description page.
 * Regards
    Steve
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202149)
 * Many thanks Steve – looking forward to swatting up on it!
 * David.
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202231)
 * Hi Steve,
 * Just to let you know, I’ve pushed out version 4.1 of YouTube Embed and it has
   the necessary changed in it to support a3 lazy load.
 * [https://wordpress.org/plugins/youtube-embed/](https://wordpress.org/plugins/youtube-embed/)
 * Thanks,
    David.
 *  Plugin Author [Steve Truman](https://wordpress.org/support/users/a3rev/)
 * (@a3rev)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202232)
 * **Hi David**
 * Sorry I have not replied before hand – you know WordPress 4.4 test and updates
   and all of that.
 * Thank you for the link on you plugins description. Along with a3 lazy load v 
   1.5 just released we have added an item about Compatibility with Youtube Embed
   on the [plugins description](https://wordpress.org/plugins/a3-lazy-load/) and
   linked to your page.
 * Regards
    Steve
 *  Thread Starter [David Artiss](https://wordpress.org/support/users/dartiss/)
 * (@dartiss)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202233)
 * No worries, perfectly understandable! Thanks for all of that Steve.
 * David.

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Working with video shortcodes’ is closed to new replies.

 * ![](https://ps.w.org/a3-lazy-load/assets/icon.svg?rev=1049979)
 * [a3 Lazy Load](https://wordpress.org/plugins/a3-lazy-load/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/a3-lazy-load/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/a3-lazy-load/)
 * [Active Topics](https://wordpress.org/support/plugin/a3-lazy-load/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/a3-lazy-load/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/a3-lazy-load/reviews/)

 * 9 replies
 * 3 participants
 * Last reply from: [David Artiss](https://wordpress.org/support/users/dartiss/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/working-with-video-shortcodes/#post-6202233)
 * Status: resolved