VOD Infomaniak - Version 1.3.9

Version Description

(15/09/2016) = * Modification pour meilleurs prise en compte du responsive

Download this release

Release Info

Developer infomaniak-dev
Plugin Icon wp plugin VOD Infomaniak
Version 1.3.9
Comparing to
See all releases

Code changes from version 1.3.8 to 1.3.9

Files changed (3) hide show
  1. readme.txt +4 -1
  2. vod.class.php +21 -7
  3. vod.php +1 -1
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin Name: Vod Infomaniak
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
- Stable tag: 1.3.8
9
 
10
 
11
 
@@ -72,6 +72,9 @@ Si vous ne trouvez pas de solution à votre question, vous pouvez aussi nous con
72
 
73
  == Changelog ==
74
 
 
 
 
75
  = 1.3.8 (18/05/2016) =
76
  * Fix problème compatibilité PHP7 (suite)
77
 
5
  Tags: video, manage, infomaniak, vod
6
  Requires at least: 2.8.6
7
  Tested up to: 4.3.1
8
+ Stable tag: 1.3.9
9
 
10
 
11
 
72
 
73
  == Changelog ==
74
 
75
+ = 1.3.9 (15/09/2016) =
76
+ * Modification pour meilleurs prise en compte du responsive
77
+
78
  = 1.3.8 (18/05/2016) =
79
  * Fix problème compatibilité PHP7 (suite)
80
 
vod.class.php CHANGED
@@ -5,7 +5,7 @@
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
- * @version 1.3.8
9
  * @copyright infomaniak.ch
10
  */
11
 
@@ -15,7 +15,7 @@
15
  define('VOD_RIGHT_ADMIN', 4);
16
 
17
  class EasyVod {
18
- public $version = "1.3.8";
19
  private $local_version;
20
  private $plugin_url;
21
  private $options;
@@ -391,14 +391,28 @@
391
  if (empty($width)) {
392
  $width = 480;
393
  }
394
- if (empty($height)) {
395
  $height = 288;
 
 
 
396
  }
 
 
 
 
 
 
 
 
 
 
397
 
398
- //Build de la balise
399
- $html_tag = '<span class="youtube">
400
- <iframe title="Vod Player" class="vod-player" width="' . $width . '" height="' . $height . '" src="' . $video_url . '" frameborder="0" allowfullscreen></iframe>
401
- </span>';
 
402
 
403
  return $html_tag;
404
  }
5
  *
6
  * @author Destrem Kevin + Davide Rubini + Arnaud Toullieux
7
  * @link http://statslive.infomaniak.ch/vod/api/
8
+ * @version 1.3.9
9
  * @copyright infomaniak.ch
10
  */
11
 
15
  define('VOD_RIGHT_ADMIN', 4);
16
 
17
  class EasyVod {
18
+ public $version = "1.3.9";
19
  private $local_version;
20
  private $plugin_url;
21
  private $options;
391
  if (empty($width)) {
392
  $width = 480;
393
  }
394
+ if (empty($height) || $height == 288 || strpos($width,'%') > 1) {
395
  $height = 288;
396
+ $iPercentRatio = 56.25;
397
+ }else{
398
+ $iPercentRatio = (100/intval($width)*($height));
399
  }
400
+
401
+
402
+ // Build de la balise, ancienne methode
403
+ /**$html_tag = '<span class="youtube">
404
+ *** <iframe title="Vod Player" class="vod-player" width="' . $width . '" height="' . $height . '" src="' . $video_url . '" frameborder="0" allowfullscreen></iframe>
405
+ *** </span>';
406
+ **/
407
+ if (strpos($width,'%') == false && strpos($width,'px') == false){
408
+ $width = $width."px";
409
+ }
410
 
411
+ $html_tag = '<div style="width:100%;max-width:'.$width.';">
412
+ <div class="videoWrapper" style="position: relative;padding-bottom: '.$iPercentRatio.'%;padding-top: 25px;height: 0;">
413
+ <iframe style="position: absolute;top: 0;left: 0;width: 100%;height: 100%;" src="' . $video_url . '" frameborder="0" allowfullscreen></iframe>
414
+ </div>
415
+ </div>';
416
 
417
  return $html_tag;
418
  }
vod.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
- Version: 1.3.8
8
  Author URI: http://infomaniak.com
9
  */
10
 
4
  Plugin URI: http://wordpress.org/extend/plugins/vod-infomaniak/
5
  Description: Easily embed and manage videos from Infomaniak VOD in your posts, comments and RSS feeds. You need an Infomaniak VOD account to use this plugin.
6
  Author: Infomaniak Staff
7
+ Version: 1.3.9
8
  Author URI: http://infomaniak.com
9
  */
10