Plugin Directory

Changeset 1862411


Ignore:
Timestamp:
04/22/2018 04:07:01 AM (8 years ago)
Author:
vibhavsinha
Message:

new player version in plugin

Location:
vdocipher/trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • vdocipher/trunk/include/options.php

    r1780696 r1862411  
    4444         <?php
    4545            if ((get_option('vdo_embed_version')) == false) {
    46             update_option('vdo_embed_version', '0.5');
     46            update_option('vdo_embed_version', '1.5.0');
    4747            }
    4848        ?>
     
    5050        <th scope="row">Player Version</th>
    5151        <td>
    52             <?php $vdo_embed_version_vars = array('0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5'); ?>
     52            <?php $vdo_embed_version_vars = array('0.5', '1.0.0', '1.1.0', '1.1.3', '1.2.7', '1.3.3', '1.4.5','1.5.0'); ?>
    5353            <select name="vdo_embed_version" id="vdo_embed_version">
    5454                <?php
     
    6363                        if($vdo_embed_version_var === '0.5') {
    6464                            $version_old_new = ' (old player)' ; }
    65                         else {
    66                             $version_old_new = ' (new player)' ; }
     65                        elseif ($vdo_embed_version_var === '1.5.0'){
     66                            $version_old_new = ' (newest player)' ; }
     67                            else {
     68                                $version_old_new = ' (new player)' ; }
    6769                    ?>
    6870                    <option value="<?php echo $vdo_embed_version_var; ?>" <?php echo $selected; ?> >
     
    7173                <?php } ?>
    7274            </select>
     75            <p class="description">It is recommended that you use the latest player version for best video playback.</p>
    7376        </td>
    7477        </tr>
     
    9396        <th scope="row">Annotation Statement</th>
    9497        <td>
    95             <textarea name="vdo_annotate_code" type="textarea" rows="5" cols="60"><?php
     98          <div style="display: inline-flex;">
     99          <textarea name="vdo_annotate_code" id="vdo_watermarkjson" type="textarea" rows="6" cols="55" style="display: float-left"> <?php
    96100            if (get_option('vdo_annotate_code') != "") {
    97                 echo get_option('vdo_annotate_code');
    98             }
    99             ?></textarea>
    100             <p class="description">Leave this text blank in case you do not need watermark over all Videos. For details on writing the annotation code <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">check this out</a></p>
     101              echo get_option('vdo_annotate_code');
     102              $vdo_annotation_code = get_option('vdo_annotate_code');
     103           }
     104          ?>
     105          </textarea>
     106          <p class="description" style="margin-left:20px; position: relative">
     107          <span style="color:purple"><b>Sample Code for Dynamic Watermark</b></span><br/>
     108          [{'type':'rtext', 'text':' {name}', 'alpha':'0.60', 'color':'0xFF0000','size':'17','interval':'5000'}] <br/>
     109          <span style="color:purple"><b>Sample Code for Static Watermark</b></span><br/>
     110          [{'type':'text', 'text':'{ip}', 'alpha':'0.5' , 'x':'10', 'y':'100', 'color':'0xFF0000', 'size':'12'}] <br/>
     111          </p>
     112          </div>
     113          <p class="description" id="vdojsonvalidator"></p>
     114          <p class="description">Leave this text blank in case you do not need watermark over all videos. For details on writing the annotation code <a href="https://www.vdocipher.com/blog/2014/12/add-text-to-videos-with-watermark/" target="_blank">check this out</a></p>
    101115        </td>
    102116        </tr>
    103117    </table>
     118    <?php
     119        wp_enqueue_script('vdo_change_player_version',plugin_dir_url(__FILE__).'js/validatewatermark.js');
     120        wp_localize_script('vdo_change_player_version', 'vdoVersionData', array(
     121          'vdoWatermark' => $vdo_annotation_code
     122        )
     123      );
     124        ?>
    104125<?php submit_button(); ?>
    105126</form>
  • vdocipher/trunk/readme.txt

    r1780696 r1862411  
    11=== Plugin Name ===
    2 Contributors: vibhavsinha
     2Contributors: vibhavsinha, milangupta4
    33Tags: video, DRM, video plugin, sell video, e-learning, movie
    44Requires at least: 3.5.1
    5 Tested up to: 4.9.1
    6 Stable tag: 1.19
     5Tested up to: 4.9.5
     6Stable tag: 1.20
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6262== Changelog ==
    6363
     64= 1.20 =
     65* default player version set to 1.5.0
     66* corrected bugs
     67* height auto available
     68* player tech over-ride enabled to play exclusively html5, flash, zen player
     69
    6470= 1.19 =
    6571* add new player
     
    108114== Upgrade Notice ==
    109115
     116= 1.20 =
     117* default player version set to 1.5.0
     118* corrected bugs
     119* height auto available
     120* player tech over-ride enabled to play exclusively html5, flash, zen player
     121
    110122= 1.17 =
    111123* updated player theme
  • vdocipher/trunk/vdocipher.php

    r1780696 r1862411  
    44 * Plugin URI: http://www.vdocipher.com
    55 * Description: Secured video hosting for wordpress
    6  * Version: 1.19
     6 * Version: 1.20
    77 * Author: VdoCipher
    88 * Author URI: http://www.vdocipher.com
     
    4848                    'no_annotate'=> false,
    4949                    'version'=> 0,
     50                    'player_tech'=> ''
    5051                    ),
    5152        $atts
    5253    ));
     54    if((get_option('vdo_default_height')) == 'auto') {
     55      $height = 'auto';
     56    }
    5357    if (!$atts['id']) {
    5458        if (!$atts['title']) {
     
    116120    }
    117121    if ((get_option('vdo_embed_version')) == false) {
    118         update_option('vdo_embed_version', '0.5');
     122        update_option('vdo_embed_version', '1.5.0');
    119123    }
    120124    if ((get_option('vdo_player_theme')) == false) {
     
    123127    $vdo_embed_version_str = get_option('vdo_embed_version');
    124128    $vdo_player_theme = get_option('vdo_player_theme');
     129
     130    // tech override custom names start
     131    switch ($player_tech) {
     132        case "flash":
     133            $player_tech = "*,-dash";
     134            break;
     135        case "nohtml5":
     136            $player_tech = "*,-dash";
     137            break;
     138        case "noflash":
     139            $player_tech = "*,-hss";
     140            break;
     141        case "nozen":
     142            $player_tech = "*,-zen";
     143            break;
     144        case "noios":
     145            $player_tech = "*,-hlse";
     146            break;
     147        default:
     148            break;
     149    }
     150    // tech override ends
    125151
    126152    // Old Embed Code
     
    152178        $output .= "videoId: '$video'})),";
    153179        $output .= "theme: '$vdo_player_theme',";
     180        if($player_tech !== ''){
     181          $output .= "techoverride: [" ;
     182          $techarray = explode(',', $player_tech);
     183          for($i = 0; $i < sizeof($techarray); $i++){
     184            $output .= "'$techarray[$i]'";
     185            if($i !== sizeof($techarray)-1)
     186                $output .= ", ";
     187          }
     188          $output .= "],";
     189        }
    154190        $output .= "container: document.querySelector('#vdo$OTP'),});";
    155191        $output .= "</script>";
     
    180216function vdo_menu()
    181217{
    182     add_menu_page('VdoCipher Options', 'VdoCipher', 'manage_options', 'vdocipher', 'vdo_options');
     218    add_menu_page('VdoCipher Options', 'VdoCipher', 'manage_options', 'vdocipher', 'vdo_options', plugin_dir_url(__FILE__).'images/logo.png');
    183219}
    184220function vdo_options()
    185221{
    186222    if (!get_option('vdo_default_height')) {
    187         update_option('vdo_default_height', '360');
     223        update_option('vdo_default_height', 'auto');
    188224    }
    189225    if (!get_option('vdo_default_width')) {
    190         update_option('vdo_default_width', '640');
     226        update_option('vdo_default_width', '1280');
    191227    }
    192228    $vdo_client_key = get_option('vdo_client_key');
     
    229265{
    230266    if ((get_option('vdo_default_height')) == false) {
    231         update_option('vdo_default_height', '360');
     267        update_option('vdo_default_height', 'auto');
    232268    }
    233269    if ((get_option('vdo_default_width')) == false) {
    234         update_option('vdo_default_width', '640');
     270        update_option('vdo_default_width', '1280');
    235271    }
    236272    //https://stackoverflow.com/a/2173318/5022684
    237273    if ((get_option('vdo_embed_version')) == false) {
    238         update_option('vdo_embed_version', '0.5');
     274        update_option('vdo_embed_version', '1.5.0');
    239275    }
    240276    if ((get_option('vdo_player_theme')) == false) {
Note: See TracChangeset for help on using the changeset viewer.