";if(a.w3c||g)e+='';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