public function view($id) { $player = null; $this->load->driver('cache', array('adapter' => 'apc', 'backup' => 'file')); if ($this->cache->apc->is_supported()) { if ($_data = $this->cache->apc->get('VIDEO_PLAYER_' . $id)) { $player = $_data; } } $data['video'] = $this->Video->get_video($id); thumbnail_or_image($data['video']); if (empty($player)) { $data['player'] = video_player($data['video']); $this->cache->apc->save('VIDEO_PLAYER_' . $id, $data['player'], 1339200); } else { $data['player'] = $player; } $this->layout->view('videos/view', $data); }
</div> <div class="block-bar"> <p id="video-title"><?php echo count($artist_media->video) ? $artist_media->video[0]->title : 'n/a'; ?> </p> </div> <div class="clear"></div> <div class="video-content"> <div class="video-box" id="video-player" style="min-height:263px"> <!--<img src="<?php echo base_url(); ?> images/banners/video/video.jpg" alt="video" width="466" height="263" />--> <?php echo count($artist_media->video) ? video_player($artist_media->video[0]->url) : '<img src="' . base_url() . 'images/video-player-border.jpg" alt="video" width="466" height="263" />'; ?> </div> <div class="scroll-content"> <div class="scroll-pane"> <div class="listing"> <ul> <?php $vidcount = count($artist_media->video); if ($vidcount < 2) { $vidcount = 2; } ?> <?php for ($x = 1; $x <= $vidcount; $x++) {
public function getVideo() { $url = urldecode($_POST['url']); echo video_player($url); die; }
function fb_video_shortcode($atts) { extract(shortcode_atts(array('url' => ''), $atts)); return '<div class="videoWrapper video-st-embed"><div class="video-container">' . video_player($url, 0) . '</div></div>'; }
</div> <div class="block-bar"> <p id="video-title"><?php echo count($artist_media->video) ? $artist_media->video[0]->title : 'n/a'; ?> </p> </div> <div class="clear"></div> <div class="video-content"> <div class="video-box" id="video-player" style="min-height:263px"> <!--<img src="<?php echo base_url(); ?> images/banners/video/video.jpg" alt="video" width="466" height="263" />--> <?php echo count($artist_media->video) ? video_player($artist_media->video[0]->url) : ''; ?> </div> <div class="scroll-content"> <div class="scroll-pane"> <div class="listing"> <ul> <?php $vidcount = count($artist_media->video); if ($vidcount < 2) { $vidcount = 2; } ?> <?php for ($x = 1; $x <= count($artist_media->video); $x++) {
function post_thumbnail_html($html, $post_id, $post_image_id) { $video = get_post_meta($post_id, 'fb_video', true); if ($html) { /* If have thumbnail image set */ if ($video != '') { if (is_single()) { /* Show playe on single page */ if (function_exists('video_player')) { ?> <div class='video-container'><?php echo video_player($video, 0); ?> </div> <?php } } else { echo '<i class="fa fa-play-circle fa-4x"></i>' . $html; } } else { echo $html; } } else { /* If haven't thumbnail image set */ if ($video != '') { if (is_single()) { /* Show playe on single page */ if (function_exists('video_player')) { ?> <div class='video-container'><?php echo video_player($video, 0); ?> </div> <?php } } else { echo '<i class="fa fa-play-circle fa-4x"></i><img class="img-res" src="' . video_image($video, 'hd') . '" alt="' . esc_attr(get_post_field('post_title', $post_id)) . '" />'; } } } }