WP YouTube Lyte - Version 1.1.4

Version Description

  • bugfix: audio-only youtube was broken due to changes at YouTube (thanks for reporting Adrian!)
  • bugfix: playlist embedding was somewhat broken (again due to changes at YouTube)
  • bugfix: httpv- or httpa- links were only found if the v-parameter was at the beginning of the querystring (as discovered by Mye)
  • added 2 new widget sizes (250X200px and 400X333px)
Download this release

Release Info

Developer futtta
Plugin Icon 128x128 WP YouTube Lyte
Version 1.1.4
Comparing to
See all releases

Code changes from version 1.1.3 to 1.1.4

lyte/controls-250.png ADDED
Binary file
lyte/lyte-min.js CHANGED
@@ -1 +1 @@
1
- (function(a){function i(a,b,c){if(d.getElementsByClassName){i=function(a,b,c){c=c||d;var e=c.getElementsByClassName(a),f=b?new RegExp("\\b"+b+"\\b","i"):null,g=[],h;for(var i=0,j=e.length;i<j;i+=1){h=e[i];if(!f||f.test(h.nodeName)){g.push(h)}}return g}}else if(d.evaluate){i=function(a,b,c){b=b||"*";c=c||d;var e=a.split(" "),f="",g="http://www.w3.org/1999/xhtml",h=d.documentElement.namespaceURI===g?g:null,i=[],j,k;for(var l=0,m=e.length;l<m;l+=1){f+="[contains(concat(' ', @class, ' '), ' "+e[l]+" ')]"}try{j=d.evaluate(".//"+b+f,c,h,0,null)}catch(n){j=d.evaluate(".//"+b+f,c,null,0,null)}while(k=j.iterateNext()){i.push(k)}return i}}else{i=function(a,b,c){b=b||"*";c=c||d;var e=a.split(" "),f=[],g=b==="*"&&c.all?c.all:c.getElementsByTagName(b),h,i=[],j;for(var k=0,l=e.length;k<l;k+=1){f.push(new RegExp("(^|\\s)"+e[k]+"(\\s|$)"))}for(var m=0,n=g.length;m<n;m+=1){h=g[m];j=false;for(var o=0,p=f.length;o<p;o+=1){j=f[o].test(h.className);if(!j){break}}if(j){i.push(h)}}return i}}return i(a,b,c)}function h(a){scr=d.createElement("script");scr.src=a;scr.type="text/javascript";d.getElementsByTagName("head")[0].appendChild(scr)}function g(a,b){if(typeof a.setAttribute==="function")a.setAttribute("style",b);else if(typeof a.style.setAttribute==="object")a.style.setAttribute("cssText",b)}function f(a,b){p=d.getElementById(a);c=d.createElement("div");c.className="tC";t=d.createElement("div");t.className="tT";c.appendChild(t);t.innerHTML=b;p.appendChild(c)}function e(a){qsa="";if(rqs=a.className.match(/qsa_(.*)\s/,"$1"))qsa=rqs[1].replace(/\\([\&\=\?])/g,"$1");return qsa}d=document;var b="http";if(bU.indexOf("https")!=-1){b+="s"}a.te=function(){if(!c){var c=1;lts=i("lyMe","div");for(var f=0,j=lts.length;f<j;f+=1){p=lts[f];vid=p.id.substring(4);cN=p.className.replace(/lyMe/,"lyte")+" lP";p.className=cN;p.onclick=a.play;pW=p.style.width.match(/\d+/g)[0];pH=p.style.height.match(/\d+/g)[0];pl=d.createElement("div");pl.id="lyte_"+vid;pl.className="pL";bgA="-60px";if(cN.indexOf("widget")!==-1||pW/pH<1.7)bgA="-10px";qsa=e(p);if(cN.indexOf("audio")!==-1){g(pl,"height:"+pH+"px;width:"+pW+"px;");pl.innerHTML='<img src="'+bU+"controls-"+pW+'.png" class="ctrl" alt="" style="max-width:'+pW+'px;"/>'}else if(cN.indexOf("playlist")!==-1){g(pl,"height:"+pH+"px;width:"+pW+"px;");pl.innerHTML='<img src="'+bU+'play.png" alt="Click to play this playlist" style="margin-top:'+(pH/2-30)+'px;opacity:0.7;" onmouseover="this.style.opacity=1;" onmouseout="this.style.opacity=0.8;"/><img src="'+bU+"controls-"+pW+'.png" width="100%" class="ctrl" alt="" style="max-width:'+pW+'px;"/>';joU=b+"://gdata.youtube.com/feeds/api/playlists/"+vid+"?v=2&alt=json-in-script&callback=ly.prsPL&fields=id,title,entry";h(joU)}else{g(pl,"height:"+pH+"px;width:"+pW+"px;background:url('"+b+"://img.youtube.com/vi/"+vid+"/0.jpg') no-repeat scroll center "+bgA+" rgb(0, 0, 0);background-size:cover;");pl.innerHTML='<img src="'+bU+'play.png" alt="Click to play this video" style="margin-top:'+(pH/2-30)+'px;opacity:0.7;" onmouseover="this.style.opacity=1;" onmouseout="this.style.opacity=0.8;"/><img src="'+bU+"controls-"+pW+'.png" width="100%" class="ctrl" alt="" style="max-width:'+pW+'px;"/>';if(cN.indexOf("widget")===-1&&qsa.indexOf("showinfo=0")===-1){joU=b+"://gdata.youtube.com/feeds/api/videos/"+vid+"?fields=id,title&alt=json-in-script&callback=ly.prsV";h(joU)}}p.appendChild(pl)}}var c=""};a.play=function(){tH=this;tH.onclick="";vid=tH.id.substring(4);hidef=0;if(tH.className.indexOf("hidef")!==-1){hidef=1}if(tH.className.indexOf("playlist")===-1){eU=b+"://www.youtube.com/embed/"+vid}else{eU=b+"://www.youtube.com/embed/p/"+vid}qsa=e(tH);if(tH.className.indexOf("audio")!==-1){qsa+="&autohide=0"}tH.innerHTML='<iframe id="iF_'+vid+'" width="'+tH.clientWidth+'" height="'+tH.clientHeight+'" src="'+eU+"?autoplay=1&wmode=opaque&rel=0&egm=0&iv_load_policy=3&hd="+hidef+qsa+'" frameborder="0"></iframe>';if(typeof tH.firstChild.getAttribute("kabl")=="string")tH.innerHTML="Please check Karma Blocker's config."};a.prsV=function(a){tI=a.entry.title.$t;idu=a.entry.id.$t;id="lyte_"+idu.substring(idu.length-11);f(id,tI)};a.prsPL=function(a){thumb=a.feed.entry[0].media$group.media$thumbnail[1].url;idu=a.feed.id.$t;id="lyte_"+idu.substring(idu.length-16);title="Playlist: "+a.feed.title.$t;pl=d.getElementById(id);pH=pl.style.height;pW=pl.style.width;if(b=="https"&&thumb.indexOf("https"==-1)){thumb=thumb.replace("http://","https://")}g(pl,"height:"+pH+";width:"+pW+";background:url('"+thumb+"') no-repeat scroll center -50px rgb(0, 0, 0); background-size:cover;");f(id,title)};})(window.ly=window.ly||{});(function(){var a=window;var b=document;if(a.addEventListener){a.addEventListener("load",ly.te,false);b.addEventListener("DomContentLoaded",function(){setTimeout("ly.te()",750)},false)}else{a.onload=ly.te;setTimeout("ly.te()",1000)}})()
1
+ (function(a){function e(a){qsa="";if(rqs=a.className.match(/qsa_(.*)\s/,"$1"))qsa=rqs[1].replace(/\\([\&\=\?])/g,"$1");return qsa}function f(a,b){p=d.getElementById(a);c=d.createElement("div");c.className="tC";t=d.createElement("div");t.className="tT";c.appendChild(t);t.innerHTML=b;p.appendChild(c)}function g(a,b){if(typeof a.setAttribute==="function")a.setAttribute("style",b);else if(typeof a.style.setAttribute==="object")a.style.setAttribute("cssText",b)}function h(a){scr=d.createElement("script");scr.src=a;scr.type="text/javascript";d.getElementsByTagName("head")[0].appendChild(scr)}function i(a,b,c){if(d.getElementsByClassName){i=function(a,b,c){c=c||d;var e=c.getElementsByClassName(a),f=b?new RegExp("\\b"+b+"\\b","i"):null,g=[],h;for(var i=0,j=e.length;i<j;i+=1){h=e[i];if(!f||f.test(h.nodeName)){g.push(h)}}return g}}else if(d.evaluate){i=function(a,b,c){b=b||"*";c=c||d;var e=a.split(" "),f="",g="http://www.w3.org/1999/xhtml",h=d.documentElement.namespaceURI===g?g:null,i=[],j,k;for(var l=0,m=e.length;l<m;l+=1){f+="[contains(concat(' ', @class, ' '), ' "+e[l]+" ')]"}try{j=d.evaluate(".//"+b+f,c,h,0,null)}catch(n){j=d.evaluate(".//"+b+f,c,null,0,null)}while(k=j.iterateNext()){i.push(k)}return i}}else{i=function(a,b,c){b=b||"*";c=c||d;var e=a.split(" "),f=[],g=b==="*"&&c.all?c.all:c.getElementsByTagName(b),h,i=[],j;for(var k=0,l=e.length;k<l;k+=1){f.push(new RegExp("(^|\\s)"+e[k]+"(\\s|$)"))}for(var m=0,n=g.length;m<n;m+=1){h=g[m];j=false;for(var o=0,p=f.length;o<p;o+=1){j=f[o].test(h.className);if(!j){break}}if(j){i.push(h)}}return i}}return i(a,b,c)}d=document;var b="http";if(bU.indexOf("https")!=-1){b+="s"}a.te=function(){if(!c){var c=1;lts=i("lyMe","div");for(var f=0,j=lts.length;f<j;f+=1){p=lts[f];vid=p.id.substring(4);cN=p.className.replace(/lyMe/,"lyte")+" lP";p.className=cN;p.onclick=a.play;pW=p.style.width.match(/\d+/g)[0];pH=p.style.height.match(/\d+/g)[0];pl=d.createElement("div");pl.id="lyte_"+vid;pl.className="pL";bgA="-60px";if(cN.indexOf("widget")!==-1||pW/pH<1.7)bgA="-10px";qsa=e(p);if(cN.indexOf("audio")!==-1){g(pl,"height:"+pH+"px;width:"+pW+"px;");pl.innerHTML='<img src="'+bU+"controls-"+pW+'.png" class="ctrl" alt="" style="max-width:'+pW+'px;"/>'}else if(cN.indexOf("playlist")!==-1){g(pl,"height:"+pH+"px;width:"+pW+"px;");pl.innerHTML='<img src="'+bU+'play.png" alt="Click to play this playlist" style="margin-top:'+(pH/2-30)+'px;opacity:0.7;" onmouseover="this.style.opacity=1;" onmouseout="this.style.opacity=0.8;"/><img src="'+bU+"controls-"+pW+'.png" width="100%" class="ctrl" alt="" style="max-width:'+pW+'px;"/>';joU=b+"://gdata.youtube.com/feeds/api/playlists/"+vid+"?v=2&alt=json-in-script&callback=ly.prsPL&fields=id,title,entry";h(joU)}else{g(pl,"height:"+pH+"px;width:"+pW+"px;background:url('"+b+"://img.youtube.com/vi/"+vid+"/0.jpg') no-repeat scroll center "+bgA+" rgb(0, 0, 0);background-size:cover;");pl.innerHTML='<img src="'+bU+'play.png" alt="Click to play this video" style="margin-top:'+(pH/2-30)+'px;opacity:0.7;" onmouseover="this.style.opacity=1;" onmouseout="this.style.opacity=0.8;"/><img src="'+bU+"controls-"+pW+'.png" width="100%" class="ctrl" alt="" style="max-width:'+pW+'px;"/>';if(cN.indexOf("widget")===-1&&qsa.indexOf("showinfo=0")===-1){joU=b+"://gdata.youtube.com/feeds/api/videos/"+vid+"?fields=id,title&alt=json-in-script&callback=ly.prsV";h(joU)}}p.appendChild(pl)}}var c=""};a.play=function(){tH=this;tH.onclick="";vid=tH.id.substring(4);hidef=0;if(tH.className.indexOf("hidef")!==-1){hidef=1}if(tH.className.indexOf("playlist")===-1){eU=b+"://www.youtube.com/embed/"+vid+"?"}else{eU=b+"://www.youtube.com/embed/videoseries?list=PL"+vid+"&"}qsa=e(tH);if(tH.className.indexOf("audio")!==-1){qsa+="&autohide=0";aHgh=438;aSt="position:relative;top:-400px;"}else{aHgh=tH.clientHeight;aSt=""}tH.innerHTML='<iframe id="iF_'+vid+'" width="'+tH.clientWidth+'px" height="'+aHgh+'px" src="'+eU+"autoplay=1&wmode=opaque&rel=0&egm=0&iv_load_policy=3&hd="+hidef+qsa+'" frameborder="0" style="'+aSt+'"></iframe>';if(typeof tH.firstChild.getAttribute("kabl")=="string")tH.innerHTML="Please check Karma Blocker's config."};a.prsV=function(a){tI=a.entry.title.$t;idu=a.entry.id.$t;id="lyte_"+idu.substring(idu.length-11);f(id,tI)};a.prsPL=function(a){thumb=a.feed.entry[0].media$group.media$thumbnail[1].url;idu=a.feed.id.$t;id="lyte_"+idu.substring(idu.length-16);title="Playlist: "+a.feed.title.$t;pl=d.getElementById(id);pH=pl.style.height;pW=pl.style.width;if(b=="https"&&thumb.indexOf("https"==-1)){thumb=thumb.replace("http://","https://")}g(pl,"height:"+pH+";width:"+pW+";background:url('"+thumb+"') no-repeat scroll center -50px rgb(0, 0, 0); background-size:cover;");f(id,title)};})(window.ly=window.ly||{});(function(){var a=window;var b=document;if(a.addEventListener){a.addEventListener("load",ly.te,false);b.addEventListener("DomContentLoaded",function(){setTimeout("ly.te()",750)},false)}else{a.onload=ly.te;setTimeout("ly.te()",1e3)}})()
lyte/lyte.js CHANGED
@@ -62,16 +62,16 @@ ly.play = function() {
62
  if (tH.className.indexOf("hidef") !== -1) { hidef=1; }
63
 
64
  if (tH.className.indexOf("playlist") === -1) {
65
- eU=sch+"://www.youtube.com/embed/" + vid
66
  } else {
67
- eU=sch+"://www.youtube.com/embed/p/" + vid
68
  }
69
 
70
  qsa=getQ(tH);
71
 
72
- if (tH.className.indexOf("audio") !== -1) { qsa+="&autohide=0"; }
73
 
74
- tH.innerHTML="<iframe id=\"iF_" + vid + "\" width=\"" + tH.clientWidth + "\" height=\"" + tH.clientHeight + "\" src=\""+eU+"?autoplay=1&amp;wmode=opaque&amp;rel=0&amp;egm=0&amp;iv_load_policy=3&amp;hd="+hidef+qsa+"\" frameborder=\"0\"></iframe>"
75
 
76
  if(typeof tH.firstChild.getAttribute('kabl')=="string") tH.innerHTML="Please check Karma Blocker's config.";
77
  }
