diff --git a/addon-sedo_html5media.xml b/addon-sedo_html5media.xml index 10f9de1..aebd978 100644 --- a/addon-sedo_html5media.xml +++ b/addon-sedo_html5media.xml @@ -1,17 +1,19 @@ - + - + + + - + + + @@ -59,7 +75,7 @@ step=25 - + ;
@@ -75,6 +91,13 @@ P.S: the audio extensions have the priority on video extensions. If you want to ;]]> + + + + + + + @@ -333,24 +356,30 @@ P.S: the audio extensions have the priority on video extensions. If you want to - - + @@ -423,4 +452,5 @@ P.S: the audio extensions have the priority on video extensions. If you want to +
diff --git a/extras/bbcode xml/BBM_BbCode_Av.xml b/extras/bbcode xml/BBM_BbCode_Av.xml index 27cc3e6..70e13bf 100644 --- a/extras/bbcode xml/BBM_BbCode_Av.xml +++ b/extras/bbcode xml/BBM_BbCode_Av.xml @@ -12,6 +12,8 @@ [av=320x240|http://media.html5media.info/poster.jpg|bcenter|This is a video|right]http://media.html5media.info/video.ogv[/av]]]> 1 1 + sedo_adv_av + diff --git a/upload/js/sedo/html5media/html5media.min.previous.js b/upload/js/sedo/html5media/html5media.min.previous.js new file mode 100644 index 0000000..4631e07 --- /dev/null +++ b/upload/js/sedo/html5media/html5media.min.previous.js @@ -0,0 +1,40 @@ +(function(){function k(a){if(!a||typeof a!="object")return a;var b=new a.constructor,e;for(e in a)a.hasOwnProperty(e)&&(b[e]=k(a[e]));return b}function j(a,b){if(a){var e,d=0,c=a.length;if(c===void 0)for(e in a){if(b.call(a[e],e,a[e])===!1)break}else for(e=a[0];d1){var e=arguments[1],d=arguments.length==3?arguments[2]:{};typeof e=="string"&&(e={src:e});e=n({bgcolor:"#000000",version:[9,0],expressInstall:"http://static.flowplayer.org/swf/expressinstall.swf",cachebusting:!1},e);if(typeof b=="string")if(b.indexOf(".")!=-1){var h=[];j(r(b),function(){h.push(new m(this,k(e),k(d)))});return new l(h)}else{var g=document.getElementById(b);return new m(g!==null?g:b,e,d)}else if(b)return new m(b, +e,d)}return null};n(window.$f,{fireEvent:function(){var a=[].slice.call(arguments),b=$f(a[0]);return b?b._fireEvent(a.slice(1)):null},addPlugin:function(a,b){m.prototype[a]=b;return $f},each:j,extend:n});if(typeof jQuery=="function")jQuery.fn.flowplayer=function(a,b){if(!arguments.length||typeof arguments[0]=="number"){var c=[];this.each(function(){var a=$f(this);a&&c.push(a)});return arguments.length?c[arguments[0]]:new l(c)}return this.each(function(){$f(this,k(a),b?k(b):{})})}})(); +(function(){function k(){if(g.done)return!1;var b=document;if(b&&b.getElementsByTagName&&b.getElementById&&b.body){clearInterval(g.timer);g.timer=null;for(b=0;b';a.width=a.height=a.id=a.w3c=a.src=null;for(var d in a)a[d]!==null&&(e+='');a="";if(c){for(var h in c)c[h]!==null&&(a+=h+"="+(typeof c[h]== +"object"?n(c[h]):c[h])+"&");a=a.substring(0,a.length-1);e+='"}e+="";return e}function t(b,c,a){var g=flashembed.getVersion();j(this,{getContainer:function(){return b},getConf:function(){return c},getVersion:function(){return g},getFlashvars:function(){return a},getApi:function(){return b.firstChild},getHTML:function(){return o(c,a)}});var e=c.version,d=c.expressInstall,h=!e||flashembed.isSupported(e);if(h)c.onFail=c.version=c.expressInstall=null,b.innerHTML= +o(c,a);else if(e&&d&&flashembed.isSupported([6,65]))j(c,{src:d}),a={MMredirectURL:location.href,MMplayerType:"PlugIn",MMdoctitle:document.title},b.innerHTML=o(c,a);else if(b.innerHTML.replace(/\s/g,"")===""&&(b.innerHTML="

Flash version "+e+" or greater is required

"+(g[0]>0?"Your version is "+g:"You have no flash plugin installed")+"

"+(b.tagName=="A"?"

Click here to download latest version

":"

Download latest version from here

"), +b.tagName=="A"))b.onclick=function(){location.href="http://www.adobe.com/go/getflashplayer"};if(!h&&c.onFail&&(e=c.onFail.call(this),typeof e=="string"))b.innerHTML=e;document.all&&(window[c.id]=document.getElementById(c.id))}var m=typeof jQuery=="function",l={width:"100%",height:"100%",allowfullscreen:!0,allowscriptaccess:"always",quality:"high",version:null,onFail:null,expressInstall:null,w3c:!1,cachebusting:!1};if(m)jQuery.tools=jQuery.tools||{},jQuery.tools.flashembed={version:"1.0.4",conf:l}; +var g=m?jQuery:function(b){if(g.done)return b();g.timer?g.ready.push(b):(g.ready=[b],g.timer=setInterval(k,13))};window.attachEvent&&window.attachEvent("onbeforeunload",function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){}});window.flashembed=function(b,c,a){if(typeof b=="string"){var i=document.getElementById(b);if(i)b=i;else{g(function(){flashembed(b,c,a)});return}}if(b)return typeof c=="string"&&(c={src:c}),i=j({},l),j(i,c),new t(b,i,a)};j(window.flashembed,{getVersion:function(){var b= +[0,0];if(navigator.plugins&&typeof navigator.plugins["Shockwave Flash"]=="object"){var c=navigator.plugins["Shockwave Flash"].description;typeof c!="undefined"&&(c=c.replace(/^.*\s+(\S+\s+\S+$)/,"$1"),b=parseInt(c.replace(/^(.*)\..*$/,"$1"),10),c=/r/.test(c)?parseInt(c.replace(/^.*r(.*)$/,"$1"),10):0,b=[b,c])}else if(window.ActiveXObject){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(a){try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"),b=[6,0],c.AllowScriptAccess="always"}catch(g){if(b[0]== +6)return b}try{c=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}typeof c=="object"&&(c=c.GetVariable("$version"),typeof c!="undefined"&&(c=c.replace(/^\S+\s+(.*)$/,"$1").split(","),b=[parseInt(c[0],10),parseInt(c[2],10)]))}return b},isSupported:function(b){var c=flashembed.getVersion();return c[0]>b[0]||c[0]==b[0]&&c[1]>=b[1]},domReady:g,asString:n,getHTML:o});if(m)jQuery.fn.flashembed=function(b,c){var a=null;this.each(function(){a=flashembed(this,b,c)});return b.api===!1?this:a}})();(function(){function k(){if(!m&&(m=!0,l)){for(var g=0;g-1}function r(b){for(var c=j.getElementsByTagName(b),d=[],e=0;esedo_bbcode_av_max_width; $height_default = $xenoptions->sedo_bbcode_av_default_height; $height_max = $xenoptions->sedo_bbcode_av_max_height; + $preload = $xenoptions->sedo_bbcode_av_video_preload; + $preloadBb = $xenoptions->sedo_bbcode_av_video_preloadbb; /*Misc*/ - $regex_url = '#^(?:(?:https?|ftp|file)://|www\.|ftp\.)[-\p{L}0-9+&@\#/%=~_|$?!:,.]*[-\p{L}0-9+&@\#/%=~_|$]$#ui'; + $regex_url = BBM_Helper_BbCodes::$regexUrl; /*Init variables*/ $width = ''; @@ -90,6 +92,24 @@ public static function html5media(&$content, array &$options, &$templateName, &$ $hasPoster = $option; $posterType = 'id'; } + elseif(in_array($option, array('nocache', 'metadata', 'cache')) ) + { + if($preloadBb) + { + if($option == 'nocache') + { + $preload = 'none'; + } + elseif($option == 'cache') + { + $preload = 'auto'; + } + else + { + $preload = 'metadata'; + } + } + } else { $hasCaption = $option; @@ -213,13 +233,13 @@ public static function html5media(&$content, array &$options, &$templateName, &$ $hasPoster = false; } - $useResponsiveMode = self::useResponsiveMode(); + $useResponsiveMode = BBM_Helper_BbCodes::useResponsiveMode(); if($useResponsiveMode) { $css = 'responsive'; } - + /*Final options*/ $options['isValid'] = (in_array($extension, $all_extensions)) ? true : false; $options['mediaType'] = $type; @@ -232,6 +252,7 @@ public static function html5media(&$content, array &$options, &$templateName, &$ $options['cssCaption'] = 'cap_'.$css_caption; $options['displayNoViewPerms'] = $displayNoViewPerms; $options['responsiveMode'] = $useResponsiveMode; + $options['preload'] = $preload; } protected static function _miniUrlEncode($url) @@ -247,35 +268,5 @@ protected static function _miniUrlEncode($url) return str_replace($search, $replace, $url); } - - public static function useResponsiveMode() - { - $isResponsive = XenForo_Template_Helper_Core::styleProperty('enableResponsive'); - - if(!$isResponsive) - { - return false; - } - - return self::isMobile(); - } - - public static function isMobile($option = false) - { - if((!class_exists('Sedo_DetectBrowser_Listener_Visitor') || !isset($visitor->getBrowser['isMobile']))) - { - return XenForo_Visitor::isBrowsingWith('mobile'); - } - else - { - //External addon - if($option == 'onlyTablet') - { - return $visitor->getBrowser['isTablet']; - } - - return $visitor->getBrowser['isMobile']; - } - } } //Zend_Debug::dump($contents); \ No newline at end of file diff --git a/upload/library/Sedo/Html5media/Listeners/AllInOne.php b/upload/library/Sedo/Html5media/Listeners/AllInOne.php new file mode 100644 index 0000000..3371da8 --- /dev/null +++ b/upload/library/Sedo/Html5media/Listeners/AllInOne.php @@ -0,0 +1,16 @@ +hasMenu('adv_insert')) + { + $mceConfigObj->addMenuItem('bbm_sedo_adv_av', 'adv_insert', '@adv_insert_1'); + } + else + { + $mceConfigObj->addMenuItem('bbm_sedo_adv_av', 'insert', '@insert_2'); + } + } +} \ No newline at end of file