| Current Path : /home/megadansyp/www/plugins/fwgallerytype/video/layouts/site/video/ |
| Current File : /home/megadansyp/www/plugins/fwgallerytype/video/layouts/site/video/output.php |
<?php
/**
* FW Super Gallery 2.4.0
* @copyright (C) 2020 Fastw3b
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.fastw3b.net/ Official website
**/
defined( '_JEXEC' ) or die( 'Restricted access' );
$view = $displayData['view'];
$row = $view->item;
?>
<div class="fwmg-video-plugin<?php if (!$view->params->get('dont_file_video_autoplay')) { ?> fwmg-video-plugin-autoplay<?php } ?>">
<?php
switch ($row->_video_media) {
case 'youtube' :
?>
<iframe src="https://www.youtube.com/embed/<?php echo str_replace('?t=', '?start=', $row->_video_code).((strpos($row->_video_code, '?') === false)?'?':'&'); ?>rel=0" frameborder="0" allow="autoplay" allowfullscreen allowautoplay></iframe>
<?php
break;
case 'vimeo' :
?>
<iframe src="https://player.vimeo.com/video/<?php echo $row->_video_code; ?>" frameborder="0" allow="autoplay" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
<?php
break;
case 'mp4' :
if ($row->_video_sys_filename) {
$path = fwgHelper::getImagePath($row->_video_sys_filename);
if (file_exists($path.$row->_video_sys_filename)) {
?>
<video class="video-js vjs-default-skin vjs-mental-skin" width="100%" height="100%" controls poster="<?php echo fwgHelper::checkLink(fwgHelper::route('index.php?option=com_fwgallery&view=item&layout=img&format=raw&id='.$row->id)); ?>" data-setup="{}">
<source src="<?php echo fwgHelper::getImageLink($row->_video_sys_filename).$row->_video_sys_filename; ?>" type="video/mp4" />
</video>
<?php
}
}
break;
}
?>
</div>