Plugin Directory

Changeset 1889562


Ignore:
Timestamp:
06/08/2018 10:40:37 AM (8 years ago)
Author:
fluidplayer
Message:

Adding new options, updating to version 2.3

Location:
fluid-player/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fluid-player/trunk/FluidPlayerPlugin.php

    r1848568 r1889562  
    7676    }
    7777
    78 
    7978    /**
    8079     * @param array $attrs
     
    9190            static::VTT_SPRITE => '',
    9291            static::FP_LAYOUT  => static::FP_LAYOUT_DEFAULT_VALUE,
    93 
    9492            static::FP_OPTIONS_AUTOPLAY      => 'false',
     93            static::FP_OPTIONS_DOWNLOAD      => 'false',
     94            static::FP_OPTIONS_PLAYBACK      => 'false',
    9595            static::FP_OPTIONS_LOGO          => plugin_dir_url(__FILE__) . 'web/images/yourlogo.png',
    9696            static::FP_OPTIONS_LOGO_POSITION => 'top left',
    9797            static::FP_OPTIONS_LOGO_OPACITY  => '1',
     98            static::FP_OPTIONS_LOGO_HYPER => null,
    9899            static::FP_OPTIONS_AD_TEXT       => '',
    99100            static::FP_OPTIONS_AD_TEXT_CTA   => '',
     
    139140        }
    140141
     142        //allowDownload
     143        if ($params[static::FP_OPTIONS_DOWNLOAD_JS] !== 'false') {
     144            $options[static::FP_OPTIONS_DOWNLOAD_JS] = true;
     145        }
     146
     147        //playbackRateEnabled
     148        if ($params[static::FP_OPTIONS_PLAYBACK_JS] !== 'false') {
     149            $options[static::FP_OPTIONS_PLAYBACK_JS] = true;
     150        }
     151
    141152        //Logo
    142153        if (isset($params[static::FP_OPTIONS_LOGO_JS])) {
     
    152163            if (isset($params[static::FP_OPTIONS_LOGO_OPACITY_JS])) {
    153164                $options[static::FP_OPTIONS_LOGO_JS]['opacity'] = $params[static::FP_OPTIONS_LOGO_OPACITY_JS];
     165            }
     166
     167            if (isset($params[static::FP_OPTIONS_LOGO_HYPER_JS])) {
     168                $options[static::FP_OPTIONS_LOGO_JS]['clickUrl'] = $params[static::FP_OPTIONS_LOGO_HYPER_JS];
     169            } else {
     170                $options[static::FP_OPTIONS_LOGO_JS]['clickUrl'] = null;
    154171            }
    155172        }
     
    313330            static::FP_LAYOUT                             => static::FP_LAYOUT,
    314331            static::FP_OPTIONS_AUTOPLAY                   => static::FP_OPTIONS_AUTOPLAY_JS,
     332            static::FP_OPTIONS_DOWNLOAD                   => static::FP_OPTIONS_DOWNLOAD_JS,
     333            static::FP_OPTIONS_PLAYBACK                   => static::FP_OPTIONS_PLAYBACK_JS,
    315334            static::FP_OPTIONS_LOGO                       => static::FP_OPTIONS_LOGO_JS,
    316335            static::FP_OPTIONS_LOGO_POSITION              => static::FP_OPTIONS_LOGO_POSITION_JS,
    317336            static::FP_OPTIONS_LOGO_OPACITY               => static::FP_OPTIONS_LOGO_OPACITY_JS,
     337            static::FP_OPTIONS_LOGO_HYPER                 => static::FP_OPTIONS_LOGO_HYPER_JS,
    318338            static::FP_OPTIONS_AD_TEXT                    => static::FP_OPTIONS_AD_TEXT_JS,
    319339            static::FP_OPTIONS_AD_TEXT_CTA                => static::FP_OPTIONS_AD_TEXT_CTA_JS,
     
    353373
    354374    const FP_OPTIONS_AUTOPLAY = 'auto-play';
     375    const FP_OPTIONS_DOWNLOAD = 'allow-download';
     376    const FP_OPTIONS_PLAYBACK = 'playback-speed-control';
    355377    const FP_OPTIONS_LOGO = 'logo';
    356378    const FP_OPTIONS_LOGO_POSITION = 'logo-position';
     379    const FP_OPTIONS_LOGO_HYPER = 'logo-hyperlink';
    357380    const FP_OPTIONS_LOGO_OPACITY = 'logo-opacity';
    358381    const FP_OPTIONS_AD_TEXT = 'ad-text';
     
    365388
    366389    const FP_OPTIONS_AUTOPLAY_JS = 'autoPlay';
     390    const FP_OPTIONS_DOWNLOAD_JS = 'allowDownload';
     391    const FP_OPTIONS_PLAYBACK_JS = 'playbackRateEnabled';
    367392    const FP_OPTIONS_LOGO_JS = 'logo'; //TODO: update this
    368393    const FP_OPTIONS_LOGO_POSITION_JS = 'logoPosition';//TODO: update this
    369394    const FP_OPTIONS_LOGO_OPACITY_JS = 'logoOpacity';//TODO: update this
     395    const FP_OPTIONS_LOGO_HYPER_JS = 'clickUrl';//TODO: update this
    370396    const FP_OPTIONS_AD_TEXT_JS = 'adText';//TODO: Move to Vast
    371397    const FP_OPTIONS_AD_TEXT_CTA_JS = 'adCTAText';//TODO: Move to Vast
     
    404430        }
    405431    );
    406 }; 
     432};
    407433
    408434(function defer() {
  • fluid-player/trunk/fluid-player.php

    r1848592 r1889562  
    44Plugin URI: https://wordpress.org/support/plugin/fluid-player/
    55Description: Easily embed a Fluid Player instance on your website by using the fluid-player shortcode.
    6 Version: 2.0
     6Version: 2.3
    77Author: Florin Tudor
    88Author URI: https://www.fluidplayer.com
  • fluid-player/trunk/readme.txt

    r1848584 r1889562  
    66Donate link: http://example.com/
    77Tags: Fluid Player, html5 video player, VAST, thumbnails
    8 Version: 2.0
     8Version: 2.3
    99Requires at least: 4.6
    1010Tested up to: 4.9.4
     
    3737* vtt_sprite : path to VTT sprites file (optional)
    3838* layout : the following skins are provided with the player: default/browser, if no value is passed it will fall back to 'default'
     39* responsive : toggle responsive behavior, defaults to false
    3940* auto-play : toggle video autoplay, defaults to false
     41* playback-speed-control : Toggle playback speed widget on the control bar, defaults to false
     42* allow-download : Toggle Download button on the control bar, defaults to false
     43
    4044* logo : Logo url
    4145* logo-position: logo positioning, default value "top right"
    4246* logo-opacity : logo opacity, default value 1
     47* logo-hyperlink: URL which will open in an new tab when the logo is clicked
     48
    4349* ad-text : Ad text visible in the top right corner of the video
    4450* ad-cta-text : CTA hyperlink visible in the bottom left corner of the video
     51
    4552* html-on-pause-block-width : html banner width, default null
    4653* html-on-pause-block-height : html banner height, default null
    47 * responsive : toggle responsive behavior, defaults to false
     54
    4855
    4956Simple shortcode example:
     
    5663    vast_file="vast.xml"
    5764    layout="default"
     65
    5866    auto-play="autoPlay"
     67    allow-download="true"
     68    playback-speed-control="true"
     69
    5970    logo="https://www.fluidplayer.com/images/yourlogo.png"
    6071    logo-position="top right"
    6172    logo-opacity=".8"
     73    logo-hyperlink="https://www.fluidplayer.com/"
     74
    6275    ad-text="adText"
    6376    ad-cta-text="adCTAText"
     77
    6478    html-on-pause-block-width="100"
    6579    html-on-pause-block-height="100"
     80
    6681    responsive="true"]
    6782
Note: See TracChangeset for help on using the changeset viewer.