Version Description
- The plugin can now automatically start playing a video
- The player can be resized using a specific width and height
- The ratio of each video can be customized
Download this release
Release Info
Developer | naa986 |
Plugin | Easy Video Player |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- easy-video-player.php +29 -6
- readme.txt +36 -2
easy-video-player.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Video Player
|
4 |
-
Version: 1.0.
|
5 |
Plugin URI: http://easywpguide.wordpress.com/?p=25
|
6 |
Author: naa986
|
7 |
Author URI: http://easywpguide.wordpress.com/
|
@@ -13,7 +13,7 @@ if(!class_exists('EASY_VIDEO_PLAYER'))
|
|
13 |
{
|
14 |
class EASY_VIDEO_PLAYER
|
15 |
{
|
16 |
-
var $plugin_version = '1.0.
|
17 |
function __construct()
|
18 |
{
|
19 |
define('EASY_VIDEO_PLAYER_VERSION', $this->plugin_version);
|
@@ -117,13 +117,36 @@ function evp_embed_video_handler($atts)
|
|
117 |
{
|
118 |
extract(shortcode_atts(array(
|
119 |
'url' => '',
|
|
|
|
|
|
|
|
|
120 |
), $atts));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
$output = <<<EOT
|
122 |
-
<div data-ratio="
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
</div>
|
|
|
127 |
EOT;
|
128 |
return $output;
|
129 |
}
|
1 |
<?php
|
2 |
/*
|
3 |
Plugin Name: Easy Video Player
|
4 |
+
Version: 1.0.2
|
5 |
Plugin URI: http://easywpguide.wordpress.com/?p=25
|
6 |
Author: naa986
|
7 |
Author URI: http://easywpguide.wordpress.com/
|
13 |
{
|
14 |
class EASY_VIDEO_PLAYER
|
15 |
{
|
16 |
+
var $plugin_version = '1.0.2';
|
17 |
function __construct()
|
18 |
{
|
19 |
define('EASY_VIDEO_PLAYER_VERSION', $this->plugin_version);
|
117 |
{
|
118 |
extract(shortcode_atts(array(
|
119 |
'url' => '',
|
120 |
+
'width' => '',
|
121 |
+
'height' => '',
|
122 |
+
'ratio' => '0.417',
|
123 |
+
'autoplay' => 'false',
|
124 |
), $atts));
|
125 |
+
if($autoplay=="true"){
|
126 |
+
$autoplay = " autoplay";
|
127 |
+
}
|
128 |
+
else{
|
129 |
+
$autoplay = "";
|
130 |
+
}
|
131 |
+
$player = "fp".uniqid();
|
132 |
+
$styles = "";
|
133 |
+
if(!empty($width) && !empty($height)){
|
134 |
+
$styles = <<<EOT
|
135 |
+
<style>
|
136 |
+
#$player {
|
137 |
+
width: {$width}px;
|
138 |
+
height: {$height}px;
|
139 |
+
}
|
140 |
+
</style>
|
141 |
+
EOT;
|
142 |
+
}
|
143 |
$output = <<<EOT
|
144 |
+
<div id="$player" data-ratio="$ratio" class="flowplayer">
|
145 |
+
<video{$autoplay}>
|
146 |
+
<source type="video/mp4" src="$url"/>
|
147 |
+
</video>
|
148 |
</div>
|
149 |
+
$styles
|
150 |
EOT;
|
151 |
return $output;
|
152 |
}
|
readme.txt
CHANGED
@@ -3,8 +3,8 @@ Contributors: naa986
|
|
3 |
Donate link: http://easywpguide.wordpress.com/
|
4 |
Tags: video, wpvideo, flash, html5, iPad, iphone, ipod, mobile, playlists, embed video, flowplayer, video html5, flash player, player, video player
|
5 |
Requires at least: 3.0.1
|
6 |
-
Tested up to: 3.
|
7 |
-
Stable tag: 1.0.
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
@@ -34,6 +34,24 @@ Now it's time to finally embed a video shortcode. To do this create a new post/p
|
|
34 |
|
35 |
here, url is a shortcode parameter that you need to replace the actual URL of the video file.
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
For detailed documentation please visit the [Easy Video Player](http://easywpguide.wordpress.com/?p=25) plugin page
|
38 |
|
39 |
|
@@ -55,11 +73,27 @@ Yes.
|
|
55 |
|
56 |
Yes.
|
57 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
== Screenshots ==
|
59 |
|
60 |
For screenshots please visit the [Easy Video Player](http://easywpguide.wordpress.com/?p=25) plugin page
|
61 |
|
|
|
|
|
|
|
62 |
== Changelog ==
|
63 |
|
|
|
|
|
|
|
|
|
|
|
64 |
= 1.0.1 =
|
65 |
* First commit
|
3 |
Donate link: http://easywpguide.wordpress.com/
|
4 |
Tags: video, wpvideo, flash, html5, iPad, iphone, ipod, mobile, playlists, embed video, flowplayer, video html5, flash player, player, video player
|
5 |
Requires at least: 3.0.1
|
6 |
+
Tested up to: 3.6
|
7 |
+
Stable tag: 1.0.2
|
8 |
License: GPLv3 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
10 |
|
34 |
|
35 |
here, url is a shortcode parameter that you need to replace the actual URL of the video file.
|
36 |
|
37 |
+
*Video Autoplay*
|
38 |
+
|
39 |
+
If you want a particular video to start playing when the page loads you can set the "autoplay" option to "true":
|
40 |
+
|
41 |
+
`[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" autoplay="true"]`
|
42 |
+
|
43 |
+
*Control Size*
|
44 |
+
|
45 |
+
Many users don't care if the videos are not responsive, and therefore want to control the player size. You can easily do so by specifying a width and height for your video:
|
46 |
+
|
47 |
+
`[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" width="500" height="400"]`
|
48 |
+
|
49 |
+
*Control Player Ratio*
|
50 |
+
|
51 |
+
The player ratio is set to "0.417" by default. But you can override it by specifying a different ratio in the shortcode:
|
52 |
+
|
53 |
+
`[evp_embed_video url="http://example.com/wp-content/uploads/videos/myvid.mp4" ratio="0.345"]`
|
54 |
+
|
55 |
For detailed documentation please visit the [Easy Video Player](http://easywpguide.wordpress.com/?p=25) plugin page
|
56 |
|
57 |
|
73 |
|
74 |
Yes.
|
75 |
|
76 |
+
= Can I autoplay a video? =
|
77 |
+
|
78 |
+
Yes.
|
79 |
+
|
80 |
+
= Can I embed responsive videos using this plugin? =
|
81 |
+
|
82 |
+
Yes.
|
83 |
+
|
84 |
== Screenshots ==
|
85 |
|
86 |
For screenshots please visit the [Easy Video Player](http://easywpguide.wordpress.com/?p=25) plugin page
|
87 |
|
88 |
+
== Upgrade Notice ==
|
89 |
+
none
|
90 |
+
|
91 |
== Changelog ==
|
92 |
|
93 |
+
= 1.0.2 =
|
94 |
+
* The plugin can now automatically start playing a video
|
95 |
+
* The player can be resized using a specific width and height
|
96 |
+
* The ratio of each video can be customized
|
97 |
+
|
98 |
= 1.0.1 =
|
99 |
* First commit
|