How does mediaelement.js work in WordPress?

WordPress core handles the enqueuing of the MediaElement.js scripts and styles automatically when the shortcode is used: From wp_video_shortcode()… /** * Filters the media library used for the video shortcode. * * @since 3.6.0 * * @param string $library Media library used for the video shortcode. */ $library = apply_filters( ‘wp_video_shortcode_library’, ‘mediaelement’ ); if ( … Read more

Default subtitle for videos

From a UX perspective whether to display a subtitle track is a preference that should really be left up to the user. Edit: that being said, mediaelement.js allows you to specify a starting sub track by passing in this option: { startLanguage: ‘en’ }

Video Short Code and Media Fragments URI

Try embedding your video like this: <video controls> <source src=”https://www.domain.com/wp-content/uploads/2018/07/5898ca6e5276e4cd97c0bd730a2ed82c11780595-480p__80044.mp4#t=18″ type=”video/mp4″ /> </video> Paste this in your editor but make sure on the top right it is set to “Text” not “Visual”. When you switch it back to “Visual” you will just see blank gray frame. Preview the post and you should see the video … Read more

how to make video autoplay in widget

You can do that by writing JavaScript. Like, in your theme footer (footer.php) if you place code like below (before the ending </body> tag): <script> var vid = document.querySelector(‘video.wp-video-shortcode’); vid.autoplay = true; vid.load(); </script> It will autoplay all the videos of all the video widgets on the DOM (or in fact all the videos with … Read more

Embedding local video in WordPress comments

Yea, you can’t use short codes in comments by default with WordPress. Short codes are anything surrounded in those ‘[ ]’ brackets. There are plugins you can install that allow you to use short-codes in posts, products, categories, and other places in WordPress that you aren’t able to by default. However, I don’t know of … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)