62
  if (tH.className.indexOf("hidef") !== -1) { hidef=1; }
63
 
64
  if (tH.className.indexOf("playlist") === -1) {
65
+ eU=sch+"://www.youtube.com/embed/" + vid + "?"
66
  } else {
67
+ eU=sch+"://www.youtube.com/embed/videoseries?list=PL" + vid + "&"
68
  }
69
 
70
  qsa=getQ(tH);
71
 
72
+ if (tH.className.indexOf("audio") !== -1) { qsa+="&autohide=0";aHgh="438";aSt="position:relative;top:-400px;" } else { aHgh=tH.clientHeight;aSt=""; }
73
 
74
+ tH.innerHTML="<iframe id=\"iF_" + vid + "\" width=\"" + tH.clientWidth + "px\" height=\"" + aHgh + "px\" src=\""+eU+"autoplay=1&amp;wmode=opaque&amp;rel=0&amp;egm=0&amp;iv_load_policy=3&amp;hd="+hidef+qsa+"\" frameborder=\"0\" style=\"" + aSt + "\"></iframe>"
75
 
76
  if(typeof tH.firstChild.getAttribute('kabl')=="string") tH.innerHTML="Please check Karma Blocker's config.";
77
  }
player_sizes.inc.php CHANGED
@@ -76,4 +76,10 @@ $wSize[3]['depr']=true;
76
  $wSize[4]['h']=200;
