how to add new .webm mime types

The WebM file format isn’t known to WordPress by default, you have to add it. add_filter( ‘upload_mimes’, ‘custom_mimes’ ); function custom_mimes( $mimes ){ $mimes[‘webm’] = ‘video/webm’; return $mimes; } The .ogg file format is known to WordPress as audio/ogg, if you’re wanting to do video with it, the correct extension is .ogv.

Vimeo videos not working

After further investigation this appears to be Vimeo blocking the requests. We have two sites (one where Vimeo videos work and one where they don’t). When testing the retrieval of content via PHP we get “HTTP request failed! HTTP/1.1 403 Forbidden” on the faulty site. Anyone else reading this thread can run the same test … Read more

Add video from youtube in post

This is overview how you can make it working: First with below code you can detect youtube URL for details Please read: $reg = preg_match(‘|^\s*(https?://[^\s”]+)\s*$|im’, $post_id_63->post_content, $matches); if (!$reg) return false; $url = trim($matches[0]); // youtube video url echo wp_oembed_get($url); // this will return youtube vidoe For details please read: Wp_oembed_get we need to use … Read more

WordPress 3.1: Videoplayer implemented?

Indeed, the “Insert video” action does not do much beyond creating a link. WordPress does not contain a generic player that can play any video hosted anywhere on the internet, but it does support something better: embedding via oEmbed. This means you can put the URL of the video page in your content, and it … Read more

Protecting HTML5 video [closed]

First: You will need a plugin that acts as an intermediary for your cloud storage. Cloud storage innately (if setup properly) will protect your files. I have used the CDN Vault plugin and it works great. It’s a premium plugin that depends on Amazon S3 storage. It does some really great obfuscation and encryption so … Read more

WP REST – video and audio players

Ran into this same issue and I found the answer after many hours and almost giving up. It’s in a bit of code that written to make the Customizer work with playlists. Checkout this comment from /wp-includes/widgets/class-wp-widget-text.php: /** * Enqueue preview scripts. * * These scripts normally are enqueued just-in-time when a playlist shortcode is … Read more

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