AntonLV 7 years ago
parent
commit
ddd2b53d14

+ 2 - 1
modules/boonex/timeline/classes/BxTimelineTemplate.php

@@ -1043,6 +1043,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
         $oPlayer = BxDolPlayer::getObjectInstance();
         if (!$oPlayer)
             return '';
+
         $sPlayer = $oPlayer->getCodeVideo (BX_PLAYER_EMBED, array(
             'poster' => $aVideo['src_poster'],
             'mp4' => array('sd' => $aVideo['src_mp4'], 'hd' => $aVideo['src_mp4_hd']),
@@ -2106,7 +2107,7 @@ class BxTimelineTemplate extends BxBaseModNotificationsTemplate
                     'style_prefix' => $sStylePrefix,
                     'item' => BxTemplFunctions::getInstance()->videoPlayer($aVideo['src_poster'], $aVideo['src_mp4'], $aVideo['src_mp4_hd'], array(
                         'preload' => 'auto'
-                    ), '') 
+                    ), '', $aBrowseParams['dynamic_mode'])
                 );
             else 
                 $aTmplVarsVideos[] = array(

+ 7 - 3
template/scripts/BxBaseFunctions.php

@@ -516,17 +516,21 @@ class BxBaseFunctions extends BxDolFactory implements iBxDolSingleton
      * @param $aAttrs custom attributes, defaults are: controls="" preload="none" autobuffer=""
      * @param $sStyles custom styles, defaults are: width:100%; height:auto;
      */
-    function videoPlayer ($sUrlPoster, $sUrlMP4, $sUrlMP4Hd = '', $aAttrs = false, $sStyles = 'width:100%; height:auto;')
+    function videoPlayer ($sUrlPoster, $sUrlMP4, $sUrlMP4Hd = '', $aAttrs = false, $sStyles = false, $bDynamicMode = false)
     {
         $oPlayer = BxDolPlayer::getObjectInstance();
-        if (!$oPlayer)
+        if(!$oPlayer)
             return '';
+
+        if($sStyles === false)
+            $sStyles = 'width:100%; height:auto;';
+
         return $oPlayer->getCodeVideo (BX_PLAYER_STANDARD, array(
             'poster' => $sUrlPoster,
             'mp4' => array('sd' => $sUrlMP4, 'hd' => $sUrlMP4Hd),
             'attrs' => $aAttrs,
             'styles' => $sStyles,
-        ));
+        ), $bDynamicMode);
     }
 
     protected function getInjection($sPrefix)