<?php

/**
 * @Package: WordPress Plugin
 * @Subpackage: Ultra Portfolio
 * @Since: Ultra Portfolio 1.0
 * @Current Version: Ultra Portfolio 3.1
 * @WordPress Version: 3.5 or above
 * This file is part of Ultra Portofolio WordPress Plugin.
 */
if (in_array('lightbox', $showthis) && $detarr['exttype'] == "videofile" && trim($detarr['extvideo']) != "") {
    $disp .= '<div id="videofile-' . $detarr['id'] . '-' . $pid . '" style="display:none;width:600px;height:370px;">';
    //ob_start();
    //echo do_shortcode("[video src='". trim($detarr['extvideo']) ."' preload='none' width='600']");
    //$disp .= ob_get_clean();

    $disp .= '<div style="width: 660px;height: 370px; " class="wp-video">
<!--[if lt IE 9]><script>document.createElement("video");</script><![endif]-->
<video class="wp-video-shortcode" id="video-' . $detarr['id'] . '-' . $pid . '" width="660" height="370" preload="metadata" controls="controls">
<source type="video/mp4" src="'.trim($detarr['extvideo']).'?_=1" />
<a href="'.trim($detarr['extvideo']).'">'.trim($detarr['extvideo']).'</a>
</video>
</div>';
/*
									$disp .='<video width="500" height="auto" controls>
									  <source src="' . trim($detarr['extvideo']) . '" type="video/mp4">
									  <source src="' . trim($detarr['extvideo']) . '" type="video/ogg">
									  <object data="' . trim($detarr['extvideo']) . '" width="500" height="auto">
										<embed src="' . trim($detarr['extvideo']) . '" width="500" height="auto">
									  </object> 
									</video>';*/
								$disp .= '</div>';
}
if (in_array('lightbox', $showthis) && $detarr['exttype'] == "embed" && trim($detarr['extembed']) != "") {
    $disp .= '<div id="embed-' . $detarr['id'] . '-' . $pid . '" style="display:none;width:auto;height:auto;">' . trim(do_shortcode($detarr['extembed'])) . '</div>';
}
if (in_array('lightbox', $showthis) && $detarr['exttype'] == "audio" && trim($detarr['extaudio']) != "") {
    $disp .= '<div id="audio-' . $detarr['id'] . '-' . $pid . '" style="display:none;width:400px;">
							<audio controls style="width:80%;height:40px;margin:25px 30px;">
							  <source src="' . trim($detarr['extaudio']) . '" type="audio/mpeg">
							  <embed height="100%" width="100%" src="' . trim($detarr['extaudio']) . '">
							</audio>
						</div>';
}
?>