77
  $wSize[4]['w']=200;
78
  $wSize[4]['depr']=false;
 
 
 
 
 
 
79
  ?>
76
  $wSize[4]['h']=200;
77
  $wSize[4]['w']=200;
78
  $wSize[4]['depr']=false;
79
+ $wSize[5]['h']=200;
80
+ $wSize[5]['w']=250;
81
+ $wSize[5]['depr']=false;
82
+ $wSize[6]['h']=333;
83
+ $wSize[6]['w']=400;
84
+ $wSize[6]['depr']=false;
85
  ?>
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: futtta
3
  Tags: youtube, video, lyte, lite youtube embeds, html5 video, html5, widget, youtube audio, audio, playlist, youtube playlist, hd, performance, accessibility, sidebar, lazy load
4
  Requires at least: 2.9
5
  Tested up to: 3.4
6
- Stable tag: 1.1.3
7
 
8
  High performance YouTube video, playlist and audio-only embeds which don't slow down your blog and offer optimal accessibility.
9
 
@@ -71,6 +71,12 @@ Just tell me, I like the feedback! Use the [Contact-page on my blog](http://blog
71
 
72
  == Changelog ==
73
 
 
 
 
 
 
 
74
  = 1.1.3 =
75
  * new: Player position can now be set to "left" (default) or "center".
76
  * YouTube bugfix: playlist player should now [also work on iphone/ipad](http://apiblog.youtube.com/2012/03/new-player-options-for-lists-of-videos.html)
3
  Tags: youtube, video, lyte, lite youtube embeds, html5 video, html5, widget, youtube audio, audio, playlist, youtube playlist, hd, performance, accessibility, sidebar, lazy load
4
  Requires at least: 2.9
5
  Tested up to: 3.4
6
+ Stable tag: 1.1.4
7
 
8
  High performance YouTube video, playlist and audio-only embeds which don't slow down your blog and offer optimal accessibility.
9
 
71
 
72
  == Changelog ==
73
 
74
+ = 1.1.4 =
75
+ * bugfix: audio-only youtube was broken due to changes at YouTube (thanks for reporting [Adrian](http://www.yeahlabs.ca/)!)
76
+ * bugfix: playlist embedding was somewhat broken (again due to changes at YouTube)
77
+ * bugfix: httpv- or httpa- links were only found if the v-parameter was at the beginning of the querystring (as discovered by [Mye](http://virtualassistanttipsthatmatters.com/))
78
+ * added 2 new widget sizes (250X200px and 400X333px)
79
+
80
  = 1.1.3 =
81
  * new: Player position can now be set to "left" (default) or "center".
82
  * YouTube bugfix: playlist player should now [also work on iphone/ipad](http://apiblog.youtube.com/2012/03/new-player-options-for-lists-of-videos.html)
widget.php CHANGED
@@ -52,7 +52,7 @@ class WYLWidget extends WP_Widget {
52
 
53
  <?php echo $before_widget; ?>
54
  <?php if ( $WYLtitle ) echo $before_title . $WYLtitle . $after_title; ?>
55
- <div class="lyMe widget <?php echo $WYLaudio; ?> <?php echo $qsaClass; ?>" id="<?php echo $WYLid; ?>" style="width:<?php echo $wSize[$WYLsize]['w']; ?>px;height:<?php if($WYLaudio==="audio") {echo "25";} else {echo $wSize[$WYLsize]['h'];} ?>px;"><noscript><a href="http://youtu.be/<?php echo $WYLid;?>"><img src="http://img.youtube.com/vi/<?php echo $WYLid; ?>/default.jpg" alt="" /></a></noscript></div>
56
  <div><?php echo $WYLtext ?></div>
57
  <?php echo $after_widget; ?>
58
  <?php
52
 
53
  <?php echo $before_widget; ?>
54
  <?php if ( $WYLtitle ) echo $before_title . $WYLtitle . $after_title; ?>
55
+ <div class="lyMe widget <?php echo $WYLaudio; ?> <?php echo $qsaClass; ?>" id="<?php echo $WYLid; ?>" style="width:<?php echo $wSize[$WYLsize]['w']; ?>px;height:<?php if($WYLaudio==="audio") {echo "38";} else {echo $wSize[$WYLsize]['h'];} ?>px;overflow:hidden;"><noscript><a href="http://youtu.be/<?php echo $WYLid;?>"><img src="http://img.youtube.com/vi/<?php echo $WYLid; ?>/default.jpg" alt="" /></a></noscript></div>
56
  <div><?php echo $WYLtext ?></div>
57
  <?php echo $after_widget; ?>
58
  <?php
wp-youtube-lyte.php CHANGED
@@ -4,13 +4,13 @@ Plugin Name: WP YouTube Lyte
4
  Plugin URI: http://blog.futtta.be/wp-youtube-lyte/
5
  Description: Lite and accessible YouTube audio and video embedding.
6
  Author: Frank Goossens (futtta)
7
- Version: 1.1.3
8
  Author URI: http://blog.futtta.be/
9
  Text Domain: wp-youtube-lyte
10
  Domain Path: /languages
11
  */
12
 
13
- $wyl_version="1.1.3";
14
 
15
  $plugin_dir = basename(dirname(__FILE__)).'/languages';
16
  load_plugin_textdomain( 'wp-youtube-lyte', null, $plugin_dir );
@@ -62,7 +62,8 @@ function lyte_parse($the_content) {
62
  $scheme="http";
63
  }
64
 
65
- preg_match_all("/http(a|v):\/\/([a-zA-Z0-9\-\_]+\.|)(youtube|youtu)(\.com|\.be)\/(((watch(\?v\=|\/v\/)|)([a-zA-Z0-9\-\_]{11}))|(playlist\?list\=PL([a-zA-Z0-9\-\_]{16})))([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
 
66
 
67
  foreach($matches as $match) {
68
  preg_match("/stepSize\=([\+\-0-9]{2})/",$match[12],$sMatch);
@@ -141,8 +142,8 @@ function lyte_parse($the_content) {
141
  $noscript="<noscript><a href=\"".$scheme."://youtu.be/".$vid."\"><img src=\"".$scheme."://img.youtube.com/vi/".$vid."/0.jpg\" alt=\"\" width=\"".$lyteSettings[2]."\" height=\"".$NSimgHeight."\" />".$noscript_post."</a> ".$NSbanner."</noscript>";
142
  }
143
 
144
- $lytetemplate = "<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\" style=\"width:".$lyteSettings[2]."px;height:".$divHeight."px;\">".$noscript."</div>".$lytelinks_txt;
145
- $the_content = preg_replace("/(<p>)?http(v|a):\/\/([a-zA-Z0-9\-\_]+\.|)(youtube|youtu)(\.com|\.be)\/(((watch(\?v\=|\/v\/)|)([a-zA-Z0-9\-\_]{11}))|(playlist\?list\=PL([a-zA-Z0-9\-\_]{16})))([^\s<]*)(<\/p>)?/", $lytetemplate, $the_content, 1);
146
  }
147
  lyte_initer();
148
  }
4
  Plugin URI: http://blog.futtta.be/wp-youtube-lyte/
5
  Description: Lite and accessible YouTube audio and video embedding.
6
  Author: Frank Goossens (futtta)
7
+ Version: 1.1.4
8
  Author URI: http://blog.futtta.be/
9
  Text Domain: wp-youtube-lyte
10
  Domain Path: /languages
11
  */
12
 
13
+ $wyl_version="1.1.4";
14
 
15
  $plugin_dir = basename(dirname(__FILE__)).'/languages';
16
  load_plugin_textdomain( 'wp-youtube-lyte', null, $plugin_dir );
62
  $scheme="http";
63
  }
64
 
65
+ preg_match_all("/http(a|v):\/\/([a-zA-Z0-9\-\_]+\.|)(youtube|youtu)(\.com|\.be)\/(((watch(\?v\=|\/v\/)|.+?v\=|)([a-zA-Z0-9\-\_]{11}))|(playlist\?list\=PL([a-zA-Z0-9\-\_]{16})))([^<\s]*)/", $the_content, $matches, PREG_SET_ORDER);
66
+
67
 
68
  foreach($matches as $match) {
69
  preg_match("/stepSize\=([\+\-0-9]{2})/",$match[12],$sMatch);
142
  $noscript="<noscript><a href=\"".$scheme."://youtu.be/".$vid."\"><img src=\"".$scheme."://img.youtube.com/vi/".$vid."/0.jpg\" alt=\"\" width=\"".$lyteSettings[2]."\" height=\"".$NSimgHeight."\" />".$noscript_post."</a> ".$NSbanner."</noscript>";
143
  }
144
 
145
+ $lytetemplate = "<div class=\"lyMe".$audioClass.$hidefClass.$plClass.$qsaClass."\" id=\"WYL_".$vid."\" style=\"width:".$lyteSettings[2]."px;height:".$divHeight."px;overflow:hidden;\">".$noscript."</div>".$lytelinks_txt;
146
+ $the_content = preg_replace("/(<p>)?http(v|a):\/\/([a-zA-Z0-9\-\_]+\.|)(youtube|youtu)(\.com|\.be)\/(((watch(\?v\=|\/v\/)|.+?v\=|)([a-zA-Z0-9\-\_]{11}))|(playlist\?list\=PL([a-zA-Z0-9\-\_]{16})))([^\s<]*)(<\/p>)?/", $lytetemplate, $the_content, 1);
147
  }
148
  lyte_initer();
149
  }