Example #1
0
 public function get_html($media)
 {
     if (!$media) {
         return '';
     }
     $html = '';
     $args = array('src' => mpp_get_media_src($media), 'poster' => mpp_get_media_src('thumbnail', $media));
     return wp_video_shortcode($args);
 }
Example #2
0
 public function get_html($media)
 {
     if (!$media) {
         return '';
     }
     $html = '';
     $args = array('src' => mpp_get_media_src(), 'loop' => false, 'autoplay' => false);
     return wp_audio_shortcode($args);
 }
Example #3
0
 public function get_html($media)
 {
     if (!$media) {
         return '';
     }
     $html = '';
     $src = mpp_get_media_src('', $media);
     $ext = mpp_get_file_extension($src);
     if ($ext) {
         //$ext = strtolower( $ext );
         //for doc viewer, we will use google doc viewer for
         //IF IT IS PDF, PPT OR TIFF USE THE GOOGLE VIEWER
         $url = "http://docs.google.com/viewer?url=" . urlencode($src);
         //should we validate if the type is supported by viewer?
         //see for supported type
         //https://support.google.com/drive/answer/2423485?hl=en&p=docs_viewer&rd=1
         //and check this for more details
         //https://docs.google.com/viewer
         $html = "<iframe src='" . $url . "&embedded=true' style='border: none;'></iframe>";
     }
     return $html;
 }
Example #4
0
// Exit if the file is accessed directly over web
if (!defined('ABSPATH')) {
    exit;
}
/**
 * List videos attached to activity
 * 
 */
?>
<div class=" mpp-activity-media-list mpp-activity-video-list mpp-activity-video-player">
<?php 
$ids = $media_ids;
//is there only one video attached?
if (count($ids) == 1) {
    $ids = array_pop($ids);
    $media = mpp_get_media($ids);
    $args = array('src' => mpp_get_media_src('', $media), 'poster' => mpp_get_media_src('thumbnail', $media));
    //show single video with poster
    echo wp_video_shortcode($args);
} else {
    //show all videos as playlist
    echo wp_playlist_shortcode(array('ids' => $ids, 'type' => 'video'));
}
?>
<script type='text/javascript'>
	mpp_mejs_activate(<?php 
echo bp_get_activity_id();
?>
);
</script>
</div>
Example #5
0
	<div class='mpp-g mpp-item-list mpp-media-list mpp-video-list'>

		<?php 
    while ($query->have_media()) {
        $query->the_media();
        ?>

		<div class="<?php 
        mpp_media_class('mpp-widget-item mpp-widget-video-item ' . mpp_get_grid_column_class(1));
        ?>
">
			<?php 
        do_action('mpp_before_media_widget_item');
        ?>
		<?php 
        $args = array('src' => mpp_get_media_src(), 'loop' => false, 'autoplay' => false, 'poster' => mpp_get_media_src('thumbnail'), 'width' => 320, 'height' => 180);
        //$ids = mpp_get_all_media_ids();
        //echo wp_playlist_shortcode( array( 'ids' => $ids));
        ?>
				<div class='mpp-item-entry mpp-media-entry mpp-video-entry'>

				</div>
				<div class="mpp-item-content mpp-video-content mpp-video-player">
					<?php 
        echo wp_video_shortcode($args);
        ?>
				</div>
				<a href="<?php 
        mpp_media_permalink();
        ?>
" class="mpp-item-title mpp-media-title mpp-audio-title"><?php 
Example #6
0
<?php

/**
 * Single audio view
 */
$media = mpp_get_current_media();
if (!$media) {
    return '';
}
$args = array('src' => mpp_get_media_src(), 'loop' => false, 'autoplay' => false);
echo wp_audio_shortcode($args);
function mpp_media_src($type = '', $media = null)
{
    echo mpp_get_media_src($type, $media);
}
Example #8
0
<?php

$media = mpp_get_current_media();
if (!$media) {
    return;
}
$src = mpp_get_media_src('', $media);
$ext = mpp_get_file_extension($src);
if ($ext) {
    //$ext = strtolower( $ext );
    //for doc viewer, we will use google doc viewer for
    //IF IT IS PDF, PPT OR TIFF USE THE GOOGLE VIEWER
    $url = "http://docs.google.com/viewer?url=" . urlencode($src);
    //should we validate if the type is supported by viewer?
    //see for supported type
    //https://support.google.com/drive/answer/2423485?hl=en&p=docs_viewer&rd=1
    //and check this for more details
    //https://docs.google.com/viewer
    $html = "<iframe src='" . $url . "&embedded=true' style='border: none;'></iframe>";
}
echo $html;