1. Code
  2. WordPress
  3. Plugin Development

How to Embed a Video Player in Your WordPress Site With a Free Plugin

Scroll to top

In this post, we’ll use the Easy Video Player plugin, which allows you to embed videos on your WordPress site. I’ll demonstrate how you can use this plugin on your own site to embed videos.

Embedding videos on your website is essential nowadays, no matter what domain you’re associated with. Videos are one of the best ways to convey your ideas to your customers! In particular, if you’re building a WordPress website which requires video streaming capabilities, you’re in the right place. As a site owner, you need an easy-to-use and lightweight video player plugin which does the job for you.

As there are thousands of plugins in this category, there’s a strong possibility that you’ll find a plugin for every feature you could think of in the WordPress plugin directory. But often, it can be hard to choose which one to use. And when it comes to choosing the right video player for your WordPress site, you will find plenty of options. Among them, I’ve chosen one of the best in this category: Easy Video Player.

The Easy Video Player plugin allows you to embed videos by integrating a simple and easy-to-use videos player. It allows you to embed both self-hosted videos as well as videos that are externally hosted. In the case of externally hosted videos, you can embed them by using direct links. With a lot of customization options and an easy-to-use interface, Easy Video Player is one of the best plugins in this category.

For this post, I’ve used WordPress 5.2.1, and the Easy Video Player plugin version is 1.1.8. I would recommend that you install it if you want to follow along with this post. To install the Easy Video Player plugin, you need to follow the standard plugin installation process in WordPress.

In the following sections, we’ll explore the basic settings of the Easy Video Player plugin along with the setup process. Next, we’ll go through a few important configuration settings of this plugin which allow you to customize the player settings. Finally, we’ll see how to integrate the video player on your website for demonstration purposes.

Why Use the Easy Video Player Plugin?

The Easy Video Player plugin makes the process of embedding videos on your WordPress website hassle-free. Capable of embedding both self-hosted and external videos, it’s a responsive plugin which works well on all kinds of mobile devices as well. Also, it allows you to embed videos almost anywhere on your site, whether it’s a post, page, or widget.

With the support of customization from the back-end itself, you could customize different controls as well as the look and feel of the video player.

Let’s quickly go through the important features it provides:

  • embed MP4 videos
  • out-of-the-box responsiveness support
  • customizable player controls
  • compatible with all major browsers
  • support for different skins
  • and more

This plugin provides a lot of useful features that you could use while embedding videos on your WordPress website. Next, we’ll discuss some core elements of this plugin that are important to understand if you want to use this plugin effectively.

How to Enable the Easy Video Player Plugin

After installation of this plugin, you won’t be able to use it straight away. In fact, there’s a setting which you need to activate before you start using this plugin.

Head over to the admin section and click the Settings > Easy Video Player link from the sidebar. It should display the following page, where you should be able to enable the jQuery setting.

Enable the PluginEnable the PluginEnable the Plugin

Check the Enable jQuery setting and click on the Save Changes button. And with that, we are now ready to use this plugin! In the next section, we'll explore various ways you could embed videos on your site.

Embed Videos in Your WordPress Site With Easy Video Player

In this section, we’ll demonstrate how to use this plugin to embed videos on your WordPress site. We’ll embed multiple videos, each with different custom settings.

Before we proceed, make sure that you’ve installed the Easy Video Player plugin in your WordPress site if you want to follow along.

Go ahead and create a new page or post where you want to embed a video. Next, you’ll need to insert the following shortcode to embed a video.

1
[evp_embed_video url="{MP4_FILE_URL}"]

Please note that you need to replace the placeholder part with an actual video URL. There are two ways you could provide the MP4 URL: either you could use video files hosted on your server or you could use video files hosted by a third party. 

Publish the page and head over to the front-end to see how it looks:

DemonstrationDemonstrationDemonstration

As you can see, it displays a pretty good-looking video player out of the box by just providing the URL of the video file. 

If you want to customize this player, the plugin supports a lot of parameters that you could use to customize the different controls in your player.

1
[evp_embed_video url="{MP4_FILE_URL}" autoplay="true" width="750" ratio="0.375"  poster="{IMAGE_URL}" loop="true" share="false"]

Try the above code in the example post, and you would see a customized video player as per the parameters we’ve provided. Most of the above parameters are self-explanatory.

  • autoplay—governs whether the video will start playing when the page is loaded
  • width—is the width of the player
  • ratio—sets the height of the player as a fraction of the width
  • poster—is the image thumbnail
  • loop—governs whether the video will play in a loop
  • share—determines whether the social sharing controls will be shown
Demonstration With ParametersDemonstration With ParametersDemonstration With Parameters

Apart from these control parameters, the plugin also supports shortcode parameters that allow you to customize the look and feel of the player. For that, you could use the class parameter, as shown in the following example.

1
[evp_embed_video url="{MP4_FILE_URL}" class="no-toggle"]

In the above example, we’ve used the no-toggle option, which allows you to display the control bar statically. Otherwise, it would have had the mouse hover effect for the control bar. There are other options as well, but I'll leave it for you to explore! Of course, don’t hesitate to ask me if you have any queries.

Apart from this, the player also supports different skins if you don’t like the default skin.

By default, the video player uses the default template provided by Flowplayer. If you don’t like that and want to try something else, you can use the mediaelement template by providing it in the template parameter, as shown in the following snippet.

1
[evp_embed_video url="{MP4_FILE_URL}" template="mediaelement"]

And it should output something like this:

Demostration With Media ElementDemostration With Media ElementDemostration With Media Element

Apart from this, you can use custom CSS to change the look and feel of different controls in the video player.

So, as you can see, it provides a lot of ways to customize the video player according to your requirements. Feel free to experiment with different options to see how they affect the front-end output.

And with that, we’ve reached the end of this article as well!

The Next Step: A Quick Look at a Couple of Advanced Video Players

Today, we discussed how you could integrate a video player on your WordPress website by using a free plugin.

But if you're looking for more advanced audio players that you could use right away, check out the following posts, which summarize some excellent scripts that are available for a low cost.

Conclusion

Today, we discussed how you can embed videos by using the Easy Video Player plugin in WordPress. If you want to share your experiences about other video player plugins that you have used on your website and would like to recommend, feel free to share your thoughts using the feed below!

Also, if you want to use custom plugins but you're not comfortable tinkering with servers and prefer to have someone do it all for you, consider managed WordPress hosting. Thanks to Envato's partnership with SiteGround, you can get up to 60% off managed WordPress hosting.

Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Code tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.