diff --git a/css/s3-browser.css b/css/s3-browser.css index 80305ed20..4555dd835 100644 --- a/css/s3-browser.css +++ b/css/s3-browser.css @@ -375,4 +375,14 @@ right: 0; bottom: 0; z-index: 10; +} + +.job-status-completed.attachment-preview { + background: #ccf0cc; +} +.job-status-error.attachment-preview { + background: #fda5a5; +} +.job-status-processing.attachment-preview { + background: #eee69d; } \ No newline at end of file diff --git a/js/media-library-browser-base.js b/js/media-library-browser-base.js index d91761da4..be7e1a901 100644 --- a/js/media-library-browser-base.js +++ b/js/media-library-browser-base.js @@ -311,11 +311,20 @@ function fv_flowplayer_browser_browse(data, options) { } } - file.append('
' + var css_class = 'attachment-preview js--select-attachment type-video subtype-mp4 landscape'; + if( options && options.extraAttachmentClass ) { + css_class += ' ' + options.extraAttachmentClass; + } + + if( f.status ) { + css_class += ' job-status-'+f.status; + } + + file.append('
' + '
' + icon + '
' - + '
' + name + '
' + + '
' + name + '
' + ' data-extra=\''+JSON.stringify(f.extra)+'\'>' + name + '
' + '
' + progress + '
' @@ -956,6 +965,7 @@ jQuery( function($) { '\t\t\t\t
' + (!fSizeTextual ? (fSize > -1 ? fSize + ' ' + sizeSuffix : fDuration) : '') + '
\n' + (fExtraDisplayData ? '\t\t\t\t

' + fExtraDisplayData + '
\n' : '') + '\t\t\t
\n' + + '\t\t\t\t
' + ( $filenameDiv.data('status') != 'undefined' ? $filenameDiv.data('status') : '' ) + '
\n' + ( ( splashValue && $filenameDiv.data('link').match(/\.(jpg|jpeg|png|gif)$/) ) ? '
Found matching splash screen image
' : '') + '\t\t\n' + '\n' + diff --git a/models/digitalocean-spaces-browser.class.php b/models/digitalocean-spaces-browser.class.php index a1985cc45..3bd76301d 100644 --- a/models/digitalocean-spaces-browser.class.php +++ b/models/digitalocean-spaces-browser.class.php @@ -121,6 +121,6 @@ public function isSetUpCorrectly() { } global $FV_Player_DigitalOcean_Spaces_Browser; -$FV_Player_DigitalOcean_Spaces_Browser = new FV_Player_DigitalOcean_Spaces_Browser( 'wp_ajax_load_dos_assets' ); +$FV_Player_DigitalOcean_Spaces_Browser = new FV_Player_DigitalOcean_Spaces_Browser( array('ajax_action_name' => 'wp_ajax_load_dos_assets', 'browser_type' => 'dos') ); endif; diff --git a/models/digitalocean-spaces.class.php b/models/digitalocean-spaces.class.php index 50e752820..8952b5340 100644 --- a/models/digitalocean-spaces.class.php +++ b/models/digitalocean-spaces.class.php @@ -99,6 +99,11 @@ function options() { // TODO: Fix width // TODO: Add custom domain for CDN global $fv_fp; + + if( class_exists('FV_Player_Coconut') ) { + _e('FV Player Coconut is installed, this space will be used only as source.', 'fv-wordpress-flowplayer'); + } + ?> 'wp_ajax_load_s3_assets', 'browser_type' => 's3' ) ); \ No newline at end of file diff --git a/models/media-browser.php b/models/media-browser.php index d1207d9ea..ce466ba37 100644 --- a/models/media-browser.php +++ b/models/media-browser.php @@ -2,6 +2,7 @@ abstract class FV_Player_Media_Browser { + public $browser_type = 'media_browser'; public $ajax_action_name = false; private $s3_assets_loaded = false; @@ -22,6 +23,7 @@ public function __construct($args) { $args = wp_parse_args($args ,array( 'ajax_action_name' => false, 'ajax_action_name_add_new_folder' => false, + 'browser_type' => 'media_browser' ) ); @@ -183,6 +185,8 @@ function get_output_items( $output, $s3Client, $request_path, $paged, $date_form $item['items'] = array(); } + $item = apply_filters( 'fv_player_media_browser_item', $item, $this->browser_type ); + $output['items'][] = $item; if (strtolower(substr($item['name'], strrpos($item['name'], '.') + 1)) === 'ts') {