WordPress.org

Plugin Directory

Changeset 1133967


Ignore:
Timestamp:
04/13/15 21:11:07 (3 years ago)
Author:
cmstactics
Message:
  • Added audio levels option for Video JS player.
  • Added audio levels and autoplay option for a video shortcode.
Location:
wp-video-posts/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • wp-video-posts/trunk/js/wpvp-front-end.js

    r1017663 r1133967  
    66    jQuery('.wpvp-submit').on('click',wpvp_uploadFiles); 
    77    jQuery('input#async-upload').on('change', wpvp_prepareUpload); 
     8    jQuery('.video-js').each(function(){ 
     9        var objId = jQuery(this).attr('id'); 
     10        var vol = jQuery(this).data('audio'); 
     11        if(objId !== 'undefined' && (vol < 100 && vol !== 'undefined')){ 
     12            var player = videojs(objId); 
     13            player.ready(function(){ 
     14                vol = parseFloat("0."+vol); 
     15                var playerObj = this; 
     16                playerObj.volume(vol); 
     17            }); 
     18        } 
     19    }); 
    820}); 
    921// Grab the files and set them to our variable 
  • wp-video-posts/trunk/options/wpvp-options.php

    r1106974 r1133967  
    1919    $wpvp_player = $_POST['wpvp_player']; 
    2020    $wpvp_autoplay = ($_POST['wpvp_autoplay']=='yes') ? true : false; 
     21    $wpvp_audio = $_POST['wpvp_audio']; 
    2122    $wpvp_splash = ($_POST['wpvp_splash']=='yes') ? true : false; 
    2223    $wpvp_clean_url = ($_POST['wpvp_clean_url']=='yes') ? true : false; 
     
    5556    update_option('wpvp_player',$wpvp_player); 
    5657    update_option('wpvp_autoplay',$wpvp_autoplay); 
     58    update_option('wpvp_audio',$wpvp_audio); 
    5759    update_option('wpvp_splash',$wpvp_splash); 
    5860    update_option('wpvp_clean_url',$wpvp_clean_url); 
     
    7375    $wpvp_player = get_option('wpvp_player','videojs') ? get_option('wpvp_player','videojs') : 'videojs'; 
    7476    $wpvp_autoplay = get_option('wpvp_autoplay',false) ? get_option('wpvp_autoplay',false) : false; 
     77    $wpvp_audio = get_option('wpvp_audio',100) ? get_option('wpvp_audio',100) : 100; 
    7578    $wpvp_splash = get_option('wpvp_splash',true) ? get_option('wpvp_splash',true) : true; 
    7679    $wpvp_clean_url = get_option('wpvp_clean_url',false) ? get_option('wpvp_clean_url',false) : false; 
     
    171174            <strong><?php _e('Video JS Controls');?></strong> 
    172175            <p><input type="checkbox" name="wpvp_autoplay" value="yes" <?php checked($wpvp_autoplay,1);?> /> <?php _e('Autoplay video');?></p> 
     176            <p> 
     177            <?php $range = range(0,100,10);?> 
     178                <select name="wpvp_audio" id="wpvp_audio"> 
     179                <?php foreach($range as $num){ 
     180                    echo '<option value="'.$num.'" '.selected($wpvp_audio,$num).'>'.$num.'</option>'; 
     181                }?> 
     182                </select> <?php _e('Audio Level');?> 
     183            </p> 
    173184            <p><input type="checkbox" name="wpvp_splash" value="yes" <?php checked($wpvp_splash,1);?> /> <?php _e('Display splash image');?></p> 
    174185        </p> 
  • wp-video-posts/trunk/readme.txt

    r1106974 r1133967  
    44Tags: video converter, video plugin, ffmpeg, video post 
    55Requires at least: 3.2.2 
    6 Tested up to: 4.0 
    7 Stable tag: 3.4.1 
     6Tested up to: 4.1.1 
     7Stable tag: 3.5 
    88 
    99Upload videos to create custom video posts. With FFMPEG installed, it encodes 
     
    3333[wpvp_player src=http://example.com/path/to/video/file.mp4 splash=http://example.com/path/to/image/file.jpg width=500 height=281] 
    3434 
     35You can pass the following attributes to a shortcode (examples):  
     36- width (640) 
     37- height (480) 
     38- autoplay (1|0) 
     39- volume (50) 
     40- src (http://example.com/video.mp4) 
     41- splash (http://example.com/video.jpg) 
     42 
    3543You can also overwrite our template files for the front end uploader / editor if you need to add your styling.  
    3644If you're going to do so, please copy the files from wp-video-posts/templates/ into your own theme: 
     
    134142 
    135143== Changelog == 
     144= 3.5 =  
     145- Added audio levels option for Video JS player. 
     146- Added audio levels and autoplay option for a video shortcode. 
     147 
    136148= 3.4.1 =  
    137149- Fixed a bug on a debug option. 
  • wp-video-posts/trunk/wpvp.php

    r1106974 r1133967  
    44Plugin URI: http://cmstactics.com 
    55Description: WP Video Posts creates a custom post for uploaded videos. You can upload videos of different formats (FLV, F4V, MP4, AVI, MOV, 3GP and WMV) and the plugin will convert it to MP4 and play it using Flowplayer.   
    6 Version: 3.4.1 
     6Version: 3.5 
    77Author: Alex Rayan, cmstactics 
    88Author URI: http://cmstactics.com 
     
    2424    * @var string WPVPMediaEncoder version 
    2525    */ 
    26     public $version = '3.4.1'; 
     26    public $version = '3.5'; 
    2727    public static function init(){ 
    2828        $class = __CLASS__; 
     
    416416            'width'=>'640', 
    417417            'height'=>'360', 
    418             'splash'=>'' 
     418            'splash'=>'', 
     419            'autoplay'=>null, 
     420            'audio'=>null 
    419421        ),$atts)); 
    420422        $wpvp_player = get_option('wpvp_player','flowplayer') ? get_option('wpvp_player','flowplayer') : 'flowplayer'; 
     
    422424            $player_code = '<a href="'.$src.'" class="myPlayer" style="display:block;width:'.$width.'px;height:'.$height.'px;margin:10px auto"><img width="'.$width.'" height="'.$height.'" src="'.$splash.'" alt="" /></a>'; 
    423425        } else if($wpvp_player=='videojs'){ 
    424             $autoplay = get_option('wpvp_autoplay',false) ? get_option('wpvp_autoplay',false) : false; 
     426            if(is_null($autoplay)) 
     427                $autoplay = get_option('wpvp_autoplay',false) ? get_option('wpvp_autoplay',false) : false; 
     428            if(is_null($audio)) 
     429                $audio = get_option('wpvp_audio',100) ? get_option('wpvp_audio',100) : 100; 
    425430            $splash_check = get_option('wpvp_splash',false) ? get_option('wpvp_splash',false) : false; 
    426431            if($autoplay) 
     
    432437            else 
    433438                $sp = ''; 
    434             $player_code = '<video id="wpvp_videojs_'.time().'" '.$ap.'class="video-js vjs-default-skin" controls preload="none" width="'.$width.'" height="'.$height.'"'.$sp.' data-setup="{}"> 
     439            $player_code = '<video id="wpvp_videojs_'.time().'" '.$ap.'class="video-js vjs-default-skin" controls preload="none" data-audio="'.$audio.'" width="'.$width.'" height="'.$height.'"'.$sp.' data-setup="{}"> 
    435440                <source src="'.$src.'" type="video/mp4" /> 
    436441            </video>'; 
Note: See TracChangeset for help on using the changeset viewer.