FV Flowplayer Video Player - Version 2.2.9

Version Description

  • 2014/06/04 =

  • Feature - share bar added!

  • Bugfix - annoying iOS 7 bug where black lines appear after videos - fixed!

  • Bugfix - "Convert old shortcodes with commas" option changed to work with old [flowplayer] shortcodes only

  • Bugfix - Pro extension settings forgotten if Pro extension was deactivated and options saved afterwards

  • Bugfix - shortcode editor fixes for captions

Download this release

Release Info

Developer FolioVision
Plugin Icon 128x128 FV Flowplayer Video Player
Version 2.2.9
Comparing to
See all releases

Code changes from version 2.1.52 to 2.2.9

Files changed (52) hide show
  1. controller/backend.php +425 -541
  2. controller/frontend.php +67 -31
  3. controller/shortcodes.php +117 -11
  4. css/admin.css +13 -66
  5. css/colorbox.css +3 -3
  6. css/flowplayer.css +77 -15
  7. css/img/flp-share-icons.png +0 -0
  8. css/{ad.css → license.css} +10 -0
  9. flowplayer.php +4 -6
  10. flowplayer/fv-flowplayer.min.js +169 -49
  11. includes/fp-api.php +15 -5
  12. includes/getid3/extension.cache.dbm.php +0 -208
  13. includes/getid3/extension.cache.mysql.php +0 -171
  14. includes/getid3/extension.cache.sqlite3.php +0 -264
  15. includes/getid3/getid3.lib.php +0 -1342
  16. includes/getid3/getid3.php +0 -1776
  17. includes/getid3/module.audio-video.flv.php +0 -729
  18. includes/getid3/module.audio-video.matroska.php +0 -1771
  19. includes/getid3/module.audio-video.mpeg.php +0 -296
  20. includes/getid3/module.audio-video.quicktime.php +0 -2145
  21. includes/getid3/module.audio-video.real.php +0 -527
  22. includes/getid3/module.audio-video.swf.php +0 -139
  23. includes/getid3/module.audio.ac3.php +0 -473
  24. includes/getid3/module.audio.flac.php +0 -442
  25. includes/getid3/module.audio.mp3.php +0 -2009
  26. includes/getid3/module.audio.mpc.php +0 -506
  27. includes/getid3/module.audio.ogg.php +0 -671
  28. includes/getid3/module.tag.apetag.php +0 -370
  29. includes/getid3/module.tag.id3v1.php +0 -359
  30. includes/getid3/module.tag.id3v2.php +0 -3414
  31. includes/getid3/module.tag.lyrics3.php +0 -294
  32. includes/getid3/write.id3v1.php +0 -136
  33. includes/getid3/write.id3v2.php +0 -2049
  34. includes/getid3/write.metaflac.php +0 -161
  35. includes/getid3/write.php +0 -613
  36. includes/getid3/write.real.php +0 -273
  37. includes/getid3/write.vorbiscomment.php +0 -119
  38. js/flowPlayer.js +0 -449
  39. js/pngfix.js +0 -43
  40. js/shortcode-editor.js +100 -43
  41. js/suggestions.js +0 -10
  42. models/flowplayer-frontend.php +565 -276
  43. models/flowplayer.php +221 -32
  44. readme.txt +108 -28
  45. screenshot-1.png +0 -0
  46. screenshot-3.png +0 -0
  47. screenshot-4.png +0 -0
  48. view/admin.php +246 -19
  49. view/backend-head.php +1 -3
  50. view/colours.php +1 -1
  51. view/frontend-head.php +2 -43
  52. view/wizard.php +22 -15
controller/backend.php CHANGED
@@ -28,9 +28,9 @@ $fv_fp = new flowplayer_backend();
28
/**
29
* WP Hooks
30
*/
31
- add_action('wp_ajax_fv_wp_flowplayer_support_mail', 'fv_wp_flowplayer_support_mail');
32
- add_action('wp_ajax_fv_wp_flowplayer_check_mimetype', 'fv_wp_flowplayer_check_mimetype');
33
- add_action('wp_ajax_fv_wp_flowplayer_check_template', 'fv_wp_flowplayer_check_template');
34
add_action('wp_ajax_fv_wp_flowplayer_check_files', 'fv_wp_flowplayer_check_files');
35
36
add_action('admin_head', 'flowplayer_head');
@@ -105,7 +105,15 @@ add_action('admin_notices', 'fv_wp_flowplayer_admin_notice');
105
106
107
function flowplayer_activate() {
108
- update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
109
}
110
111
@@ -194,8 +202,11 @@ function fv_wp_flowplayer_media_send_to_editor($html, $attachment_id, $attachmen
194
$serv = $_SERVER['SERVER_NAME'];
195
$pattern = '/'.$serv.'(.*)/';
196
preg_match($pattern, $uploaded_video, $matches);
197
- require_once( plugin_dir_path(__FILE__).'../includes/getid3/getid3.php');
198
- // Initialize getID3 engine
199
$getID3 = new getID3;
200
if (empty($matches)) {
201
$ThisFileInfo = $getID3->analyze(realpath($document_root . $uploaded_video));
@@ -385,9 +396,7 @@ function flowplayer_add_media_button() {
385
$button_tip = 'Insert a Flash Video Player';
386
$wizard_url = 'media-upload.php?post_id='.$post->ID.'&type=fv-wp-flowplayer';
387
$button_src = FV_FP_RELATIVE_PATH.'/images/icon.png';
388
- if(!$found) {
389
- $img = '<img src="' . $button_src . '" alt="' . $button_tip . '" />';
390
- }
391
echo '<a title="Add FV WP Flowplayer" href="#" class="fv-wordpress-flowplayer-button" >'.$img.'</a>';
392
}
393
@@ -435,9 +444,10 @@ function flowplayer_conversion_script() {
435
436
function fv_wp_flowplayer_admin_notice() {
437
if( $notices = get_option('fv_wordpress_flowplayer_deferred_notices') ) {
438
- echo '<div class="updated">
439
<p>'.$notices.'</p>
440
- </div>';
441
}
442
443
$conversion = false; //(bool)get_option('fvwpflowplayer_conversion');
@@ -462,13 +472,13 @@ function fv_wp_flowplayer_admin_enqueue_scripts( $page ) {
462
if( $page !== 'post.php' && $page !== 'post-new.php' ) {
463
return;
464
}
465
- wp_register_script('fvwpflowplayer-domwindow', plugins_url().'/fv-wordpress-flowplayer/js/jquery.colorbox-min.js',array('jquery') );
466
wp_enqueue_script('fvwpflowplayer-domwindow');
467
468
- wp_register_script('fvwpflowplayer-shortcode-editor', plugins_url().'/fv-wordpress-flowplayer/js/shortcode-editor.js',array('jquery') );
469
wp_enqueue_script('fvwpflowplayer-shortcode-editor');
470
471
- wp_register_style('fvwpflowplayer-domwindow-css', plugins_url().'/fv-wordpress-flowplayer/css/colorbox.css','','1.0','screen');
472
wp_enqueue_style('fvwpflowplayer-domwindow-css');
473
}
474
@@ -497,54 +507,102 @@ function fv_wp_flowplayer_admin_init() {
497
498
global $fv_fp;
499
global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
500
- if( preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) && isset($fv_fp->conf['key_automatic']) && $fv_fp->conf['key_automatic'] == 'true' ) {
501
502
$version = get_option( 'fvwpflowplayer_core_ver' );
503
if( version_compare( $fv_wp_flowplayer_core_ver, $version ) == 1 ) {
504
fv_wp_flowplayer_admin_key_update();
505
}
506
}
507
-
508
if(
509
- preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) && version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 && ( !isset($fv_fp->conf['key_automatic']) || $fv_fp->conf['key_automatic'] != 'true' )
510
) {
511
- global $fv_fp;
512
- $fv_fp->pointer_boxes = array(
513
- 'fv_flowplayer_key_automatic' => array(
514
- 'id' => '#wpadminbar',
515
- 'heading' => __('FV Flowplayer License Update', 'fv_flowplayer'),
516
- 'content' => __('New version of FV Flowplayer core has been installed for your licensed website. Please accept the automatic license key updating (connects to Foliovision servers) or update the key manually by loggin into your Foliovision account.', 'fv_flowplayer'),
517
- 'position' => array( 'edge' => 'top', 'align' => 'center' ),
518
- 'button1' => __('Always auto-update', 'fv_flowplayer'),
519
- 'button2' => __('I\'ll update it manually', 'fv_flowplayer')
520
- )
521
- );
522
- } else if( version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 && preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) == 0 ) {
523
- update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
524
}
525
526
527
if( isset($_GET['page']) && $_GET['page'] == 'fvplayer' ) {
528
wp_enqueue_script('common');
529
wp_enqueue_script('wp-lists');
530
wp_enqueue_script('postbox');
531
}
532
-
533
-
534
}
535
536
537
function fv_wp_flowplayer_admin_key_update() {
538
- global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver, $fv_fp;
539
-
540
- $args = array(
541
- 'body' => array( 'domain' => home_url(), 'plugin' => 'fv-wordpress-flowplayer', 'version' => $fv_wp_flowplayer_ver, 'core_ver' => $fv_wp_flowplayer_core_ver ),
542
- 'timeout' => 20,
543
- 'user-agent' => 'fv-wordpress-flowplayer-'.$fv_wp_flowplayer_ver.' ('.$fv_wp_flowplayer_core_ver.')'
544
- );
545
- $resp = wp_remote_post( 'http://foliovision.com/?fv_remote=true', $args );
546
547
- if( $resp['body'] && $data = json_decode( $resp['body'] ) ) {
548
if( $data->domain && $data->key && stripos( home_url(), $data->domain ) !== false ) {
549
$fv_fp->conf['key'] = $data->key;
550
update_option( 'fvwpflowplayer', $fv_fp->conf );
@@ -552,11 +610,31 @@ function fv_wp_flowplayer_admin_key_update() {
552
return true;
553
}
554
} else {
555
return false;
556
}
557
}
558
559
560
function fv_wp_flowplayer_edit_form_after_editor( ) {
561
include dirname( __FILE__ ) . '/../view/wizard.php';
562
}
@@ -580,7 +658,7 @@ function fv_wp_flowplayer_after_plugin_row( $arg) {
580
<tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
581
<td class="plugin-update colspanchange" colspan="3">
582
<div class="update-message">
583
- <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Christmas sale!
584
</div>
585
</td>
586
</tr>
@@ -590,24 +668,30 @@ function fv_wp_flowplayer_after_plugin_row( $arg) {
590
}
591
592
593
- function fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random ) {
594
global $fv_fp;
595
596
- $video_errors = array();
597
598
if( $headers && $headers['response']['code'] == '404' ) {
599
- $video_errors[] = 'File not found (HTTP 404)!';
600
} else if( $headers && $headers['response']['code'] == '403' ) {
601
- $video_errors[] = 'Access to video forbidden (HTTP 403)!';
602
} else if( $headers && $headers['response']['code'] != '200' && $headers['response']['code'] != '206' ) {
603
- $video_errors[] = 'Can\'t check the video (HTTP '.$headers['response']['code'].')!';
604
} else {
605
606
if(
607
( !isset($headers['headers']['accept-ranges']) || $headers['headers']['accept-ranges'] != 'bytes' ) &&
608
!isset($headers['headers']['content-range'])
609
) {
610
- $video_errors[] = 'Server does not support HTTP range requests! Please check "I\'m getting error about \'HTTP range requests\'" in <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq">our FAQ</a>.';
611
}
612
613
if(
@@ -639,13 +723,18 @@ function fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random ) {
639
AddType video/mp4 .mov
640
# hls transport stream segments:
641
AddType video/mp2t .ts</pre>
642
- <p>If you are using Microsoft IIS, you need to use the IIS manager. Check our <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq" target="_blank">FAQ</a> for more info.</p>
643
</div>';
644
645
- $video_errors[] = '<p><strong>Bad mime type</strong>: Video served with a bad mime type <tt>'.$headers['headers']['content-type'].'</tt>!'.$meta_note_addition.' (<a href="#" onclick="jQuery(\'.fix-meta-'.$random.'\').toggle(); return false">show fix</a>)</p>'.$fix ;
646
}
647
}
648
- return $video_errors;
649
}
650
651
@@ -653,6 +742,51 @@ function fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random ) {
653
function fv_wp_flowplayer_http_api_curl( $handle ) {
654
curl_setopt( $handle, CURLOPT_NOBODY, true );
655
}
656
657
658
function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
@@ -670,90 +804,40 @@ function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
670
671
if( isset($URLs) ) {
672
$all_sources = $URLs;
673
-
674
- $video_warnings = array();
675
- $video_errors = array();
676
- $video_info = array();
677
- $message = false;
678
- $new_info = false;
679
-
680
foreach( $all_sources AS $source ) {
681
if( preg_match( '!^rtmp://!', $source, $match ) ) {
682
$found_rtmp = true;
683
- } else {
684
- if( preg_match('!^http://(www\.)?youtube!',$source) ) {
685
- $video_errors[] = 'Youtube video embeding not supported yet. Please download the video file and put it in as a source directly.';
686
- } else if( !isset($media) && !preg_match( '!\.(m3u8|m3u|avi)$!', $source) ) {
687
- $media = $source;
688
- }
689
-
690
- if( preg_match( '!\.(mp4|m4v)$!', $source, $match ) ) {
691
- $found_mp4 = true;
692
- } else if( preg_match( '!\.mov$!', $source, $match ) ) {
693
- $video_warnings[] = 'We recommend that you re-encode your MOV video into MP4 format. MOV is not be 100% compatible with HTML5 and might not play in Google Chrome. <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only" target="_blank">Read our article about video encoding</a>';
694
- } else if( preg_match( '!\.flv$!', $source, $match ) ) {
695
- $found_flv = true;
696
- } else if( preg_match( '!\.(m3u8|m3u)$!', $source, $match ) ) {
697
- $found_m3u8 = true;
698
- } else if( preg_match( '!\.(avi)$!', $source, $match ) ) {
699
- $found_avi = true;
700
- } else if( preg_match( '!\.(3gp)$!', $source, $match ) ) {
701
- $found_3gp = true;
702
- } else if( preg_match( '!\.(webm)$!', $source, $match ) ) {
703
- $found_webm = true;
704
- }
705
}
706
- }
707
-
708
- if( isset($found_flv) && !isset($found_mp4) ) {
709
- $video_warnings[] = 'We recommend that you re-encode your FLV video into MP4 format or also provide the video in MP4 format. FLV is not compatible with HTML5 and won\'t play on devices without Flash (iPhone, iPad...). <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only">Read our article about video encoding</a>';
710
- }
711
-
712
- if( isset($found_rtmp) && !isset($found_mp4) ) {
713
- $video_warnings[] = 'We recommend that you also provide your RTMP video in MP4 format. RTMP is not compatible with HTML5 and won\'t play on devices without Flash (iPhone, iPad...). <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only">Read our article about video encoding</a>';
714
- }
715
-
716
- if( isset($found_3gp) && !isset($found_mp4) ) {
717
- $video_warnings[] = 'We recommend that you re-encode your 3GP video into a MP4 format. 3GP is not compatible with all HTML5 players so it won\'t play on these devices if they don\'t have Flash. <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only">Read our article about video encoding</a>';
718
- }
719
-
720
- if( isset($found_m3u8) && count($all_sources) == 1 ) {
721
- $video_warnings[] = 'We recommend that you also provide your M3U8 video in MP4 or WEBM format. HTTP Live Streaming (m3u8) is only supported by Apple iOS devices (iPhone, iPad...). <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only">Read our article about video encoding</a>';
722
- }
723
-
724
- if( isset($found_avi) ) {
725
- $video_errors[] = 'AVI format is not supported by neither HTML5 nor Flash. Please re-encode the video to MP4. <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/encoding#flash-only">Read our article about video encoding</a>';
726
- }
727
-
728
//$random = rand( 0, 10000 );
729
$random = (isset($_POST['hash'])) ? trim($_POST['hash']) : false;
730
731
if( isset($media) ) {
732
$remotefilename = $media;
733
- $url_parts = parse_url( $remotefilename );
734
- $url_parts_encoded = parse_url( $remotefilename );
735
- if( !empty($url_parts['path']) ) {
736
- $url_parts['path'] = join('/', array_map('rawurlencode', explode('/', $url_parts_encoded['path'])));
737
- }
738
- if( !empty($url_parts['query']) ) {
739
- $url_parts['query'] = str_replace( '&amp;', '&', $url_parts_encoded['query'] );
740
- }
741
-
742
- $url_parts['path'] = str_replace( '%2B', '+', $url_parts['path'] );
743
-
744
- $remotefilename_encoded = http_build_url($remotefilename, $url_parts);
745
-
746
if( $fv_fp->is_secure_amazon_s3($remotefilename_encoded) || 1>0 ) { // skip headers check for Amazon S3, as it's slow
747
$headers = false;
748
} else {
749
$headers = wp_remote_head( trim( str_replace(' ', '%20', $remotefilename_encoded ) ), array( 'method' => 'GET', 'redirection' => 3 ) );
750
}
751
752
if( is_wp_error($headers) ) {
753
$video_errors[] = 'Error checking '.$media.'!<br />'.print_r($headers,true);
754
} else {
755
if( $headers ) {
756
- $video_errors += fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random );
757
}
758
759
if( function_exists('is_utf8') && is_utf8($remotefilename) ) {
@@ -764,53 +848,43 @@ function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
764
$video_warnings[] = 'Detailed video check is not available with PHP Safe Mode On. Please contact your webhost support.';
765
} else {
766
767
- require_once( plugin_dir_path(__FILE__).'../includes/getid3/getid3.php');
768
$getID3 = new getID3;
769
770
- preg_match( '~^\S+://([^/]+)~', $remotefilename, $remote_domain );
771
- preg_match( '~^\S+://([^/]+)~', home_url(), $site_domain );
772
-
773
if( !function_exists('curl_init') ) {
774
$video_errors[] = 'cURL for PHP not found, please contact your server administrator.';
775
- } else if( strlen($remote_domain[1]) > 0 && strlen($site_domain[1]) > 0 && $remote_domain[1] != $site_domain[1] ) {
776
$message = '<p>Analysis of <a class="bluelink" target="_blank" href="'.esc_attr($remotefilename_encoded).'">'.$remotefilename_encoded.'</a></p>';
777
- $video_info['File'] = 'Remote';
778
779
// taken from: http://www.getid3.org/phpBB3/viewtopic.php?f=3&t=1141
780
$upload_dir = wp_upload_dir();
781
$localtempfilename = trailingslashit( $upload_dir['basedir'] ).'fv_flowlayer_tmp_'.md5(rand(1,999)).'_'.basename( substr($remotefilename_encoded,0,32) );
782
-
783
$out = fopen( $localtempfilename,'wb' );
784
if( $out ) {
785
786
- $ch = curl_init();
787
- curl_setopt( $ch, CURLOPT_URL, $remotefilename_encoded );
788
- curl_setopt( $ch, CURLOPT_RANGE, '0-2097152' );
789
- curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
790
- if( !@ini_get('open_basedir') ) {
791
- @curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
792
- }
793
- curl_setopt( $ch, CURLOPT_HEADER, true );
794
- curl_setopt( $ch, CURLOPT_VERBOSE, 1 );
795
- curl_setopt( $ch, CURLOPT_USERAGENT, 'FV Flowplayer video checker/'.$fv_wp_flowplayer_ver);
796
-
797
- $data = curl_exec($ch);
798
-
799
- $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
800
- $header = substr($data, 0, $header_size);
801
- $body = substr($data, $header_size);
802
-
803
- file_put_contents( $localtempfilename, $body);
804
- if($ch == false) {
805
- $message .= 'CURL Error: '.curl_error ( $ch);
806
}
807
- curl_close($ch);
808
fclose($out);
809
810
if( !$headers ) {
811
$headers = WP_Http::processHeaders( $header );
812
-
813
- $video_errors += fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random );
814
if( isset($hearders['headers']['server']) && $hearders['headers']['server'] == 'AmazonS3' && $headers['response']['code'] == '403' ) {
815
$error = new SimpleXMLElement($body);
816
@@ -822,43 +896,24 @@ function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
822
823
}
824
}
825
-
826
- $ThisFileInfo = $getID3->analyze( $localtempfilename );
827
828
if( !@unlink($localtempfilename) ) {
829
$video_errors[] = 'Can\'t remove temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
830
- }
831
} else {
832
$video_errors[] = 'Can\'t create temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
833
}
834
- } else {
835
- $a_link = str_replace( '&amp;', '&', $remotefilename );
836
- $message = '<p>Analysis of <a class="bluelink" target="_blank" href="'.esc_attr($a_link).'">'.$a_link.'</a></p>';
837
- $video_info['File'] = 'Local';
838
-
839
- $document_root = ( isset($_SERVER['SUBDOMAIN_DOCUMENT_ROOT']) && strlen(trim($_SERVER['SUBDOMAIN_DOCUMENT_ROOT'])) > 0 ) ? $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'] : $_SERVER['DOCUMENT_ROOT'];
840
-
841
- global $blog_id;
842
- if( isset($blog_id) && $blog_id > 1 ) {
843
- $upload_dir = wp_upload_dir();
844
- if( stripos($remotefilename, $upload_dir['baseurl']) !== false ) {
845
- $localtempfilename = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $remotefilename );
846
- } else {
847
- $localtempfilename = preg_replace( '~^\S+://[^/]+~', trailingslashit($document_root), preg_replace( '~(\.[a-z]{1,4})/files/~', '$1/wp-content/blogs.dir/'.$blog_id.'/files/', $remotefilename ) );
848
- }
849
- } else {
850
- $localtempfilename = preg_replace( '~^\S+://[^/]+~', trailingslashit($document_root), $remotefilename );
851
- }
852
-
853
- $ThisFileInfo = $getID3->analyze( $localtempfilename );
854
}
855
-
856
857
/*
858
Only check file length
859
*/
860
if( isset($meta_action) && $meta_action == 'check_time' ) {
861
-
862
if( isset($ThisFileInfo['playtime_seconds']) ) {
863
$time = $ThisFileInfo['playtime_seconds'];
864
}
@@ -869,282 +924,11 @@ function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
869
update_post_meta( $post->ID, '_fv_flowplayer', $fv_flowplayer_meta );
870
return;
871
}
872
-
873
-
874
- if( isset($ThisFileInfo['error']) ) {
875
- fv_wp_flowplayer_array_search_by_item( 'not correctly handled', $ThisFileInfo['error'], $check, true );
876
- if( $check ) {
877
- $video_info['Warning'] = 'Video checker doesn\'t support this format.';
878
- } else {
879
- $video_errors[] = implode( '<br />', $ThisFileInfo['error'] );
880
- }
881
- }
882
-
883
- if( isset($ThisFileInfo['fileformat']) ) {
884
- $video_info['Format'] = $ThisFileInfo['fileformat'];
885
- }
886
-
887
- if( isset($ThisFileInfo['quicktime']) ) {
888
- if( !isset($ThisFileInfo['quicktime']['moov']) ) {
889
- $video_warnings[] = 'Video meta data (moov-atom) not found at the start of the file! Please move the meta data to the start of video, otherwise it might have a slow start up time. Plese check the "How do I fix the bad metadata (moov) position?" question in <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq" target="_blank">FAQ</a>.';
890
- } else {
891
- if( $ThisFileInfo['quicktime']['moov']['offset'] > 1024 ) {
892
- $video_warnings[] = 'Meta Data (moov) not found at the start of the file (found at '. number_format( $ThisFileInfo['quicktime']['moov']['offset'] ).' byte)! Please move the meta data to the start of video, otherwise it might have a slow start up time. Plese check the "How do I fix the bad metadata (moov) position?" question in <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq" target="_blank">FAQ</a>.';
893
- } else {
894
- $video_info['Moov position'] = $ThisFileInfo['quicktime']['moov']['offset'];
895
- }
896
-
897
- /*if( isset($ThisFileInfo['quicktime']['moov']['subatoms']) ) {
898
- foreach( $ThisFileInfo['quicktime']['moov']['subatoms'] AS $subatom ) {
899
- if( $subatom['hierarchy'] == 'trak' ) {
900
-
901
- }
902
- }
903
- }*/
904
-
905
- fv_wp_flowplayer_array_search_by_item( 'stts', $ThisFileInfo, $stts );
906
- if( isset($stts[0]) && $stts[0]['number_entries'] > 1 ) {
907
- $video_info['Seek points'] = $stts[0]['number_entries'].' (stts)';
908
- } else {
909
- if( isset($stts[0]['time_to_sample_table'][0]['sample_count']) ) {
910
- $video_info['Seek points'] = $stts[0]['time_to_sample_table'][0]['sample_count'].' (stts sample count)';
911
- } else {
912
- //$video_warnings[] = 'Only one seeking point found, it might be slow to seek in the video.'; // not so useful
913
- }
914
- }
915
-
916
- }
917
- }
918
-
919
- if( isset($ThisFileInfo['audio']['streams']) ) {
920
- $count_streams = count( $ThisFileInfo['audio']['streams'] );
921
- if( $count_streams == 1 ) {
922
- $video_info['Audio'] = $count_streams.' stream, ';
923
- } else {
924
- $video_info['Audio'] = $count_streams.' streams, ';
925
- }
926
- foreach( $ThisFileInfo['audio']['streams'] AS $stream ) {
927
- foreach( array( 'dataformat', 'codec', 'sample_rate', 'channels', 'bits_per_sample', 'channelmode' ) AS $item ) {
928
- if( isset( $stream[$item] ) ) {
929
- $add = $stream[$item];
930
- switch( $item ) {
931
- case 'codec' : $add = '('.$add.')'; break;
932
- case 'sample_rate' : $add .= 'Hz, '; break;
933
- case 'bits_per_sample' : $add .= 'bit, '; break;
934
- case 'channels' : $add .= ' channels, '; break;
935
- }
936
- $video_info['Audio'] .= $add.' ';
937
- }
938
- }
939
- $video_info['Audio'] .= '|';
940
- }
941
- $video_info['Audio'] = trim( $video_info['Audio'], '|' );
942
- }
943
-
944
- $video_info['Video'] = array();
945
- if( isset($ThisFileInfo['video']['streams']) ) {
946
- $count_streams = count( $ThisFileInfo['video']['streams'] );
947
- if( $count_streams == 1 ) {
948
- $video_info['Video'] = $count_streams.' stream, ';
949
- } else {
950
- $video_info['Video'] = $count_streams.' streams, ';
951
- }
952
- foreach( $ThisFileInfo['video']['streams'] AS $stream ) {
953
- foreach( array( 'dataformat', 'resolution_x', 'resolution_y', 'frame_rate' ) AS $item ) {
954
- if( isset( $stream[$item] ) ) {
955
- $add = $stream[$item];
956
- switch( $item ) {
957
- case 'resolution_x' : $add .= ' x'; break;
958
- case 'resolution_y' : $add .= ', '; break;
959
- case 'frame_rate' : $add .= ' fps '; break;
960
- }
961
- $video_info['Video'] .= $add.' ';
962
- }
963
- }
964
- $video_info['Video'] .= '|';
965
- }
966
- $video_info['Video'] = trim( $video_info['Video'], '|' );
967
968
- if( isset($ThisFileInfo['video']['bitrate']) ) {
969
- $video_info['Video'] .= number_format( ceil($ThisFileInfo['video']['bitrate']/1024) ).'Kbps ';
970
- }
971
- }
972
-
973
- if( isset($ThisFileInfo['video']['fourcc']) ) {
974
- if( !isset($video_info['Video']) ) $video_info['Video'] = array();
975
- $video_info['Video'][] .= $ThisFileInfo['video']['fourcc'].' codec';
976
- }
977
-
978
- if( isset($ThisFileInfo['quicktime']['ftyp']['signature']) ) {
979
- $video_info['Video'][] .= $ThisFileInfo['quicktime']['ftyp']['signature'].' file type ';
980
- if( strcasecmp( trim($ThisFileInfo['quicktime']['ftyp']['signature']), 'M4V' ) === 0 && preg_match( '~.m4v$~', $remotefilename ) ) {
981
- $m4v_note_addition = false;
982
- /*if( $fv_fp->conf['engine'] == 'default' ) {
983
- $m4v_note_addition = ' Currently you are using the "Default (mixed)" <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">Preferred Flowplayer engine</a> setting, so Firefox on Windows will always use Flash for M4V and will play fine.';
984
- } */
985
- $video_errors[] = 'We recommend that you change file extension of M4V videos to MP4, to avoid issues with Firefox on PC. '.$m4v_note_addition;
986
- }
987
- }
988
-
989
- if( isset($ThisFileInfo['video']['codec']) && $ThisFileInfo['video']['codec'] == 'MPEG-1' ) {
990
- $video_info['Video'] = 'MPEG-1 Codec';
991
- $video_errors[] = 'MPEG-1 is not a valid HTML5 video format. You need to re-encode the video into MP4.';
992
- }
993
-
994
- if( isset($video_info['Video']) && is_array($video_info['Video']) ) {
995
- $video_info['Video'] = implode( ', ', $video_info['Video'] );
996
-
997
- $video_format_info = array( 'avc1' => 'H.264 Encoder', 'mp42' => 'MS-MPEG4 v2 Decoder' );
998
- foreach( $video_format_info AS $key => $item ) {
999
- $video_info['Video'] = str_replace( $key, $key.' ('.$item.')', $video_info['Video'] );
1000
- }
1001
- }
1002
-
1003
-
1004
}
1005
} // end is_wp_error check
1006
1007
} // end isset($media)
1008
-
1009
-
1010
- if( $video_errors ) {
1011
- foreach( $video_errors AS $key => $item ) {
1012
- if( preg_match( '!Atom at offset \d+ claims to go beyond end-of-file!', $item ) ) {
1013
- unset( $video_errors[$key] ); // we are not interested in this particular warning, as we don't download the full file
1014
- }
1015
- }
1016
- }
1017
-
1018
-
1019
- if( $video_errors ) {
1020
- $message_items = array();
1021
- foreach( $video_errors AS $key => $item ) {
1022
- if( $item && stripos( $item, '</p>' ) === false ) {
1023
- $item = '<p><strong>Error</strong>: '.$item.'</p>';
1024
- }
1025
- $message_items[] = $item;
1026
- }
1027
- $message .= implode("\n", $message_items);
1028
- }
1029
-
1030
- if( $video_warnings ) {
1031
- $message_items = array();
1032
- foreach( $video_warnings AS $key => $item ) {
1033
- if( $item && stripos( $item, '</p>' ) === false ) {
1034
- $item = '<p><strong>Warning</strong>: '.$item.'</p>';
1035
- }
1036
- $message_items[] = $item;
1037
- }
1038
- $message .= implode("\n", $message_items);
1039
- }
1040
-
1041
-
1042
- if( isset($video_info) ) {
1043
- $message_items = array();
1044
- foreach( $video_info AS $key => $item ) {
1045
- $message_item = '';
1046
- if( !is_int($key) ) {
1047
- $message_item .= $key.': ';
1048
- }
1049
- $message_item .= '<tt>'.$item.'</tt>';
1050
- $message_items[] = $message_item;
1051
- }
1052
- $message .= '<p>'.implode("<br />\n", $message_items).'</p>';
1053
- }
1054
-
1055
- $message = '<div class="mail-content-notice">'.$message.'</div>';
1056
-
1057
- if( isset($ThisFileInfo) && $ThisFileInfo ) {
1058
- $more_info = var_export($ThisFileInfo,true);
1059
-
1060
- $note = '(Note: read about remote file analysis in <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq">FAQ</a>)';
1061
- $more_info = str_replace( array('Unknown QuickTime atom type', 'Atom at offset'), array($note.' Unknown QuickTime atom type', $note.' Atom at offset'), $more_info );
1062
-
1063
- $lines = explode( "\n", $more_info );
1064
-
1065
- $depth = 0;
1066
- $new_info = '<p>'.$note.'</p><div class="fv-wp-flowplayer-notice-parsed level-0">';
1067
- foreach( $lines AS $line ) {
1068
- $class = ( $depth > 0 ) ? ' indent' : '';
1069
-
1070
- if( strcmp( trim($line), 'array (' ) == 0 ) {
1071
- if( $depth == 0 ) {
1072
- $new_info .= '<div class="fv-wp-flowplayer-notice-parsed level-0 row close"></div>';
1073
- }
1074
- $depth++;
1075
- $new_info .= '<div class="fv-wp-flowplayer-notice-parsed level-'.$depth.''.$class.'">';
1076
- continue;
1077
- }
1078
- if( strcmp( trim($line), '),' ) == 0 ) {
1079
- $depth--;
1080
- $new_info .= '</div><!-- .level-'.$depth.' -->';
1081
- $new_info .= '<div class="fv-wp-flowplayer-notice-parsed level-'.$depth.' row close"></div>';
1082
- continue;
1083
- }
1084
-
1085
-
1086
- if( $depth > 7 ) {
1087
- $style = ' fv-wp-fp-hidden';
1088
- } else {
1089
- $style = '';
1090
- }
1091
-
1092
- $line_i = explode( " => ", trim($line), 2 );
1093
- if( !$line_i ) {
1094
- continue;
1095
- }
1096
-
1097
- $line_html = '<div class="row'.$class.$style.'"><span>'.ucfirst( str_replace( "' =>", '', trim($line_i[0],"' ")) ).'</span><span class="value">'.( (isset($line_i[1])) ? trim(rtrim($line_i[1],", "),"' ") : '' ).'</span><div style="clear:both;"></div></div>';
1098
-
1099
- $new_info .= $line_html."\n";
1100
- }
1101
- $new_info .= '</div>';
1102
-
1103
- }
1104
-
1105
- $message .= '<div class="support-'.$random.'">';
1106
- $message .= '<textarea id="wpfp_support_'.$random.'" class="wpfp_message_field" onclick="if( this.value == \'Enter your comment\' ) this.value = \'\'" style="width: 98%; height: 150px">Enter your comment</textarea>';
1107
- $message .= '<p><a class="techinfo" href="#" onclick="jQuery(\'.more-'.$random.'\').toggle(); return false">Technical info</a> <img id="wpfp_spin_'.$random.'" src="'.site_url().'/wp-includes/images/wpspin.gif" style="display: none; " /> <input type="button" onclick="fv_wp_flowplayer_admin_support_mail(\''.$random.'\', this); return false" value="Send report to Foliovision" /></p>';
1108
- $message .= '</div>';
1109
- $message .= '<div class="more-'.$random.' mail-content-details" style="display: none; "><p>Plugin version: '.$fv_wp_flowplayer_ver.'</p>'.$new_info.'</div>';
1110
-
1111
-
1112
- if( count($video_errors) > 0 ) {
1113
- $issues_text = '<span class="vid-issues">Video Issues</span>';
1114
- } else if( count($video_warnings) ) {
1115
- $issues_text = '<span class="vid-warning">Video Warnings</span>';
1116
- } else {
1117
- $issues_text = '<span class="vid-ok">Video OK</span>';
1118
- }
1119
- $message = "<div onclick='fv_wp_flowplayer_admin_show_notice(\"$random\", this.parent); return false' class='fv_wp_flowplayer_notice_head'>Report Issue</div><small>Admin: <a class='fv_wp_flowplayer_dialog_link' href='#' onclick='fv_wp_flowplayer_admin_show_notice(\"$random\", this); return false'>$issues_text</a></small><div id='fv_wp_fp_notice_$random' class='fv_wp_fp_notice_content' style='display: none;'>$message</div>\n";
1120
-
1121
- $json = @json_encode( array( $message, count( $video_errors ), count( $video_warnings ) ) );
1122
- $last_error = ( function_exists('json_last_error') ) ? json_last_error() : true;
1123
-
1124
- if( $last_error ) {
1125
- if( function_exists('mb_check_encoding') && function_exists('utf8_encode') ) {
1126
- if(!mb_check_encoding($message, 'UTF-8')) {
1127
- $message = utf8_encode($message);
1128
- }
1129
- } else {
1130
- $message = htmlentities( $message, ENT_QUOTES, 'utf-8', FALSE);
1131
- $message = ( $message ) ? $message : 'Admin: Error parsing JSON';
1132
- }
1133
-
1134
- $json = json_encode( array( $message, count( $video_errors ), count( $video_warnings ) ) );
1135
- $last_error = ( function_exists('json_last_error') ) ? json_last_error() : false;
1136
- if( $last_error ) {
1137
- echo json_encode( array( 'Admin: JSON error: '.$last_error, count( $video_errors ), count( $video_warnings ) ) );
1138
- } else {
1139
- echo $json;
1140
- }
1141
- } else {
1142
- echo $json;
1143
- }
1144
- die();
1145
-
1146
- } else {
1147
- die('-1');
1148
}
1149
}
1150
@@ -1166,12 +950,7 @@ function fv_wp_flowplayer_check_script_version( $url ) {
1166
}
1167
1168
1169
- function fv_wp_flowplayer_check_jquery_version( $url, &$array, $key ) {
1170
- if( preg_match( '!/jquery(\.[a-zA-Z]{2,}|-[a-zA-Z]{3,})[^/]*?\.js!', $url ) ) { // jquery.ui.core.min.js, jquery-outline-1.1.js
1171
- unset( $array[$key] );
1172
- return 2;
1173
- }
1174
-
1175
$url_mod = preg_replace( '!\?.+!', '', $url );
1176
if( preg_match( '!(\d+.[\d\.]+)!', $url_mod, $version ) && $version[1] ) {
1177
if( version_compare($version[1], '1.7.1') == -1 ) {
@@ -1200,12 +979,16 @@ function fv_wp_flowplayer_check_files() {
1200
if( stripos( $_SERVER['HTTP_REFERER'], home_url() ) === 0 ) {
1201
global $wpdb;
1202
define('VIDEO_DIR', '/videos/');
1203
1204
- $videos1 = $wpdb->get_results( "SELECT ID, post_content FROM $wpdb->posts WHERE post_type != 'revision' AND post_content LIKE '%[flowplayer %'" );
1205
- $videos2 = $wpdb->get_results( "SELECT ID, post_content FROM $wpdb->posts WHERE post_type != 'revision' AND post_content LIKE '%[fvplayer %'" );
1206
1207
$videos = array_merge( $videos1, $videos2 );
1208
-
1209
$source_servers = array();
1210
1211
$shortcodes_count = 0;
@@ -1243,77 +1026,49 @@ function fv_wp_flowplayer_check_files() {
1243
1244
$ok = array();
1245
$errors = array();
1246
-
1247
$count = 0;
1248
foreach( $source_servers AS $server => $videos ) {
1249
-
1250
- //echo $server."\n";
1251
-
1252
if( stripos( trim($videos[0]['src']), 'rtmp://' ) === false ) {
1253
- $headers = get_headers( trim($videos[0]['src']) );
1254
- }
1255
- if( isset($headers) && $headers ) {
1256
-
1257
- $posts_links = '';
1258
- foreach( $videos AS $video ) {
1259
- $posts_links .= '<a href="'.home_url().'?p='.$video['post_id'].'">'.$video['post_id'].'</a> ';
1260
- }
1261
-
1262
- foreach( $headers AS $line ) {
1263
- if( stripos( $line, 'Content-Type:' ) !== FALSE ) {
1264
- preg_match( '~Content-Type: (\S+)$~', $line, $match );
1265
- $mime_matched = ( isset($match[1]) ) ? $match[1] : '';
1266
-
1267
- if(
1268
- ( !preg_match( '~video/mp4$~', $line ) && stripos( $videos[0]['src'], '.mp4' ) !== FALSE ) ||
1269
- ( !preg_match( '~video/x-m4v$~', $line ) && stripos( $videos[0]['src'], '.m4v' ) !== FALSE )
1270
- ) {
1271
- if( strpos( $server, 'amazonaws' ) !== false ) {
1272
- $fix = '<p>It\'s important to set this correctly, otherwise the videos will not play in HTML5 mode in Internet Explorer 9 and 10.</p><blockquote><code>Using your Amazon AWS Management Console, you can go though your videos and find file content type under the "Metadata" tab in an object\'s "Properties" pane and fix it to "video/mp4" for MP4 and "video/x-m4v" for M4V files.</code></blockquote>';
1273
- } else {
1274
- $fix = '<p>It\'s important to set this correctly, otherwise the videos will not play in HTML5 mode in Internet Explorer 9 and 10.</p><p>Make sure you put this into your .htaccess file, or ask your server admin to upgrade the web server mime type configuration:</p> <blockquote><pre><code>AddType video/mp4 .mp4
1275
- AddType video/webm .webm
1276
- AddType video/ogg .ogv
1277
- AddType application/x-mpegurl .m3u8
1278
- AddType video/x-m4v .m4v
1279
- # hls transport stream segments:
1280
- AddType video/mp2t .ts</code></pre></blockquote>';
1281
- }
1282
-
1283
- $errors[] = 'Server <code>'.$server.'</code> uses bad mime type <code>'.$mime_matched.'</code> for MP4 or M4V videos! (<a href="#" onclick="jQuery(\'#fv-flowplayer-warning-'.$count.'\').toggle(); return false">click to see a list of posts</a>) (<a href="#" onclick="jQuery(\'#fv-flowplayer-info-'.$count.'\').toggle(); return false">show fix</a>) <div id="fv-flowplayer-warning-'.$count.'" style="display: none; ">'.$posts_links.'</div> <div id="fv-flowplayer-info-'.$count.'" style="display: none; ">'.$fix.'</div>';
1284
- } else if(
1285
- ( !preg_match( '~video/webm$~', $line ) && stripos( $videos[0]['src'], '.webm' ) !== FALSE )
1286
- ) {
1287
- if( strpos( $server, 'amazonaws' ) !== false ) {
1288
- $fix = '<p>It\'s important to set this correctly, otherwise the videos will not play in older Firefox.</p><blockquote><code>Using your Amazon AWS Management Console, you can go though your videos and find file content type under the "Metadata" tab in an object\'s "Properties" pane and fix it to "video/webm" for WEBM videos.</code></blockquote>';
1289
- } else {
1290
- $fix = '<p>It\'s important to set this correctly, otherwise the videos will not play in older Firefox.</p><p>Make sure you put this into your .htaccess file, or ask your server admin to upgrade the web server mime type configuration:</p> <blockquote><pre><code>AddType video/mp4 .mp4
1291
- AddType video/webm .webm
1292
- AddType video/ogg .ogv
1293
- AddType application/x-mpegurl .m3u8
1294
- AddType video/x-m4v .m4v
1295
- # hls transport stream segments:
1296
- AddType video/mp2t .ts</code></pre></blockquote>';
1297
- }
1298
-
1299
- $errors[] = 'Server <code>'.$server.'</code> uses bad mime type <code>'.$mime_matched.'</code> for MP4 or M4V videos! (<a href="#" onclick="jQuery(\'#fv-flowplayer-warning-'.$count.'\').toggle(); return false">click to see a list of posts</a>) (<a href="#" onclick="jQuery(\'#fv-flowplayer-info-'.$count.'\').toggle(); return false">show fix</a>) <div id="fv-flowplayer-warning-'.$count.'" style="display: none; ">'.$posts_links.'</div> <div id="fv-flowplayer-info-'.$count.'" style="display: none; ">'.$fix.'</div>';
1300
- } else if( stripos( $videos[0]['src'], '.mp4' ) !== FALSE || stripos( $videos[0]['src'], '.m4v' ) !== FALSE ) {
1301
- $ok[] = 'Server <code>'.$server.'</code> appears to serve correct mime type <code>'.$mime_matched.'</code> for MP4 and M4V videos.';
1302
- }
1303
- }
1304
- }
1305
-
1306
- $count++;
1307
- }
1308
-
1309
- if( $server == 'http://lifeinamovie.com' ) {
1310
- //break;
1311
- }
1312
-
1313
}
1314
1315
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1316
- echo json_encode($output);
1317
die();
1318
}
1319
die('-1');
@@ -1329,18 +1084,14 @@ function fv_wp_flowplayer_check_template() {
1329
if( is_wp_error( $response ) ) {
1330
$error_message = $response->get_error_message();
1331
$output = array( 'error' => $error_message );
1332
- } else {
1333
-
1334
- $active_plugins = get_option( 'active_plugins' );
1335
foreach( $active_plugins AS $plugin ) {
1336
if( stripos( $plugin, 'wp-minify' ) !== false ) {
1337
$errors[] = "You are using <strong>WP Minify</strong>, so the script checks would not be accurate. Please check your videos manually.";
1338
- $wp_minify_options = get_option('wp_minify');
1339
- if( isset($wp_minify_options['js_in_footer']) && $wp_minify_options['js_in_footer'] ) {
1340
- $errors[] = "Please make sure that you turn off Settings -> WP Minify -> 'Place Minified JavaScript in footer'.";
1341
- }
1342
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1343
- echo json_encode($output);
1344
die();
1345
}
1346
}
@@ -1348,19 +1099,21 @@ function fv_wp_flowplayer_check_template() {
1348
if( function_exists( 'w3_instance' ) && $minify = w3_instance('W3_Plugin_Minify') ) {
1349
if( $minify->_config->get_boolean('minify.js.enable') ) {
1350
$errors[] = "You are using <strong>W3 Total Cache</strong> with JS Minify enabled. The template check might not be accurate. Please check your videos manually.";
1351
}
1352
}
1353
-
1354
- if( stripos($response['body'],'<!--fv-flowplayer-footer-->') === false ) {
1355
- $errors[] = "It appears that your template is not using the wp_footer() hook. Advanced FV Flowplayer functions may not work properly.";
1356
- } else {
1357
- $ok[] = "wp_footer found in your template!";
1358
- }
1359
1360
$response['body'] = preg_replace( 'lt;!--[\s\S]+?-->#x27;, '', $response['body'] ); // handle HTML comments
1361
1362
// check Flowplayer scripts
1363
- preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?flowplayer[^\'"]*?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $flowplayer_scripts );
1364
if( count($flowplayer_scripts[1]) > 0 ) {
1365
if( count($flowplayer_scripts[1]) > 1 ) {
1366
$errors[] = "It appears there are <strong>multiple</strong> Flowplayer scripts on your site, your videos might not be playing, please check. There might be some other plugin adding the script.";
@@ -1375,13 +1128,13 @@ function fv_wp_flowplayer_check_template() {
1375
}
1376
}
1377
} else if( count($flowplayer_scripts[1]) < 1 ) {
1378
- $errors[] = "It appears there are <strong>no</strong> Flowplayer scripts on your site, your videos might not be playing, please check. Check your header.php file if it contains wp_head() function call!";
1379
}
1380
1381
1382
// check jQuery scripts
1383
- preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?jquery[^\'"]*?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $jquery_scripts );
1384
- if( count($jquery_scripts[1]) > 0 ) {
1385
foreach( $jquery_scripts[1] AS $jkey => $jquery_script ) {
1386
$check = fv_wp_flowplayer_check_jquery_version( $jquery_script, $jquery_scripts[1], $jkey );
1387
if( $check == - 1 ) {
@@ -1395,28 +1148,28 @@ function fv_wp_flowplayer_check_template() {
1395
$errors[] = "jQuery library <code>$jquery_script</code> found, but unable to check version, please make sure it's at least 1.7.1.";
1396
}
1397
}
1398
if( count($jquery_scripts[1]) > 1 ) {
1399
- $errors[] = "It appears there are <strong>multiple</strong> jQuery libraries on your site, your videos might not be playing, please check.\n";
1400
}
1401
} else if( count($jquery_scripts[1]) < 1 ) {
1402
$errors[] = "It appears there are <strong>no</strong> jQuery library on your site, your videos might not be playing, please check.\n";
1403
}
1404
1405
1406
- if( $fv_flowplayer_pos > 0 && $jquery_pos > 0 && $jquery_pos > $fv_flowplayer_pos ) {
1407
$errors[] = "It appears your Flowplayer JavaScript library is loading before jQuery. Your videos probably won't work. Please make sure your jQuery library is loading using the standard Wordpress function - wp_enqueue_scripts(), or move it above wp_head() in your header.php template.";
1408
}
1409
-
1410
-
1411
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1412
}
1413
- echo json_encode($output);
1414
die();
1415
}
1416
1417
die('-1');
1418
}
1419
-
1420
1421
function fv_wp_flowplayer_array_search_by_item( $find, $in_array, &$found, $like = false ) {
1422
global $fv_wp_flowplayer_array_search_by_item_depth;
@@ -1560,6 +1313,137 @@ function fv_wp_flowplayer_pointers_ajax() {
1560
}
1561
die();
1562
}
1563
}
1564
1565
- ?>
28
/**
29
* WP Hooks
30
*/
31
+ add_action('wp_ajax_fv_wp_flowplayer_support_mail', 'fv_wp_flowplayer_support_mail');
32
+ add_action('wp_ajax_fv_wp_flowplayer_activate_extension', 'fv_wp_flowplayer_activate_extension');
33
+ add_action('wp_ajax_fv_wp_flowplayer_check_template', 'fv_wp_flowplayer_check_template');
34
add_action('wp_ajax_fv_wp_flowplayer_check_files', 'fv_wp_flowplayer_check_files');
35
36
add_action('admin_head', 'flowplayer_head');
105
106
107
function flowplayer_activate() {
108
+
109
+ }
110
+
111
+
112
+ function flowplayer_deactivate() {
113
+ if( flowplayer::is_licensed() ) {
114
+ delete_transient( 'fv_flowplayer_license' );
115
+ }
116
+ delete_option( 'fv_flowplayer_extension_install' );
117
}
118
119
202
$serv = $_SERVER['SERVER_NAME'];
203
$pattern = '/'.$serv.'(.*)/';
204
preg_match($pattern, $uploaded_video, $matches);
205
+
206
+ // Initialize getID3 engine
207
+ if ( ! class_exists( 'getID3' ) ) {
208
+ require( ABSPATH . WPINC . '/ID3/getid3.php' );
209
+ }
210
$getID3 = new getID3;
211
if (empty($matches)) {
212
$ThisFileInfo = $getID3->analyze(realpath($document_root . $uploaded_video));
396
$button_tip = 'Insert a Flash Video Player';
397
$wizard_url = 'media-upload.php?post_id='.$post->ID.'&type=fv-wp-flowplayer';
398
$button_src = FV_FP_RELATIVE_PATH.'/images/icon.png';
399
+ $img = (!$found) ? '<img src="' . $button_src . '" alt="' . $button_tip . '" />' : '';
400
echo '<a title="Add FV WP Flowplayer" href="#" class="fv-wordpress-flowplayer-button" >'.$img.'</a>';
401
}
402
444
445
function fv_wp_flowplayer_admin_notice() {
446
if( $notices = get_option('fv_wordpress_flowplayer_deferred_notices') ) {
447
+ echo '<div class="updated inline">
448
<p>'.$notices.'</p>
449
+ </div>';
450
+ delete_option('fv_wordpress_flowplayer_deferred_notices');
451
}
452
453
$conversion = false; //(bool)get_option('fvwpflowplayer_conversion');
472
if( $page !== 'post.php' && $page !== 'post-new.php' ) {
473
return;
474
}
475
+ wp_register_script('fvwpflowplayer-domwindow', flowplayer::get_plugin_url().'/js/jquery.colorbox-min.js',array('jquery') );
476
wp_enqueue_script('fvwpflowplayer-domwindow');
477
478
+ wp_register_script('fvwpflowplayer-shortcode-editor', flowplayer::get_plugin_url().'/js/shortcode-editor.js',array('jquery') );
479
wp_enqueue_script('fvwpflowplayer-shortcode-editor');
480
481
+ wp_register_style('fvwpflowplayer-domwindow-css', flowplayer::get_plugin_url().'/css/colorbox.css','','1.0','screen');
482
wp_enqueue_style('fvwpflowplayer-domwindow-css');
483
}
484
507
508
global $fv_fp;
509
global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
510
+ if(
511
+ preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) &&
512
+ (
513
+ ( isset($fv_fp->conf['key_automatic']) && $fv_fp->conf['key_automatic'] == 'true' ) ||
514
+ ( isset($fv_fp->conf['video_checker_agreement']) && $fv_fp->conf['video_checker_agreement'] == 'true' )
515
+ )
516
+ ) {
517
518
$version = get_option( 'fvwpflowplayer_core_ver' );
519
if( version_compare( $fv_wp_flowplayer_core_ver, $version ) == 1 ) {
520
fv_wp_flowplayer_admin_key_update();
521
}
522
}
523
+
524
if(
525
+ isset($fv_fp->conf['disable_videochecker']) && $fv_fp->conf['disable_videochecker'] == 'false' &&
526
+ ( !isset($fv_fp->conf['video_checker_agreement']) || $fv_fp->conf['video_checker_agreement'] != 'true' ) &&
527
+ ( !isset($fv_fp->conf['key_automatic']) || $fv_fp->conf['key_automatic'] != 'true' )
528
) {
529
+ $fv_fp->pointer_boxes['fv_flowplayer_video_checker_service'] = array(
530
+ 'id' => '#wp-admin-bar-new-content',
531
+ 'pointerClass' => 'fv_flowplayer_video_checker_service',
532
+ 'heading' => __('FV Player Video Checker', 'fv_flowplayer'),
533
+ 'content' => __("<p>FV Player includes a free video checker which will check your videos for any encoding errors and helps ensure smooth playback of all your videos. To work its magic, our video checker must contact our server.</p><p>Would you like to enable the video encoding checker?</p>", 'fv_flowplayer'),
534
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
535
+ 'button1' => __('Allow', 'fv_flowplayer'),
536
+ 'button2' => __('Disable the video checker', 'fv_flowplayer')
537
+ );
538
+ } else {
539
+ if(
540
+ preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) && version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 &&
541
+ ( !isset($fv_fp->conf['key_automatic']) || $fv_fp->conf['key_automatic'] != 'true' ) &&
542
+ ( !isset($fv_fp->conf['video_checker_agreement']) || $fv_fp->conf['video_checker_agreement'] != 'true' )
543
+ ) {
544
+ $fv_fp->pointer_boxes['fv_flowplayer_key_automatic'] = array(
545
+ 'id' => '#wp-admin-bar-new-content',
546
+ 'pointerClass' => 'fv_flowplayer_key_automatic',
547
+ 'pointerWidth' => 340,
548
+ 'heading' => __('FV Flowplayer License Update', 'fv_flowplayer'),
549
+ 'content' => __('New version of FV Flowplayer core has been installed for your licensed website. Please accept the automatic license key updating (connects to Foliovision servers) or update the key manually by loggin into your Foliovision account.', 'fv_flowplayer'),
550
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
551
+ 'button1' => __('Always auto-update', 'fv_flowplayer'),
552
+ 'button2' => __("I'll update it manually", 'fv_flowplayer')
553
+ );
554
+ } else if( version_compare( $fv_wp_flowplayer_core_ver, get_option('fvwpflowplayer_core_ver') ) !== 0 && preg_match( '!^\$\d+!', $fv_fp->conf['key'] ) == 0 ) {
555
+ update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
556
+ }
557
}
558
+
559
+ $aOptions = get_option( 'fvwpflowplayer' );
560
+ if( !isset($aOptions['version']) || version_compare( $fv_wp_flowplayer_ver, $aOptions['version'] ) ) {
561
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer upgraded - please click "Check template" and "Check videos" for automated check of your site at <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer">the settings page</a> for automated checks!' );
562
563
+ $aOptions['version'] = $fv_wp_flowplayer_ver;
564
+ update_option( 'fvwpflowplayer', $aOptions );
565
+ $fv_fp->css_writeout();
566
+ }
567
568
if( isset($_GET['page']) && $_GET['page'] == 'fvplayer' ) {
569
wp_enqueue_script('common');
570
wp_enqueue_script('wp-lists');
571
wp_enqueue_script('postbox');
572
}
573
+
574
+
575
+ if( flowplayer::is_licensed() ) {
576
+ if ( false === ( $aCheck = get_transient( 'fv_flowplayer_license' ) ) ) {
577
+ $aCheck = fv_wp_flowplayer_license_check( array('action' => 'check') );
578
+ if( $aCheck ) {
579
+ set_transient( 'fv_flowplayer_license', $aCheck, 60*60*24 );
580
+ } else {
581
+ set_transient( 'fv_flowplayer_license', json_decode(json_encode( array('error' => 'Error checking license') ), FALSE), 60*60*24 );
582
+ }
583
+ }
584
+
585
+ $aCheck = get_transient( 'fv_flowplayer_license' );
586
+ $aInstalled = get_option('fv_flowplayer_extension_install');
587
+ if(
588
+ isset($aCheck->valid) && $aCheck->valid &&
589
+ (
590
+ !isset($aInstalled['fv_player_pro']) ||
591
+ ( isset($_REQUEST['nonce_fv_player_pro_install']) && wp_verify_nonce( $_REQUEST['nonce_fv_player_pro_install'], 'fv_player_pro_install') )
592
+ )
593
+ ) {
594
+ fv_wp_flowplayer_install_extension('fv_player_pro');
595
+ }
596
+
597
+ }
598
}
599
600
601
function fv_wp_flowplayer_admin_key_update() {
602
+ global $fv_fp, $fv_wp_flowplayer_core_ver;
603
604
+ $data = fv_wp_flowplayer_license_check( array('action' => 'key_update') );
605
+ if( isset($data->domain) ) { // todo: test
606
if( $data->domain && $data->key && stripos( home_url(), $data->domain ) !== false ) {
607
$fv_fp->conf['key'] = $data->key;
608
update_option( 'fvwpflowplayer', $fv_fp->conf );
610
return true;
611
}
612
} else {
613
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer License upgrade failed - please check if you are running the plugin on your licensed domain.' );
614
+ update_option( 'fvwpflowplayer_core_ver', $fv_wp_flowplayer_core_ver );
615
return false;
616
}
617
}
618
619
620
+ function fv_wp_flowplayer_license_check( $aArgs ) {
621
+ global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
622
+
623
+ $args = array(
624
+ 'body' => array( 'plugin' => 'fv-wordpress-flowplayer', 'version' => $fv_wp_flowplayer_ver, 'core_ver' => $fv_wp_flowplayer_core_ver, 'type' => home_url(), 'action' => $aArgs['action'] ),
625
+ 'timeout' => 20,
626
+ 'user-agent' => 'fv-wordpress-flowplayer-'.$fv_wp_flowplayer_ver.' ('.$fv_wp_flowplayer_core_ver.')'
627
+ );
628
+ $resp = wp_remote_post( 'http://foliovision.com/?fv_remote=true', $args );
629
+
630
+ if( isset($resp['body']) && $resp['body'] && $data = json_decode( preg_replace( '~[\s\S]*?<FVFLOWPLAYER>(.*?)</FVFLOWPLAYER>[\s\S]*?~', '$1', $resp['body'] ) ) ) {
631
+ return $data;
632
+ } else {
633
+ return false;
634
+ }
635
+ }
636
+
637
+
638
function fv_wp_flowplayer_edit_form_after_editor( ) {
639
include dirname( __FILE__ ) . '/../view/wizard.php';
640
}
658
<tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
659
<td class="plugin-update colspanchange" colspan="3">
660
<div class="update-message">
661
+ <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Easter sale!
662
</div>
663
</td>
664
</tr>
668
}
669
670
671
+ function fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random, $args = false ) {
672
global $fv_fp;
673
+
674
+ $args = wp_parse_args( $args, array( 'talk_bad_mime' => 'Video served with a bad mime type' , 'wrap'=>'p' ) );
675
676
+ $sOutput = '';
677
678
+ $bFatal = false;
679
if( $headers && $headers['response']['code'] == '404' ) {
680
+ $video_errors[] = 'File not found (HTTP 404)!';
681
+ $bFatal = true;
682
} else if( $headers && $headers['response']['code'] == '403' ) {
683
+ $video_errors[] = 'Access to video forbidden (HTTP 403)!';
684
+ $bFatal = true;
685
} else if( $headers && $headers['response']['code'] != '200' && $headers['response']['code'] != '206' ) {
686
+ $video_errors[] = 'Can\'t check the video (HTTP '.$headers['response']['code'].')!';
687
+ $bFatal = true;
688
} else {
689
690
if(
691
( !isset($headers['headers']['accept-ranges']) || $headers['headers']['accept-ranges'] != 'bytes' ) &&
692
!isset($headers['headers']['content-range'])
693
) {
694
+ $video_errors[] = 'Server does not support HTTP range requests! Please check <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq#getting-error-about-range-requests">our FAQ</a>.';
695
}
696
697
if(
723
AddType video/mp4 .mov
724
# hls transport stream segments:
725
AddType video/mp2t .ts</pre>
726
+ <p>If you are using Microsoft IIS, you need to use the IIS manager. Check our <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/faq#video-doesnt-play-internet-explorer" target="_blank">FAQ</a> for more info.</p>
727
</div>';
728
729
+ $sOutput = ( $args['wrap'] ) ? '<'.$args['wrap'].'>' : '';
730
+ $sOutput .= '<strong>Bad mime type</strong>: '.$args['talk_bad_mime'].' <tt>'.$headers['headers']['content-type'].'</tt>!'.$meta_note_addition.' (<a href="#" onclick="jQuery(\'.fix-meta-'.$random.'\').toggle(); return false">show fix</a>)';
731
+ $sOutput .= ( $args['wrap'] ) ? '</'.$args['wrap'].'>' : '';
732
+ $sOutput .= $fix;
733
+ $video_errors[] = $sOutput;
734
}
735
}
736
+
737
+ return array( $video_errors, (isset($headers['headers']['content-type'])) ? $headers['headers']['content-type'] : '', $bFatal );
738
}
739
740
742
function fv_wp_flowplayer_http_api_curl( $handle ) {
743
curl_setopt( $handle, CURLOPT_NOBODY, true );
744
}
745
+
746
+
747
+ function fv_wp_flowplayer_http( $sURL, $args ) {
748
+ global $fv_wp_flowplayer_ver;
749
+
750
+ $args = wp_parse_args( $args, array( 'file' => false, 'size' => 2097152, 'quick_check' => false ) );
751
+ extract($args);
752
+
753
+ $iTimeout = ($quick_check) ? 10 : 20;
754
+
755
+ $ch = curl_init();
756
+ curl_setopt( $ch, CURLOPT_URL, $sURL );
757
+ curl_setopt( $ch, CURLOPT_RANGE, '0-'.$size );
758
+ curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
759
+ if( !@ini_get('open_basedir') ) {
760
+ @curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, true );
761
+ }
762
+ curl_setopt( $ch, CURLOPT_HEADER, true );
763
+ curl_setopt( $ch, CURLOPT_VERBOSE, 1 );
764
+ curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT, $iTimeout );
765
+ curl_setopt( $ch, CURLOPT_TIMEOUT, $iTimeout );
766
+ curl_setopt( $ch, CURLOPT_USERAGENT, 'FV Flowplayer video checker/'.$fv_wp_flowplayer_ver);
767
+
768
+ $data = curl_exec($ch);
769
+
770
+ $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
771
+ $header = substr($data, 0, $header_size);
772
+ $body = substr($data, $header_size);
773
+
774
+ if( $file ) {
775
+ file_put_contents( $file, $body);
776
+ }
777
+ $sError = ($ch == false) ? 'CURL Error: '.curl_error ( $ch) : false;
778
+ if( curl_errno($ch) == 28 ) {
779
+ $sError .= "Connection timeout, can't check the video.";
780
+ } else if(!curl_errno($ch) ) {
781
+ $aInfo = curl_getinfo($ch);
782
+ if( $aInfo['total_time'] > $iTimeout*0.9 ) {
783
+ $sError .= "Connection timeout, can't check the video.";
784
+ }
785
+ }
786
+ curl_close($ch);
787
+
788
+ return array( $header, $sError );
789
+ }
790
791
792
function fv_wp_flowplayer_check_mimetype( $URLs = false, $meta = false ) {
804
805
if( isset($URLs) ) {
806
$all_sources = $URLs;
807
+
808
foreach( $all_sources AS $source ) {
809
if( preg_match( '!^rtmp://!', $source, $match ) ) {
810
$found_rtmp = true;
811
+ } else if( !isset($media) && !preg_match( '!\.(m3u8|m3u|avi)$!', $source) ) {
812
+ $media = $source;
813
}
814
+ }
815
+
816
//$random = rand( 0, 10000 );
817
$random = (isset($_POST['hash'])) ? trim($_POST['hash']) : false;
818
819
if( isset($media) ) {
820
$remotefilename = $media;
821
+ $remotefilename_encoded = flowplayer::get_encoded_url($remotefilename);
822
+
823
if( $fv_fp->is_secure_amazon_s3($remotefilename_encoded) || 1>0 ) { // skip headers check for Amazon S3, as it's slow
824
$headers = false;
825
} else {
826
$headers = wp_remote_head( trim( str_replace(' ', '%20', $remotefilename_encoded ) ), array( 'method' => 'GET', 'redirection' => 3 ) );
827
}
828
829
+ $bValidFile = true;
830
if( is_wp_error($headers) ) {
831
$video_errors[] = 'Error checking '.$media.'!<br />'.print_r($headers,true);
832
} else {
833
if( $headers ) {
834
+ list( $aVideoErrors, $sContentType, $bFatal ) = fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random );
835
+ if( $bFatal ) {
836
+ $bValidFile = false;
837
+ }
838
+ if( $aVideoErrors ) {
839
+ $video_errors = array_merge( $video_errors, $aVideoErrors );
840
+ }
841
}
842
843
if( function_exists('is_utf8') && is_utf8($remotefilename) ) {
848
$video_warnings[] = 'Detailed video check is not available with PHP Safe Mode On. Please contact your webhost support.';
849
} else {
850
851
+ if ( ! class_exists( 'getID3' ) ) {
852
+ require( ABSPATH . WPINC . '/ID3/getid3.php' );
853
+ }
854
$getID3 = new getID3;
855
856
if( !function_exists('curl_init') ) {
857
$video_errors[] = 'cURL for PHP not found, please contact your server administrator.';
858
+ } else {
859
$message = '<p>Analysis of <a class="bluelink" target="_blank" href="'.esc_attr($remotefilename_encoded).'">'.$remotefilename_encoded.'</a></p>';
860
861
// taken from: http://www.getid3.org/phpBB3/viewtopic.php?f=3&t=1141
862
$upload_dir = wp_upload_dir();
863
$localtempfilename = trailingslashit( $upload_dir['basedir'] ).'fv_flowlayer_tmp_'.md5(rand(1,999)).'_'.basename( substr($remotefilename_encoded,0,32) );
864
+
865
$out = fopen( $localtempfilename,'wb' );
866
if( $out ) {
867
+ list( $header, $sHTTPError ) = fv_wp_flowplayer_http( $remotefilename_encoded, array( 'file' => $localtempfilename ) );
868
+
869
870
+ if( $sHTTPError ) {
871
+ $video_errors[] = $sHTTPError;
872
+ $bValidFile = false;
873
}
874
fclose($out);
875
876
if( !$headers ) {
877
$headers = WP_Http::processHeaders( $header );
878
+
879
+ list( $aVideoErrors, $sContentType, $bFatal ) = fv_wp_flowplayer_check_headers( $headers, $remotefilename, $random );
880
+ if( $bFatal ) {
881
+ $bValidFile = false;
882
+ }
883
+
884
+ if( $aVideoErrors ) {
885
+ $video_errors = array_merge( $video_errors, $aVideoErrors );
886
+ }
887
+
888
if( isset($hearders['headers']['server']) && $hearders['headers']['server'] == 'AmazonS3' && $headers['response']['code'] == '403' ) {
889
$error = new SimpleXMLElement($body);
890
896
897
}
898
}
899
900
+ if( $bValidFile ) {
901
+ $ThisFileInfo = $getID3->analyze( $localtempfilename );
902
+ }
903
if( !@unlink($localtempfilename) ) {
904
$video_errors[] = 'Can\'t remove temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
905
+ }
906
} else {
907
$video_errors[] = 'Can\'t create temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
908
}
909
}
910
+
911
912
/*
913
Only check file length
914
*/
915
if( isset($meta_action) && $meta_action == 'check_time' ) {
916
+
917
if( isset($ThisFileInfo['playtime_seconds']) ) {
918
$time = $ThisFileInfo['playtime_seconds'];
919
}
924
update_post_meta( $post->ID, '_fv_flowplayer', $fv_flowplayer_meta );
925
return;
926
}
927
928
}
929
} // end is_wp_error check
930
931
} // end isset($media)
932
}
933
}
934
950
}
951
952
953
+ function fv_wp_flowplayer_check_jquery_version( $url, &$array, $key ) {
954
$url_mod = preg_replace( '!\?.+!', '', $url );
955
if( preg_match( '!(\d+.[\d\.]+)!', $url_mod, $version ) && $version[1] ) {
956
if( version_compare($version[1], '1.7.1') == -1 ) {
979
if( stripos( $_SERVER['HTTP_REFERER'], home_url() ) === 0 ) {
980
global $wpdb;
981
define('VIDEO_DIR', '/videos/');
982
+
983
+ $bNotDone = false;
984
+ $tStart = microtime(true);
985
+ $tMax = ( @ini_get('max_execution_time') ) ? @ini_get('max_execution_time') - 5 : 25;
986
987
+ $videos1 = $wpdb->get_results( "SELECT ID, post_content FROM $wpdb->posts WHERE post_type != 'revision' AND post_status != 'trash' AND post_content LIKE '%[flowplayer %'" );
988
+ $videos2 = $wpdb->get_results( "SELECT ID, post_content FROM $wpdb->posts WHERE post_type != 'revision' AND post_status != 'trash' AND post_content LIKE '%[fvplayer %'" );
989
990
$videos = array_merge( $videos1, $videos2 );
991
+
992
$source_servers = array();
993
994
$shortcodes_count = 0;
1026
1027
$ok = array();
1028
$errors = array();
1029
+
1030
$count = 0;
1031
foreach( $source_servers AS $server => $videos ) {
1032
+
1033
+ $tCurrent = microtime(true);
1034
+ if( $tCurrent - $tStart > $tMax ) {
1035
+ $bNotDone = true;
1036
+ break;
1037
+ }
1038
+
1039
+ if( stripos( $videos[0]['src'], '.mp4' ) === FALSE /*&& stripos( $videos[0]['src'], '.m4v' ) === FALSE*/ ) {
1040
+ continue;
1041
+ }
1042
+
1043
if( stripos( trim($videos[0]['src']), 'rtmp://' ) === false ) {
1044
+ list( $header, $message_out ) = fv_wp_flowplayer_http( trim($videos[0]['src']), array( 'quick_check' => 'true', 'size' => 65536 ) );
1045
+ if( $header ) {
1046
+ $headers = WP_Http::processHeaders( $header );
1047
+ list( $new_errors, $mime_type, $fatal ) = fv_wp_flowplayer_check_headers( $headers, trim($videos[0]['src']), rand(0,999), array( 'talk_bad_mime' => 'Server <code>'.$server.'</code> uses incorrect mime type for MP4 ', 'wrap' => false ) );
1048
+ if( $fatal ) {
1049
+ continue;
1050
+ }
1051
+ if( $new_errors ) {
1052
+ $sPostsLinks = false;
1053
+ foreach( $videos AS $video ) {
1054
+ $sPostsLinks .= '<a href="'.home_url().'?p='.$video['post_id'].'">'.$video['post_id'].'</a> ';
1055
+ }
1056
+ $errors[] = $new_errors.'(<a href="#" onclick="jQuery(\'#fv-flowplayer-warning-'.$count.'\').toggle(); return false">click to see a list of posts</a>) <div id="fv-flowplayer-warning-'.$count.'" style="display: none; ">'.$sPostsLinks.'</div>';
1057
+ $count++;
1058
+ continue;
1059
+ } else {
1060
+ $ok[] = 'Server <code>'.$server.'</code> appears to serve correct mime type <code>'.$mime_type.'</code> for MP4 videos.';
1061
+ }
1062
+ }
1063
+ }
1064
}
1065
+
1066
+ if( $bNotDone ) {
1067
+ $ok[] = '<strong>Not all the servers were checked as you use a lot of them, increase your PHP execution time or check your other videos by hand.</strong>';
1068
+ }
1069
1070
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1071
+ echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
1072
die();
1073
}
1074
die('-1');
1084
if( is_wp_error( $response ) ) {
1085
$error_message = $response->get_error_message();
1086
$output = array( 'error' => $error_message );
1087
+ } else {
1088
+
1089
+ $active_plugins = get_option( 'active_plugins' );
1090
foreach( $active_plugins AS $plugin ) {
1091
if( stripos( $plugin, 'wp-minify' ) !== false ) {
1092
$errors[] = "You are using <strong>WP Minify</strong>, so the script checks would not be accurate. Please check your videos manually.";
1093
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1094
+ echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
1095
die();
1096
}
1097
}
1099
if( function_exists( 'w3_instance' ) && $minify = w3_instance('W3_Plugin_Minify') ) {
1100
if( $minify->_config->get_boolean('minify.js.enable') ) {
1101
$errors[] = "You are using <strong>W3 Total Cache</strong> with JS Minify enabled. The template check might not be accurate. Please check your videos manually.";
1102
+ $output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1103
+ echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
1104
}
1105
}
1106
+
1107
+ if( stripos( $response['body'], '/html5.js') === FALSE && stripos( $response['body'], '/html5shiv.js') === FALSE ) {
1108
+ $errors[] = 'html5.js not found in your template! Videos might not play in old browsers, like Internet Explorer 6-8. Get it <a href="https://code.google.com/p/html5shim/">here</a> and put it into your template.';
1109
+ }
1110
1111
+ $ok[] = 'Template checker has changed. Just open any of your videos on your site and see if you get a red warning message about JavaScript not working.';
1112
+
1113
$response['body'] = preg_replace( 'lt;!--[\s\S]+?-->#x27;, '', $response['body'] ); // handle HTML comments
1114
1115
// check Flowplayer scripts
1116
+ preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?flowplayer[0-9.-]*?(?:\.min)?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $flowplayer_scripts );
1117
if( count($flowplayer_scripts[1]) > 0 ) {
1118
if( count($flowplayer_scripts[1]) > 1 ) {
1119
$errors[] = "It appears there are <strong>multiple</strong> Flowplayer scripts on your site, your videos might not be playing, please check. There might be some other plugin adding the script.";
1128
}
1129
}
1130
} else if( count($flowplayer_scripts[1]) < 1 ) {
1131
+ $errors[] = "It appears there are <strong>no</strong> Flowplayer scripts on your site, your videos might not be playing, please check. Check your template's header.php file if it contains wp_head() function call and footer.php should contain wp_footer()!";
1132
}
1133
1134
1135
// check jQuery scripts
1136
+ preg_match_all( '!<script[^>]*?src=[\'"]([^\'"]*?jquery[0-9.-]*?(?:\.min)?\.js[^\'"]*?)[\'"][^>]*?>\s*?</script>!', $response['body'], $jquery_scripts );
1137
+ if( count($jquery_scripts[1]) > 0 ) {
1138
foreach( $jquery_scripts[1] AS $jkey => $jquery_script ) {
1139
$check = fv_wp_flowplayer_check_jquery_version( $jquery_script, $jquery_scripts[1], $jkey );
1140
if( $check == - 1 ) {
1148
$errors[] = "jQuery library <code>$jquery_script</code> found, but unable to check version, please make sure it's at least 1.7.1.";
1149
}
1150
}
1151
+
1152
if( count($jquery_scripts[1]) > 1 ) {
1153
+ $errors[] = "It appears there are <strong>multiple</strong> jQuery libraries on your site, your videos might not be playing or may play with defects, please check.\n";
1154
}
1155
} else if( count($jquery_scripts[1]) < 1 ) {
1156
$errors[] = "It appears there are <strong>no</strong> jQuery library on your site, your videos might not be playing, please check.\n";
1157
}
1158
1159
1160
+ if( $fv_flowplayer_pos > 0 && $jquery_pos > 0 && $jquery_pos > $fv_flowplayer_pos && count($jquery_scripts[1]) < 1 ) {
1161
$errors[] = "It appears your Flowplayer JavaScript library is loading before jQuery. Your videos probably won't work. Please make sure your jQuery library is loading using the standard Wordpress function - wp_enqueue_scripts(), or move it above wp_head() in your header.php template.";
1162
}
1163
+
1164
$output = array( 'errors' => $errors, 'ok' => $ok/*, 'html' => $response['body'] */);
1165
}
1166
+ echo '<FVFLOWPLAYER>'.json_encode($output).'</FVFLOWPLAYER>';
1167
die();
1168
}
1169
1170
die('-1');
1171
}
1172
+
1173
1174
function fv_wp_flowplayer_array_search_by_item( $find, $in_array, &$found, $like = false ) {
1175
global $fv_wp_flowplayer_array_search_by_item_depth;
1313
}
1314
die();
1315
}
1316
+
1317
+ if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_video_checker_service' && isset($_POST['value']) ) {
1318
+ check_ajax_referer('fv_flowplayer_video_checker_service');
1319
+ $conf = get_option( 'fvwpflowplayer' );
1320
+ if( $conf ) {
1321
+ if( $_POST['value'] == 'true' ) {
1322
+ $conf['disable_videochecker'] = 'false';
1323
+ $conf['video_checker_agreement'] = 'true';
1324
+ } else {
1325
+ $conf['disable_videochecker'] = 'true';
1326
+ }
1327
+ update_option( 'fvwpflowplayer', $conf );
1328
+ }
1329
+ die();
1330
+ }
1331
}
1332
+
1333
+
1334
+ // allow .vtt subtitle files
1335
+ add_filter( 'wp_check_filetype_and_ext', 'fv_flowplayer_filetypes', 10, 4 );
1336
+
1337
+ function fv_flowplayer_filetypes( $aFile ) {
1338
+ $aArgs = func_get_args();
1339
+ foreach( array( 'vtt', 'webm', 'ogg') AS $item ) {
1340
+ if( isset($aArgs[2]) && preg_match( '~\.'.$item.'~', $aArgs[2] ) ) {
1341
+ $aFile['type'] = $item;
1342
+ $aFile['ext'] = $item;
1343
+ $aFile['proper_filename'] = $aArgs[2];
1344
+ }
1345
+ }
1346
+ return $aFile;
1347
+ }
1348
+
1349
+
1350
+ /*
1351
+ * Check the extension info from plugin license transient and activate the plugin
1352
+ */
1353
+ function fv_wp_flowplayer_install_extension( $plugin_package = 'fv_player_pro' ) {
1354
+ global $hook_suffix;
1355
+
1356
+ $aInstalled = ( get_option('fv_flowplayer_extension_install' ) ) ? get_option('fv_flowplayer_extension_install' ) : array();
1357
+ $aInstalled = array_merge( $aInstalled, array( $plugin_package => false ) );
1358
+ update_option('fv_flowplayer_extension_install', $aInstalled );
1359
+
1360
+ $aPluginInfo = get_transient( 'fv_flowplayer_license' );
1361
+ $plugin_basename = $aPluginInfo->{$plugin_package}->slug;
1362
+ $download_url = $aPluginInfo->{$plugin_package}->url;
1363
+
1364
+ $url = wp_nonce_url( site_url().'/wp-admin/options-general.php?page=fvplayer', 'fv_player_pro_install', 'nonce_fv_player_pro_install' );
1365
+
1366
+ set_current_screen();
1367
+
1368
+ ob_start();
1369
+ if ( false === ( $creds = request_filesystem_credentials( $url, '', false, false, false ) ) ) {
1370
+ $form = ob_get_clean();
1371
+ include( ABSPATH . 'wp-admin/admin-header.php' );
1372
+ echo fv_wp_flowplayer_install_extension_talk($form);
1373
+ include( ABSPATH . 'wp-admin/admin-footer.php' );
1374
+ die;
1375
+ }
1376
+
1377
+ if ( ! WP_Filesystem( $creds ) ) {
1378
+ ob_start();
1379
+ request_filesystem_credentials( $url, $method, true, false, false );
1380
+ $form = ob_get_clean();
1381
+ include( ABSPATH . 'wp-admin/admin-header.php' );
1382
+ echo fv_wp_flowplayer_install_extension_talk($form);
1383
+ include( ABSPATH . 'wp-admin/admin-footer.php' );
1384
+ die;
1385
+ }
1386
+
1387
+ require_once ABSPATH . 'wp-admin/includes/class-wp-upgrader.php';
1388
+
1389
+ if( !is_plugin_active($plugin_basename) || is_wp_error(validate_plugin($plugin_basename)) ) {
1390
+ echo '<div style="display: none;">';
1391
+ $objInstaller = new Plugin_Upgrader();
1392
+ $objInstaller->install( $download_url );
1393
+ echo '</div>';
1394
+ wp_cache_flush();
1395
+
1396
+ if ( is_wp_error( $objInstaller->skin->result ) ) {
1397
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension install failed - '.$objInstaller->skin->result->get_error_message() );
1398
+ $bResult = false;
1399
+ } else {
1400
+ if ( $objInstaller->plugin_info() ) {
1401
+ $plugin_basename = $objInstaller->plugin_info();
1402
+
1403
+ }
1404
+
1405
+ $activate = activate_plugin( $plugin_basename );
1406
+ if ( is_wp_error( $activate ) ) {
1407
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension install failed - '.$activate->get_error_message() );
1408
+ $bResult = false;
1409
+ }
1410
+ }
1411
+ }
1412
+
1413
+ if( !isset($bResult) ) {
1414
+ if( !isset($_GET['page']) || strcmp($_GET['page'],'fvplayer') != 0 ) {
1415
+ update_option( 'fv_wordpress_flowplayer_deferred_notices', 'FV Flowplayer Pro extension installed - check the new <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer#fv_player_pro">Pro features!</a>!' );
1416
+ }
1417
+ $bResult = true;
1418
+ }
1419
+
1420
+ $aInstalled = ( get_option('fv_flowplayer_extension_install' ) ) ? get_option('fv_flowplayer_extension_install' ) : array();
1421
+ $aInstalled = array_merge( $aInstalled, array( $plugin_package => $bResult ) );
1422
+ update_option('fv_flowplayer_extension_install', $aInstalled );
1423
+
1424
+ return $bResult;
1425
+ }
1426
+
1427
+
1428
+ function fv_wp_flowplayer_install_extension_talk( $content ) {
1429
+ $content = preg_replace( '~<h3.*?</h3>~', '<h3>FV Player Pro auto-installation</h3><p>As a FV Flowplayer license holder, we would like to automatically install our Pro extension for you.</p>', $content );
1430
+ $content = preg_replace( '~(<input[^>]*?type="submit"[^>]*?>)~', '$1 <a href="'.site_url().'/wp-admin/options-general.php?page=fvplayer'.'">Skip the Pro addon install</a>', $content );
1431
+ return $content;
1432
+ }
1433
+
1434
+
1435
+ function fv_wp_flowplayer_activate_extension() {
1436
+ check_ajax_referer( 'fv_wp_flowplayer_activate_extension', 'nonce' );
1437
+ if( !isset( $_POST['plugin'] ) ) {
1438
+ die();
1439
+ }
1440
1441
+ $activate = activate_plugin( $_POST['plugin'] );
1442
+ if ( is_wp_error( $activate ) ) {
1443
+ echo "<FVFLOWPLAYER>".json_encode( array( 'message' => $activate->get_error_message(), 'error' => $activate->get_error_message() ) )."</FVFLOWPLAYER>";
1444
+ die();
1445
+ }
1446
+
1447
+ echo "<FVFLOWPLAYER>".json_encode( array( 'message' => 'Success!', 'plugin' => $_POST['plugin'] ) )."</FVFLOWPLAYER>";
1448
+ die();
1449
+ }
controller/frontend.php CHANGED
@@ -21,19 +21,19 @@ include_once(dirname( __FILE__ ) . '/../models/flowplayer-frontend.php');
21
22
$fv_fp = new flowplayer_frontend();
23
24
- /**
25
- * WP Hooks
26
- */
27
//add_action('the_content', 'flowplayer_content_remove_commas');
28
add_action('wp_head', 'flowplayer_head');
29
add_action('wp_footer','flowplayer_prepare_scripts',9);
30
- add_action('wp_footer','flowplayer_display_scripts',100);
31
- // Addition for 0.9.15
32
add_action('widget_text','flowplayer_content');
33
add_action('wp_enqueue_scripts', 'flowplayer_jquery');
34
- /**
35
- * END WP Hooks
36
- */
37
38
39
function flowplayer_content_remove_commas($content) {
@@ -250,30 +250,44 @@ function flowplayer_content( $content ) {
250
*/
251
function flowplayer_prepare_scripts() {
252
global $fv_fp, $fv_wp_flowplayer_ver;
253
- $sPluginUrl = preg_replace( '~^.*://~', '//', FV_FP_RELATIVE_PATH );
254
255
- $sCommercialKey = (isset($fv_fp->conf['key']) && $fv_fp->conf['key'] != 'false' && strlen($fv_fp->conf['key']) > 0) ? $fv_fp->conf['key'] : '';
256
- $sLogo = ($sCommercialKey && isset($fv_fp->conf['logo']) && $fv_fp->conf['logo'] != 'false' && strlen($fv_fp->conf['logo']) > 0) ? $fv_fp->conf['logo'] : '';
257
-
258
- if( $fv_fp->load_mediaelement && !wp_script_is('wp-mediaelement') ) {
259
- wp_enqueue_script( 'flowplayer-mediaelement', plugins_url( '/fv-wordpress-flowplayer/mediaelement/mediaelement-and-player.min.js' ), array('jquery'), $fv_wp_flowplayer_ver, true );
260
- }
261
- wp_localize_script( 'flowplayer', 'fv_flowplayer_playlists', $fv_fp->aPlaylists );
262
- wp_localize_script( 'flowplayer', 'fv_fp_ajaxurl', site_url().'/wp-admin/admin-ajax.php' );
263
264
- $aConf = array('embed' => array( 'library' => $sPluginUrl.'/flowplayer/fv-flowplayer.min.js', 'script' => $sPluginUrl.'/flowplayer/embed.min.js', 'skin' => $sPluginUrl.'/css/flowplayer.css', 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver ) );
265
- if( $sCommercialKey ) $aConf['key'] = $sCommercialKey;
266
- if( $sLogo ) $aConf['logo'] = $sLogo;
267
- wp_localize_script( 'flowplayer', 'fv_flowplayer_conf', $aConf );
268
- if( $fv_fp->conf['fixed_size'] == 'false' ) {
269
- wp_localize_script( 'flowplayer', 'fv_flowplayer_safety_resize_do', array(true) );
270
- }
271
- if( current_user_can('manage_options') ) {
272
- wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_input', array(true) );
273
- }
274
- if( isset($GLOBALS['fv_fp_scripts']) ) {
275
- foreach( $GLOBALS['fv_fp_scripts'] AS $sKey => $aScripts ) {
276
- wp_localize_script( 'flowplayer', $sKey.'_array', $aScripts );
277
}
278
}
279
}
@@ -306,4 +320,26 @@ function fv_flowplayer_the_content( $c ) {
306
}
307
add_filter( 'the_content', 'fv_flowplayer_the_content', 0 );
308
309
- ?>
21
22
$fv_fp = new flowplayer_frontend();
23
24
//add_action('the_content', 'flowplayer_content_remove_commas');
25
add_action('wp_head', 'flowplayer_head');
26
add_action('wp_footer','flowplayer_prepare_scripts',9);
27
+ add_action('wp_footer','flowplayer_display_scripts',100);
28
add_action('widget_text','flowplayer_content');
29
add_action('wp_enqueue_scripts', 'flowplayer_jquery');
30
+
31
+
32
+ function fv_flowplayer_remove_bad_scripts() {
33
+ wp_deregister_script( 'flowplayer' );
34
+ }
35
+ add_action( 'wp_print_scripts', 'fv_flowplayer_remove_bad_scripts', 100 );
36
+
37
38
39
function flowplayer_content_remove_commas($content) {
250
*/
251
function flowplayer_prepare_scripts() {
252
global $fv_fp, $fv_wp_flowplayer_ver;
253
254
+ if(
255
+ isset($GLOBALS['fv_fp_scripts']) ||
256
+ (isset($fv_fp->conf['js-everywhere']) && strcmp($fv_fp->conf['js-everywhere'],'true') == 0 ) ||
257
+ isset($_GET['fv_wp_flowplayer_check_template'])
258
+ ) {
259
+ wp_enqueue_script( 'flowplayer', flowplayer::get_plugin_url().'/flowplayer/fv-flowplayer.min.js', array('jquery'), $fv_wp_flowplayer_ver, true );
260
+
261
+ $sPluginUrl = preg_replace( '~^.*://~', '//', FV_FP_RELATIVE_PATH );
262
263
+ $sCommercialKey = (isset($fv_fp->conf['key']) && $fv_fp->conf['key'] != 'false' && strlen($fv_fp->conf['key']) > 0) ? $fv_fp->conf['key'] : '';
264
+ $sLogo = ($sCommercialKey && isset($fv_fp->conf['logo']) && $fv_fp->conf['logo'] != 'false' && strlen($fv_fp->conf['logo']) > 0) ? $fv_fp->conf['logo'] : '';
265
+
266
+ if( $fv_fp->load_mediaelement && !wp_script_is('wp-mediaelement') ) {
267
+ wp_enqueue_script( 'flowplayer-mediaelement', flowplayer::get_plugin_url().'/mediaelement/mediaelement-and-player.min.js', array('jquery'), $fv_wp_flowplayer_ver, true );
268
+ }
269
+ wp_localize_script( 'flowplayer', 'fv_flowplayer_playlists', $fv_fp->aPlaylists );
270
+ wp_localize_script( 'flowplayer', 'fv_fp_ajaxurl', site_url().'/wp-admin/admin-ajax.php' );
271
+
272
+ $aConf = array('embed' => array( 'library' => $sPluginUrl.'/flowplayer/fv-flowplayer.min.js', 'script' => $sPluginUrl.'/flowplayer/embed.min.js', 'skin' => $sPluginUrl.'/css/flowplayer.css', 'swf' => $sPluginUrl.'/flowplayer/flowplayer.swf?ver='.$fv_wp_flowplayer_ver ) );
273
+ if( $sCommercialKey ) $aConf['key'] = $sCommercialKey;
274
+ if( !isset($fv_fp->conf['fixed_size']) || strcmp($fv_fp->conf['fixed_size'],'true') != 0 ) {
275
+ $aConf['safety_resize'] = true;
276
+ }
277
+ if( current_user_can('manage_options') && $fv_fp->conf['disable_videochecker'] != 'true' ) {
278
+ $aConf['video_checker_site'] = home_url();
279
+ }
280
+ if( $sLogo ) $aConf['logo'] = $sLogo;
281
+ wp_localize_script( 'flowplayer', 'fv_flowplayer_conf', $aConf );
282
+ if( current_user_can('manage_options') ) {
283
+ wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_input', array(true) );
284
+ wp_localize_script( 'flowplayer', 'fv_flowplayer_admin_js_test', array(true) );
285
+ }
286
+
287
+ if( count($GLOBALS['fv_fp_scripts']) > 0 ) {
288
+ foreach( $GLOBALS['fv_fp_scripts'] AS $sKey => $aScripts ) {
289
+ wp_localize_script( 'flowplayer', $sKey.'_array', $aScripts );
290
+ }
291
}
292
}
293
}
320
}
321
add_filter( 'the_content', 'fv_flowplayer_the_content', 0 );
322
323
+
324
+ /*
325
+ Handle attachment pages which contain videos
326
+ */
327
+ function fv_flowplayer_attachment_page_video( $c ) {
328
+ global $post;
329
+ if( stripos($post->post_mime_type, 'video/') !== 0 && stripos($post->post_mime_type, 'audio/') !== 0 ) {
330
+ return $c;
331
+ }
332
+
333
+ if( !$src = wp_get_attachment_url($post->ID) ) {
334
+ return $c;
335
+ }
336
+
337
+ $meta = get_post_meta( $post->ID, '_wp_attachment_metadata', true );
338
+ $size = (isset($meta['width']) && isset($meta['height']) && intval($meta['width'])>0 && intval($meta['height'])>0 ) ? ' width="'.intval($meta['width']).'" height="'.intval($meta['height']).'"' : false;
339
+
340
+ $shortcode = '[fvplayer src="'.$src.'"'.$size.']';
341
+
342
+ $c = preg_replace( '~<p class=.attachment.[\s\S]*?</p>~', $shortcode, $c );
343
+ return $c;
344
+ }
345
+ add_filter( 'prepend_attachment', 'fv_flowplayer_attachment_page_video' );
controller/shortcodes.php CHANGED
@@ -27,7 +27,7 @@ add_shortcode('fvplayer','flowplayer_content_handle');
27
function flowplayer_content_handle( $atts, $content = null, $tag ) {
28
global $fv_fp;
29
30
- if( $fv_fp->conf['parse_commas'] == 'true' ) {
31
32
if( !isset( $atts['src'] ) ) {
33
foreach( $atts AS $key => $att ) {
@@ -87,7 +87,7 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
87
88
}
89
/// End of addition
90
-
91
extract( shortcode_atts( array(
92
'src' => '',
93
'src1' => '',
@@ -112,10 +112,14 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
112
'align' => '',
113
'rtmp' => '',
114
'rtmp_path' => '',
115
- 'playlist' => ''
116
), $atts ) );
117
-
118
- if( $fv_fp->conf['parse_commas'] == 'true' ) {
119
$arguments['width'] = preg_replace('/\,/', '', $width);
120
$arguments['height'] = preg_replace('/\,/', '', $height);
121
$arguments['autoplay'] = preg_replace('/\,/', '', $autoplay);
@@ -138,8 +142,13 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
138
$arguments['align'] = preg_replace('/\,/', '', $align);
139
$arguments['rtmp'] = preg_replace('/\,/', '', $rtmp);
140
$arguments['rtmp_path'] = preg_replace('/\,/', '', $rtmp_path);
141
- $arguments['playlist'] = $playlist;
142
- $src = trim( preg_replace('/\,/', '', $src) );
143
} else {
144
$arguments = shortcode_atts( array(
145
'src' => '',
@@ -165,18 +174,115 @@ function flowplayer_content_handle( $atts, $content = null, $tag ) {
165
'align' => '',
166
'rtmp' => '',
167
'rtmp_path' => '',
168
- 'playlist' => ''
169
), $atts );
170
}
171
172
-
173
- if( $src != '' || ( strlen($arguments['rtmp']) && strlen($arguments['rtmp_path']) ) ) {
174
// build new player
175
$new_player = $fv_fp->build_min_player($src,$arguments);
176
if (!empty($new_player['script'])) {
177
$GLOBALS['fv_fp_scripts'] = $new_player['script'];
178
}
179
}
180
- return $new_player['html'];
181
}
182
?>
27
function flowplayer_content_handle( $atts, $content = null, $tag ) {
28
global $fv_fp;
29
30
+ if( $fv_fp->conf['parse_commas'] == 'true' && strcmp($tag,'flowplayer') == 0 ) {
31
32
if( !isset( $atts['src'] ) ) {
33
foreach( $atts AS $key => $att ) {
87
88
}
89
/// End of addition
90
+
91
extract( shortcode_atts( array(
92
'src' => '',
93
'src1' => '',
112
'align' => '',
113
'rtmp' => '',
114
'rtmp_path' => '',
115
+ 'playlist' => '',
116
+ 'admin_warning' => '',
117
+ 'live' => '',
118
+ 'caption' => '',
119
+ 'logo' => ''
120
), $atts ) );
121
+
122
+ if( $fv_fp->conf['parse_commas'] == 'true' && strcmp($tag,'flowplayer') == 0 ) {
123
$arguments['width'] = preg_replace('/\,/', '', $width);
124
$arguments['height'] = preg_replace('/\,/', '', $height);
125
$arguments['autoplay'] = preg_replace('/\,/', '', $autoplay);
142
$arguments['align'] = preg_replace('/\,/', '', $align);
143
$arguments['rtmp'] = preg_replace('/\,/', '', $rtmp);
144
$arguments['rtmp_path'] = preg_replace('/\,/', '', $rtmp_path);
145
+ $arguments['playlist'] = $playlist;
146
+ $arguments['admin_warning'] = $admin_warning;
147
+ $arguments['live'] = $live;
148
+ $arguments['caption'] = $caption;
149
+ $arguments['logo'] = $logo;
150
+ $src = trim( preg_replace('/\,/', '', $src) );
151
+ $arguments['src'] = $src;
152
} else {
153
$arguments = shortcode_atts( array(
154
'src' => '',
174
'align' => '',
175
'rtmp' => '',
176
'rtmp_path' => '',
177
+ 'playlist' => '',
178
+ 'admin_warning' => '',
179
+ 'live' => '',
180
+ 'caption' => '',
181
+ 'logo' => ''
182
), $atts );
183
}
184
+
185
+ $arguments = apply_filters( 'fv_flowplayer_shortcode', $arguments, $fv_fp, $atts );
186
187
+ if( $src != '' || ( ( ( strlen($fv_fp->conf['rtmp']) && $fv_fp->conf['rtmp'] != 'false' ) || strlen($arguments['rtmp'])) && strlen($arguments['rtmp_path']) ) ) {
188
// build new player
189
$new_player = $fv_fp->build_min_player($src,$arguments);
190
if (!empty($new_player['script'])) {
191
$GLOBALS['fv_fp_scripts'] = $new_player['script'];
192
}
193
+ return $new_player['html'];
194
}
195
+ return false;
196
}
197
+
198
+
199
+
200
+
201
+ add_filter( 'the_content', 'fv_flowplayer_optimizepress', 1 );
202
+
203
+ function fv_flowplayer_optimizepress( $post_content ) {
204
+
205
+ if( stripos( $post_content, '[video_player type="url"' ) === false ) {
206
+ return $post_content;
207
+ }
208
+
209
+ $post_content = preg_replace_callback( '~\[video_player.*?\].*?\[/video_player\]~', 'fv_flowplayer_optimizepress_bridge', $post_content );
210
+ return $post_content;
211
+ }
212
+
213
+ function fv_flowplayer_optimizepress_bridge( $input ) {
214
+ $video = $input[0];
215
+
216
+ $atts = shortcode_parse_atts($video);
217
+
218
+ $default = array(
219
+ 'type' => 'embed', // na
220
+ 'hide_controls' => 'N', // todo
221
+ 'auto_play' => 'N', // ok
222
+ 'auto_buffer' => 'N', // todo
223
+ 'width' => 511, // ok
224
+ 'height' => 288, // ok
225
+ 'margin_top' => 0, // todo
226
+ 'margin_bottom' => 20, // todo
227
+ 'border_size' => 0, // todo
228
+ 'border_color' => '#fff', // todo
229
+ 'placeholder' => '', // ok
230
+ 'align' => 'center', // ok
231
+ 'youtube_url' => '', // na
232
+ 'youtube_auto_play' => 'N', // na
233
+ 'youtube_hide_controls' => 'N', // na
234
+ 'youtube_remove_logo' => 'N', // na
235
+ 'youtube_show_title_bar' => 'N', // na
236
+ 'youtube_force_hd' => '', // na
237
+ 'url1' => '', // ok
238
+ 'url2' => '', // ok
239
+ );
240
+ $vars = shortcode_atts($default, $atts);
241
+
242
+ $shortcode = '[fvplayer';
243
+
244
+ $content = preg_replace( '~\[video_player.*?\](.*?)\[/video_player\]~', '$1', $video );
245
+ $content = base64_decode($content);
246
+ if(preg_match('|(https?://[^<"]+)|im',$content,$matches)){
247
+ $shortcode .= ' src="'.$matches[1].'"';
248
+ }
249
+ $url1 = base64_decode($atts['url1']);
250
+ if(preg_match('|(https?://[^<"]+)|im',$url1,$matches)){
251
+ $shortcode .= ' src1="'.$matches[1].'"';
252
+ }
253
+ $url2 = base64_decode($atts['url2']);
254
+ if(preg_match('|(https?://[^<"]+)|im',$url2,$matches)){
255
+ $shortcode .= ' src2="'.$matches[1].'"';
256
+ }
257
+
258
+ if( $vars['placeholder'] ) {
259
+ $shortcode .= ' splash="'.$vars['placeholder'].'"';
260
+ }
261
+
262
+ if( $vars['auto_play'] == 'Y' ) {
263
+ $shortcode .= ' autoplay="true"';
264
+ }
265
+
266
+ $shortcode .= ' width="'.$vars['width'].'"';
267
+ $shortcode .= ' height="'.$vars['height'].'"';
268
+ $shortcode .= ' align="'.$vars['align'].'"';
269
+
270
+ if( current_user_can('manage_options') &&
271
+ (
272
+ ( isset($vars['margin-top']) && $vars['margin-top'] > 0 ) ||
273
+ ( isset($vars['margin-bottom']) && $vars['margin-bottom'] > 0 && $vars['margin-bottom'] != 20 ) ||
274
+ ( isset($vars['hide_controls']) && $vars['hide_controls'] == 'Y' ) ||
275
+ ( isset($vars['auto_buffer']) && $vars['auto_buffer'] == 'Y' ) ||
276
+ ( isset($vars['border_size']) && $vars['border_size'] > 0 ) ||
277
+ isset($vars['border_color'])
278
+ )
279
+ ) {
280
+ $shortcode .= ' admin_warning="Admin note: Some of the OptimizePress styling parameters are not supported by FV Flowplayer. Please visit the <a href=\''.admin_url('options-general.php?page=fvplayer').'\'>settings</a> and set your global appearance preferences there."';
281
+ }
282
+
283
+ $shortcode .= ']';
284
+
285
+ return $shortcode;
286
+ }
287
+
288
?>
css/admin.css CHANGED
@@ -1,4 +1,6 @@
1
- #content .fv-wp-flowplayer-notice-small, .fv-wp-flowplayer-notice-small { color: <?php echo trim($this->conf['timeColor']); ?>; position: absolute; top: 1%; left: 1%; z-index: 2;}
2
#content .fv-wp-flowplayer-notice, .fv-wp-flowplayer-notice { color: black !important; background-color: #FFFFE0; border-color: #E6DB55; margin: -1%; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; line-height: 15px; z-index: 100; width: 97%; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif }
3
#content .fv-wp-flowplayer-notice strong, .fv-wp-flowplayer-notice strong { font-weight: bold; }
4
#content .fv-wp-flowplayer-notice blockquote, .fv-wp-flowplayer-notice blockquote { font-size: 12px; }
@@ -15,12 +17,14 @@
15
.fv-wp-flowplayer-notice-small .fv_wp_flowplayer_notice_head { display: none; }
16
.fv-wp-flowplayer-notice.fv-wp-flowplayer-notice .fv_wp_flowplayer_notice_head { display: block; text-align: center; font-size: 14px; border-bottom: 1px solid #7a7a7a; padding: 10px; line-height: 1; margin: 0 -0.6em 1em -0.6em; background-color: #e3e3e3; background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -ms-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -webkit-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -o-linear-gradient(top, #e3e3e3, #aeaeae); background-image: linear-gradient(top, #e3e3e3, #aeaeae); border-radius: 3px 3px 0 0; }
17
18
- .fv-wp-flowplayer-notice-small .vid-issues { color: red; }
19
- .fv-wp-flowplayer-notice-small .vid-warning { color: orange; }
20
.fv-wp-flowplayer-notice-small .vid-ok { color: green; }
21
- .fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-issues { color: #670004; }
22
- .fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-warning { color: #ac641e; }
23
.fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-ok { color: #114b00; }
24
25
.fv-wp-fp-hidden { display: none; }
26
.fv-wp-flowplayer-notice-parsed .row { text-align: left; border-bottom: 1px solid lightgray; border-right: 1px solid lightgray; border-left: 1px solid lightgray; padding-left: 5px; font-size: 12px; clear: both; }
@@ -35,65 +39,8 @@
35
.fv-wp-flowplayer-notice-parsed.level-6 { background: #d0d0d0; }
36
.fv-wp-flowplayer-notice-parsed.level-7 { background: #c8c8c8; }
37
.mail-content-details { height: 200px; overflow: auto; width: 100%; }
38
- /* Administration edit */
39
- .flowplayer-wrapper { min-width: 55%; display: inline-block; float: right;}
40
- @media only screen and (max-width: 940px) {.flowplayer-wrapper { width: 100%; float: none;} .form-table2.flowplayer-settings {width: 100% !important;}}
41
42
- #fv_flowplayer_ad {
43
- width: 690px;
44
- height: 238px;
45
- display: block;
46
- margin: 20px 10px;
47
- padding: 15px 10px 0 20px;
48
- border: 1px solid #ccc;
49
- background: url("../images/fabric-plaid-bg.png");
50
- text-rendering: optimizelegibility;
51
- color: #353535;
52
- }
53
- .text-part {
54
- float: left;
55
- width: 310px;
56
- overflow: hidden;
57
- display: inline-block;
58
- }
59
- .graphic-part {
60
- float: right;
61
- width: 320px;
62
- }
63
- #fv_flowplayer_ad h2 {
64
- text-shadow: 1px 1px 1px #fff;
65
- padding: 9px 0;
66
- }
67
- /* paragraph */
68
- #fv_flowplayer_ad p {
69
- font-size: 14px;
70
- }
71
- a.red-button {
72
- background: url("../images/red-button-large.png") no-repeat center top;
73
- height: 40px;
74
- display: block;
75
- color: #fff;
76
- font-size: 16px;
77
- font-weight: 400;
78
- text-decoration: none;
79
- line-height: 1.3;
80
- padding: 10px 0;
81
- width: 260px;
82
- text-align: center;
83
- }
84
- .red-button:hover {
85
- color: #fff;
86
- }
87
- .red-text {
88
- color: #9d1a28;
89
- font-size: 20px;
90
- }
91
- #fv_flowplayer_ad ul {
92
- margin: 15px 0;
93
- font-size: 16px;
94
- }
95
- #fv_flowplayer_ad ul li {
96
- /* background: url("../images/list-bullet.png") no-repeat 0 center;
97
- padding-left: 30px; */
98
- margin-bottom: 2px;
99
- }
1
+ #content .fv-wp-flowplayer-notice-small, .fv-wp-flowplayer-notice-small { color: <?php echo trim($this->conf['timeColor']); ?>; position: absolute; top: 1%; left: 1%; z-index: 2; }
2
+ #content .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseout .fv-wp-flowplayer-notice-small { top: 1%; -webkit-transition:top .15s .3s;-moz-transition:top .15s .3s;transition:top .15s .3s }
3
+ #content .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small, .flowplayer.is-mouseover.is-ready .fv-wp-flowplayer-notice-small { top: 32px }
4
#content .fv-wp-flowplayer-notice, .fv-wp-flowplayer-notice { color: black !important; background-color: #FFFFE0; border-color: #E6DB55; margin: -1%; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; line-height: 15px; z-index: 100; width: 97%; font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif }
5
#content .fv-wp-flowplayer-notice strong, .fv-wp-flowplayer-notice strong { font-weight: bold; }
6
#content .fv-wp-flowplayer-notice blockquote, .fv-wp-flowplayer-notice blockquote { font-size: 12px; }
17
.fv-wp-flowplayer-notice-small .fv_wp_flowplayer_notice_head { display: none; }
18
.fv-wp-flowplayer-notice.fv-wp-flowplayer-notice .fv_wp_flowplayer_notice_head { display: block; text-align: center; font-size: 14px; border-bottom: 1px solid #7a7a7a; padding: 10px; line-height: 1; margin: 0 -0.6em 1em -0.6em; background-color: #e3e3e3; background-repeat: repeat-x; background-image: -moz-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -ms-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -webkit-linear-gradient(top, #e3e3e3, #aeaeae); background-image: -o-linear-gradient(top, #e3e3e3, #aeaeae); background-image: linear-gradient(top, #e3e3e3, #aeaeae); border-radius: 3px 3px 0 0; }
19
20
.fv-wp-flowplayer-notice-small .vid-ok { color: green; }
21
+ .fv-wp-flowplayer-notice-small .vid-warning { color: orange; }
22
+ .fv-wp-flowplayer-notice-small .vid-issues { color: red; }
23
+
24
+
25
.fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-ok { color: #114b00; }
26
+ .fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-warning { color: #ac641e; }
27
+ .fv-wp-flowplayer-notice-small.fv-wp-flowplayer-notice .vid-issues { color: #670004; }
28
29
.fv-wp-fp-hidden { display: none; }
30
.fv-wp-flowplayer-notice-parsed .row { text-align: left; border-bottom: 1px solid lightgray; border-right: 1px solid lightgray; border-left: 1px solid lightgray; padding-left: 5px; font-size: 12px; clear: both; }
39
.fv-wp-flowplayer-notice-parsed.level-6 { background: #d0d0d0; }
40
.fv-wp-flowplayer-notice-parsed.level-7 { background: #c8c8c8; }
41
.mail-content-details { height: 200px; overflow: auto; width: 100%; }
42
43
+
44
+
45
+ .flowplayer-wrapper { min-width: 50%; display: inline-block; float: right;}
46
+ @media only screen and (max-width: 940px) {.flowplayer-wrapper { width: 100%; float: none;} .form-table2.flowplayer-settings {width: 100% !important;}}
css/colorbox.css CHANGED
@@ -5,13 +5,13 @@ ColorBox Core Style
5
The following rules are the styles that are consistant between themes.
6
Avoid changing this area to maintain compatability with future versions of ColorBox.
7
*/
8
- #colorbox, #cboxOverlay, #cboxWrapper{position:absolute; top:0; left:0; z-index:100; overflow:hidden;}
9
- #cboxOverlay{position:fixed; width:100%; height:100%;}
10
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
11
#cboxContent{position:relative; overflow:hidden;}
12
#cboxLoadedContent{overflow:auto;}
13
#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
- #cboxTitle{margin:5px;}
15
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
16
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
17
5
The following rules are the styles that are consistant between themes.
6
Avoid changing this area to maintain compatability with future versions of ColorBox.
7
*/
8
+ #colorbox, #cboxOverlay, #cboxWrapper, #colorbox.fv-flowplayer-shortcode-editor, #cboxOverlay.fv-flowplayer-shortcode-editor, #cboxWrapper.fv-flowplayer-shortcode-editor{position:absolute; top:0; left:0; z-index:100; overflow:hidden;}
9
+ #cboxOverlay, #cboxOverlay.fv-flowplayer-shortcode-editor{position:fixed; width:100%; height:100%; z-index: 100}
10
#cboxMiddleLeft, #cboxBottomLeft{clear:left;}
11
#cboxContent{position:relative; overflow:hidden;}
12
#cboxLoadedContent{overflow:auto;}
13
#cboxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
+ .fv-flowplayer-shortcode-editor #cboxTitle{margin:5px; text-align: left; bottom: auto }
15
#cboxLoadingOverlay, #cboxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
16
#cboxPrevious, #cboxNext, #cboxClose, #cboxSlideshow{cursor:pointer;}
17
css/flowplayer.css CHANGED
@@ -1,4 +1,4 @@
1
- .flowplayer{position:relative;width:100%;background-size:contain;background-repeat:no-repeat;background-position:center center;display:inline-block;}
2
.flowplayer *{font-weight:inherit;font-family:inherit;font-style:inherit;text-decoration:inherit;font-size:100%;padding:0;border:0;margin:0;list-style-type:none}
3
.flowplayer a:focus{outline:0}
4
.flowplayer video{width:100%}
@@ -29,6 +29,7 @@
29
.flowplayer .fp-help em{background:#eee;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;margin-right:.4em;padding:.3em .6em;color:#333}
30
.flowplayer .fp-help small{font-size:90%;color:#aaa}
31
.flowplayer .fp-help .fp-close{display:block}
32
@media (max-width: 600px){.flowplayer .fp-help p{font-size:9px}
33
}.flowplayer .fp-subtitle{position:absolute;bottom:40px;left:-99999em;z-index:10;text-align:center;width:100%;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .3s;-moz-transition:opacity .3s;transition:opacity .3s;}
34
.flowplayer .fp-subtitle p{display:inline;background-color:#333;background-color:rgba(51,51,51,0.9);color:#eee;padding:.1em .4em;font-size:16px;line-height:1.6;}
@@ -148,6 +149,7 @@
148
.flowplayer.is-splash,.flowplayer.is-poster{cursor:pointer;}
149
.flowplayer.is-splash .fp-controls,.flowplayer.is-poster .fp-controls,.flowplayer.is-splash .fp-fullscreen,.flowplayer.is-poster .fp-fullscreen,.flowplayer.is-splash .fp-unload,.flowplayer.is-poster .fp-unload,.flowplayer.is-splash .fp-time,.flowplayer.is-poster .fp-time,.flowplayer.is-splash .fp-embed,.flowplayer.is-poster .fp-embed{display:none !important}
150
.flowplayer.is-poster .fp-engine{top:-9999em}
151
.flowplayer.is-loading .fp-waiting {height: 1em;}
152
.flowplayer.is-loading .fp-waiting em {width:1em;height:1em;}
153
.flowplayer.is-loading .fp-controls,.flowplayer.is-loading .fp-time{display:none}
@@ -175,17 +177,9 @@
175
.flowplayer.is-disabled .fp-progress{background-color:#999}
176
.flowplayer .fp-embed{position:absolute;top:5px;left:5px;display:block;width:25px;height:20px;background-position:3px -237px;}
177
.is-rtl.flowplayer .fp-embed{background-position:22px -237px;left:auto;right:5px}
178
- .flowplayer .fp-embed-code{position:absolute;display:none;top:10px;left:40px;background-color:#333;padding:3px 5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 0 3px #ccc;-moz-box-shadow:0 0 3px #ccc;box-shadow:0 0 3px #ccc;font-size:12px;}
179
- .flowplayer .fp-embed-code:before{content:'';width:0;height:0;position:absolute;top:2px;left:-10px;border:5px solid transparent;border-right-color:#333}
180
- .is-rtl.flowplayer .fp-embed-code{left:auto;right:40px;}
181
- .is-rtl.flowplayer .fp-embed-code:before{left:auto;right:-10px;border-right-color:transparent;border-left-color:#333}
182
- .flowplayer .fp-embed-code textarea{width:400px;height:16px;font-family:monaco,"courier new",verdana;color:#777;white-space:nowrap;resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc}
183
- .flowplayer .fp-embed-code label{display:block;color:#999}
184
- .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fp-embed-code{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
185
.flowplayer.aside-time .fp-embed{left:85px;}
186
.is-rtl.flowplayer.aside-time .fp-embed{left:auto;right:85px}
187
- .flowplayer.aside-time .fp-embed-code{left:115px;}
188
- .is-rtl.flowplayer.aside-time .fp-embed-code{left:auto;right:115px}
189
.flowplayer.aside-time.is-embedding .fp-time{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
190
.flowplayer.is-long.aside-time .fp-embed{left:130px;}
191
.is-rtl.flowplayer.is-long.aside-time .fp-embed{left:auto;right:130px}
@@ -227,6 +221,65 @@
227
.flowplayer.color-alt2 .fp-progress{background-color:#900}
228
.flowplayer.color-alt2.is-touch.is-mouseover .fp-progress:before{background-color:#900}
229
230
.flowplayer .fp-prev, .flowplayer .fp-next{/* next and prev buttons */position:absolute;top:44%;cursor:pointer;-webkit-transition:opacity .5s;-moz-transition:opacity .5s;transition:opacity .5s;background:url("img/playlist-buttons.png");opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);height:20px;width:12px;}
231
.is-mouseover.is-ready.flowplayer .fp-prev,.is-mouseover.is-ready.flowplayer .fp-next{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
232
.flowplayer .fp-prev{left:-20px;background-position:0 -200px;}
@@ -235,9 +288,11 @@
235
.flowplayer .fp-next:hover{background-position:0 -500px}
236
237
.fp-playlist-external { text-align:center; }
238
- .fp-playlist-external a { display:inline-block;width:120px;height:80px;margin:0 10px;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s;border:4px solid #fff;background:gray;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-size:auto 100px;background-position:center;}
239
- .fp-playlist-external a:hover { border-color:#ccc }
240
- .fp-playlist-external a.is-active { border-color:#52b9e4; }
241
242
.add_media span.wp-media-buttons-icon {
243
background: url("img/media-button.png") no-repeat scroll left top;
@@ -278,8 +333,9 @@ a #add-format, a #add-rtmp {
278
}
279
280
281
.flowplayer .fp-volume { text-align: left; }
282
- #content .flowplayer .fp-embed-code, .flowplayer .fp-embed-code { padding: 3px 7px; }
283
#content .flowplayer a, .flowplayer a, .flowplayer a:hover { text-decoration: none; border-bottom: none; }
284
285
.flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
@@ -301,4 +357,10 @@ MediaElement.js
301
.mejs-container{position:relative;background:#000;font-family:Helvetica,Arial;text-align:left;vertical-align:top;text-indent:0; margin: 0 auto 28px auto; }
302
.me-plugin{position:absolute;}.mejs-embed,.mejs-embed body{width:100%;height:100%;margin:0;padding:0;background:#000;overflow:hidden;}.mejs-container-fullscreen{position:fixed;left:0;top:0;right:0;bottom:0;overflow:hidden;z-index:1000;}.mejs-container-fullscreen .mejs-mediaelement,.mejs-container-fullscreen video{width:100%;height:100%;}.mejs-clear{clear:both;}.mejs-background{position:absolute;top:0;left:0;}.mejs-mediaelement{position:absolute;top:0;left:0;width:100%;height:100%;}.mejs-poster{position:absolute;top:0;left:0;background-size:contain;background-position:50% 50%;background-repeat:no-repeat;}:root .mejs-poster img{display:none;}.mejs-poster img{border:0;padding:0;border:0;}.mejs-overlay{position:absolute;top:0;left:0;}.mejs-overlay-play{cursor:pointer;}.mejs-overlay-button{position:absolute;top:50%;left:50%;width:100px;height:100px;margin:-50px 0 0 -50px;background:url(bigplay.svg) no-repeat;}.no-svg .mejs-overlay-button{background-image:url(bigplay.png);}.mejs-overlay:hover .mejs-overlay-button{background-position:0 -100px;}.mejs-overlay-loading{position:absolute;top:50%;left:50%;width:80px;height:80px;margin:-40px 0 0 -40px;background:#333;background:url(background.png);background:rgba(0,0,0,0.9);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.9)),to(rgba(0,0,0,0.9)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-moz-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-o-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:-ms-linear-gradient(top,rgba(50,50,50,0.9),rgba(0,0,0,0.9));background:linear-gradient(rgba(50,50,50,0.9),rgba(0,0,0,0.9));}.mejs-overlay-loading span{display:block;width:80px;height:80px;background:transparent url(loading.gif) 50% 50% no-repeat;}.mejs-container .mejs-controls{position:absolute;list-style-type:none;margin:0;padding:0;bottom:0;left:0;background:url(background.png);background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));height:30px;width:100%;}
303
.mejs-container .mejs-controls div{list-style-type:none;background-image:none;display:block;float:left;margin:0;padding:0;width:26px;height:26px;font-size:11px;line-height:11px;/*font-family:Helvetica,Arial*/;border:0;}
304
- .mejs-controls .mejs-button button{cursor:pointer;display:block;font-size:0;line-height:0;text-decoration:none;margin:7px 5px;padding:0;position:absolute;height:16px;width:16px;border:0;background:transparent url(controls.svg) no-repeat;}.no-svg .mejs-controls .mejs-button button{background-image:url(controls.png);}.mejs-controls .mejs-button button:focus{outline:solid 1px yellow;}.mejs-container .mejs-controls .mejs-time{color:#fff;display:block;height:17px;width:auto;padding:8px 3px 0 3px;overflow:hidden;text-align:center;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}.mejs-container .mejs-controls .mejs-time span{color:#fff;font-size:11px;line-height:12px;display:block;float:left;margin:1px 2px 0 0;width:auto;}.mejs-controls .mejs-play button{background-position:0 0;}.mejs-controls .mejs-pause button{background-position:0 -16px;}.mejs-controls .mejs-stop button{background-position:-112px 0;}.mejs-controls div.mejs-time-rail{width:200px;padding-top:5px;}.mejs-controls .mejs-time-rail span{display:block;position:absolute;width:180px;height:10px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;cursor:pointer;}.mejs-controls .mejs-time-rail .mejs-time-total{margin:5px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-time-rail .mejs-time-buffering{width:100%;background-image:-o-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-ms-linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(-45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:15px 15px;-moz-background-size:15px 15px;-o-background-size:15px 15px;background-size:15px 15px;-webkit-animation:buffering-stripes 2s linear infinite;-moz-animation:buffering-stripes 2s linear infinite;-ms-animation:buffering-stripes 2s linear infinite;-o-animation:buffering-stripes 2s linear infinite;animation:buffering-stripes 2s linear infinite;}@-webkit-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-moz-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-ms-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@-o-keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}@keyframes buffering-stripes{from{background-position:0 0;}to{background-position:30px 0;}}.mejs-controls .mejs-time-rail .mejs-time-loaded{background:#3caac8;background:rgba(60,170,200,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(44,124,145,0.8)),to(rgba(78,183,212,0.8)));background:-webkit-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-moz-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-o-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:-ms-linear-gradient(top,rgba(44,124,145,0.8),rgba(78,183,212,0.8));background:linear-gradient(rgba(44,124,145,0.8),rgba(78,183,212,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-current{background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));width:0;}.mejs-controls .mejs-time-rail .mejs-time-handle{display:none;position:absolute;margin:0;width:10px;background:#fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;cursor:pointer;border:solid 2px #333;top:-2px;text-align:center;}.mejs-controls .mejs-time-rail .mejs-time-float{position:absolute;display:none;background:#eee;width:36px;height:17px;border:solid 1px #333;top:-26px;margin-left:-18px;text-align:center;color:#111;}.mejs-controls .mejs-time-rail .mejs-time-float-current{margin:2px;width:30px;display:block;text-align:center;left:0;}.mejs-controls .mejs-time-rail .mejs-time-float-corner{position:absolute;display:block;width:0;height:0;line-height:0;border:solid 5px #eee;border-color:#eee transparent transparent transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:15px;left:13px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float{width:48px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-current{width:44px;}.mejs-long-video .mejs-controls .mejs-time-rail .mejs-time-float-corner{left:18px;}.mejs-controls .mejs-fullscreen-button button{background-position:-32px 0;}.mejs-controls .mejs-unfullscreen button{background-position:-32px -16px;}.mejs-controls .mejs-mute button{background-position:-16px -16px;}.mejs-controls .mejs-unmute button{background-position:-16px 0;}.mejs-controls .mejs-volume-button{position:relative;}.mejs-controls .mejs-volume-button .mejs-volume-slider{display:none;height:115px;width:25px;background:url(background.png);background:rgba(50,50,50,0.7);-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;top:-115px;left:0;z-index:1;position:absolute;margin:0;}.mejs-controls .mejs-volume-button:hover{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-total{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.5);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-current{position:absolute;left:11px;top:8px;width:2px;height:100px;background:#ddd;background:rgba(255,255,255,0.9);margin:0;}.mejs-controls .mejs-volume-button .mejs-volume-slider .mejs-volume-handle{position:absolute;left:4px;top:-3px;width:16px;height:6px;background:#ddd;background:rgba(255,255,255,0.9);cursor:N-resize;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;margin:0;}.mejs-controls div.mejs-horizontal-volume-slider{height:26px;width:60px;position:relative;}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-total{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#333;background:rgba(50,50,50,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(30,30,30,0.8)),to(rgba(60,60,60,0.8)));background:-webkit-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-moz-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-o-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:-ms-linear-gradient(top,rgba(30,30,30,0.8),rgba(60,60,60,0.8));background:linear-gradient(rgba(30,30,30,0.8),rgba(60,60,60,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-current{position:absolute;left:0;top:11px;width:50px;height:8px;margin:0;padding:0;font-size:1px;-webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;background:#fff;background:rgba(255,255,255,0.8);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(255,255,255,0.9)),to(rgba(200,200,200,0.8)));background:-webkit-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-moz-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-o-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:-ms-linear-gradient(top,rgba(255,255,255,0.9),rgba(200,200,200,0.8));background:linear-gradient(rgba(255,255,255,0.9),rgba(200,200,200,0.8));}.mejs-controls .mejs-horizontal-volume-slider .mejs-horizontal-volume-handle{display:none;}.mejs-controls .mejs-captions-button{position:relative;}.mejs-controls .mejs-captions-button button{background-position:-48px 0;}.mejs-controls .mejs-captions-button .mejs-captions-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-captions-button .mejs-captions-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-controls .mejs-captions-button .mejs-captions-translations{font-size:10px;margin:0 0 5px 0;}.mejs-chapters{position:absolute;top:0;left:0;-xborder-right:solid 1px #fff;width:10000px;z-index:1;}.mejs-chapters .mejs-chapter{position:absolute;float:left;background:#222;background:rgba(0,0,0,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(50,50,50,0.7)),to(rgba(0,0,0,0.7)));background:-webkit-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-moz-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-o-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:-ms-linear-gradient(top,rgba(50,50,50,0.7),rgba(0,0,0,0.7));background:linear-gradient(rgba(50,50,50,0.7),rgba(0,0,0,0.7));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#323232,endColorstr=#000000);overflow:hidden;border:0;}.mejs-chapters .mejs-chapter .mejs-chapter-block{font-size:11px;color:#fff;padding:5px;display:block;border-right:solid 1px #333;border-bottom:solid 1px #333;cursor:pointer;}.mejs-chapters .mejs-chapter .mejs-chapter-block-last{border-right:none;}.mejs-chapters .mejs-chapter .mejs-chapter-block:hover{background:#666;background:rgba(102,102,102,0.7);background:-webkit-gradient(linear,0% 0,0% 100%,from(rgba(102,102,102,0.7)),to(rgba(50,50,50,0.6)));background:-webkit-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-moz-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-o-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:-ms-linear-gradient(top,rgba(102,102,102,0.7),rgba(50,50,50,0.6));background:linear-gradient(rgba(102,102,102,0.7),rgba(50,50,50,0.6));filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,startColorstr=#666666,endColorstr=#323232);}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-title{font-size:12px;font-weight:bold;display:block;white-space:nowrap;text-overflow:ellipsis;margin:0 0 3px 0;line-height:12px;}.mejs-chapters .mejs-chapter .mejs-chapter-block .ch-timespan{font-size:12px;line-height:12px;margin:3px 0 4px 0;display:block;white-space:nowrap;text-overflow:ellipsis;}.mejs-captions-layer{position:absolute;bottom:0;left:0;text-align:center;line-height:22px;font-size:12px;color:#fff;}.mejs-captions-layer a{color:#fff;text-decoration:underline;}.mejs-captions-layer[lang=ar]{font-size:20px;font-weight:normal;}.mejs-captions-position{position:absolute;width:100%;bottom:15px;left:0;}.mejs-captions-position-hover{bottom:45px;}.mejs-captions-text{padding:3px 5px;background:url(background.png);background:rgba(20,20,20,0.8);}.me-cannotplay a{color:#fff;font-weight:bold;}.me-cannotplay span{padding:15px;display:block;}.mejs-controls .mejs-loop-off button{background-position:-64px -16px;}.mejs-controls .mejs-loop-on button{background-position:-64px 0;}.mejs-controls .mejs-backlight-off button{background-position:-80px -16px;}.mejs-controls .mejs-backlight-on button{background-position:-80px 0;}.mejs-controls .mejs-picturecontrols-button{background-position:-96px 0;}.mejs-contextmenu{position:absolute;width:150px;padding:10px;border-radius:4px;top:0;left:0;background:#fff;border:solid 1px #999;z-index:1001;}.mejs-contextmenu .mejs-contextmenu-separator{height:1px;font-size:0;margin:5px 6px;background:#333;}.mejs-contextmenu .mejs-contextmenu-item{font-family:Helvetica,Arial;font-size:12px;padding:4px 6px;cursor:pointer;color:#333;}.mejs-contextmenu .mejs-contextmenu-item:hover{background:#2C7C91;color:#fff;}.mejs-controls .mejs-sourcechooser-button{position:relative;}.mejs-controls .mejs-sourcechooser-button button{background-position:-128px 0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector{visibility:hidden;position:absolute;bottom:26px;right:-10px;width:130px;height:100px;background:url(background.png);background:rgba(50,50,50,0.7);border:solid 1px transparent;padding:10px;overflow:hidden;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul{margin:0;padding:0;display:block;list-style-type:none!important;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li{margin:0 0 6px 0;padding:0;list-style-type:none!important;display:block;color:#fff;overflow:hidden;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li input{clear:both;float:left;margin:3px 3px 0 5px;}.mejs-controls .mejs-sourcechooser-button .mejs-sourcechooser-selector ul li label{width:100px;float:left;padding:4px 0 0 0;line-height:15px;font-family:helvetica,arial;font-size:10px;}.mejs-postroll-layer{position:absolute;bottom:0;left:0;width:100%;height:100%;background:url(background.png);background:rgba(50,50,50,0.7);z-index:1000;overflow:hidden;}.mejs-postroll-layer-content{width:100%;height:100%;}.mejs-postroll-close{position:absolute;right:0;top:0;background:url(background.png);background:rgba(50,50,50,0.7);color:#fff;padding:4px;z-index:100;cursor:pointer;}
1
+ .flowplayer{position:relative;width:100%;background-size:contain;background-repeat:no-repeat;background-position:center center;display:inline-block; -webkit-backface-visibility: hidden }
2
.flowplayer *{font-weight:inherit;font-family:inherit;font-style:inherit;text-decoration:inherit;font-size:100%;padding:0;border:0;margin:0;list-style-type:none}
3
.flowplayer a:focus{outline:0}
4
.flowplayer video{width:100%}
29
.flowplayer .fp-help em{background:#eee;-webkit-border-radius:.3em;-moz-border-radius:.3em;border-radius:.3em;margin-right:.4em;padding:.3em .6em;color:#333}
30
.flowplayer .fp-help small{font-size:90%;color:#aaa}
31
.flowplayer .fp-help .fp-close{display:block}
32
+
33
@media (max-width: 600px){.flowplayer .fp-help p{font-size:9px}
34
}.flowplayer .fp-subtitle{position:absolute;bottom:40px;left:-99999em;z-index:10;text-align:center;width:100%;opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .3s;-moz-transition:opacity .3s;transition:opacity .3s;}
35
.flowplayer .fp-subtitle p{display:inline;background-color:#333;background-color:rgba(51,51,51,0.9);color:#eee;padding:.1em .4em;font-size:16px;line-height:1.6;}
149
.flowplayer.is-splash,.flowplayer.is-poster{cursor:pointer;}
150
.flowplayer.is-splash .fp-controls,.flowplayer.is-poster .fp-controls,.flowplayer.is-splash .fp-fullscreen,.flowplayer.is-poster .fp-fullscreen,.flowplayer.is-splash .fp-unload,.flowplayer.is-poster .fp-unload,.flowplayer.is-splash .fp-time,.flowplayer.is-poster .fp-time,.flowplayer.is-splash .fp-embed,.flowplayer.is-poster .fp-embed{display:none !important}
151
.flowplayer.is-poster .fp-engine{top:-9999em}
152
+ .flowplayer.is-loading video.fp-engine{position:absolute;top:-9999em}
153
.flowplayer.is-loading .fp-waiting {height: 1em;}
154
.flowplayer.is-loading .fp-waiting em {width:1em;height:1em;}
155
.flowplayer.is-loading .fp-controls,.flowplayer.is-loading .fp-time{display:none}
177
.flowplayer.is-disabled .fp-progress{background-color:#999}
178
.flowplayer .fp-embed{position:absolute;top:5px;left:5px;display:block;width:25px;height:20px;background-position:3px -237px;}
179
.is-rtl.flowplayer .fp-embed{background-position:22px -237px;left:auto;right:5px}
180
+
181
.flowplayer.aside-time .fp-embed{left:85px;}
182
.is-rtl.flowplayer.aside-time .fp-embed{left:auto;right:85px}
183
.flowplayer.aside-time.is-embedding .fp-time{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
184
.flowplayer.is-long.aside-time .fp-embed{left:130px;}
185
.is-rtl.flowplayer.is-long.aside-time .fp-embed{left:auto;right:130px}
221
.flowplayer.color-alt2 .fp-progress{background-color:#900}
222
.flowplayer.color-alt2.is-touch.is-mouseover .fp-progress:before{background-color:#900}
223
224
+ .flowplayer .fp-embed-code{display:none;}
225
+ .flowplayer .fvp-share-bar{opacity:0;display:none;position:absolute;top:0px;left:0px;background-color:rgba(0, 0, 0, 0.3);font-size:12px;width:100%}
226
+ .is-rtl.flowplayer .fvp-share-bar{left:auto;}
227
+ .flowplayer .fvp-share-bar textarea{width:400px;min-height:130px;font-family: "Lucida Console", Monaco, monospace; color:#777; white-space:nowrap; resize:none;overflow:hidden;border:0;outline:0;background-color:transparent;color:#ccc; border: 1px solid #888;}
228
+ .flowplayer.is-embedding .fp-embed,.flowplayer.is-embedding .fvp-share-bar{display:block;opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
229
+ .fvp-share-bar .fvp-sharing, #content .fvp-share-bar .fvp-sharing {
230
+ /*clear: both;
231
+ width: 102px;*/
232
+ min-height: 24px;
233
+ margin: 7px auto;
234
+ float:left;
235
+ font-family:"Lucida Console", Monaco, monospace
236
+ }
237
+ .fvp-share-bar label {
238
+ text-align: center;
239
+ }
240
+
241
+ .fvp-share-bar .fvp-sharing li {
242
+ float: left;
243
+ display: inline-block;
244
+ margin: 0 5px;
245
+ padding: 0;
246
+ }
247
+
248
+ .fvp-share-bar .fvp-sharing a {
249
+ width: 24px;
250
+ height: 24px;
251
+ display: block;
252
+ overflow: hidden;
253
+ background: url("img/flp-share-icons.png") no-repeat;
254
+ text-indent: -9999em;
255
+ }
256
+
257
+ .fvp-share-bar .fvp-sharing a.sharing-twitter {
258
+ background-position: 0 -28px;
259
+ }
260
+
261
+ .fvp-share-bar .fvp-sharing a.sharing-google {
262
+ background-position: 0 -56px;
263
+ }
264
+
265
+ .fvp-share-bar .fvp-sharing a.sharing-email {
266
+ background-position: 0 -84px;
267
+ }
268
+ .flowplayer .fvp-share-bar label{float:left;color:#fff;padding: 6px 10px;}
269
+ .flowplayer .fp-embed{display:none}
270
+ /*.flowplayer.is-mouseover.is-ready .fp-embed-code{display:block}*/
271
+ .flowplayer.is-mouseout .fvp-share-bar{opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);-webkit-transition:opacity .15s .3s;-moz-transition:opacity .15s .3s;transition:opacity .15s .3s}
272
+ .flowplayer.is-mouseout .fvp-share-bar.visible{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
273
+ .flowplayer.is-mouseover.is-ready .fvp-share-bar{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
274
+ .flowplayer .fp-fullscreen {z-index:1}
275
+ /*.flowplayer .fvp-share-bar {display:none;}*/
276
+ .flowplayer .embed-code {padding: 0 10px 10px; display: none; clear: both; background-color: rgba(0, 0, 0, 0); }
277
+ .flowplayer .embed-code label {clear: both; padding-left: 0px; padding-top: 0; line-height: 16px;}
278
+ #content .flowplayer .fvp-share-bar textarea, .flowplayer .fvp-share-bar textarea { padding: 3px; line-height: 1.4; white-space: pre-wrap; color: black !important; height: auto; min-height: 130px; width: 99%; font-size: 10px; background-color:rgba(255, 255, 255, 1); box-shadow: none; border-radius: 0; cursor: text; }
279
+ #content .flowplayer.is-ready .fvp-share-bar.visible .embed-code, .flowplayer.is-ready .fvp-share-bar.visible .embed-code { display: block; }
280
+ /*#content .flowplayer.is-ready .fp-embed-code.visible textarea, .flowplayer.is-ready .fp-embed-code.visible textarea { height: 140px; }*/
281
+ a.embed-code-toggle { font-weight: bold; color: white; }
282
+
283
.flowplayer .fp-prev, .flowplayer .fp-next{/* next and prev buttons */position:absolute;top:44%;cursor:pointer;-webkit-transition:opacity .5s;-moz-transition:opacity .5s;transition:opacity .5s;background:url("img/playlist-buttons.png");opacity:0;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);height:20px;width:12px;}
284
.is-mouseover.is-ready.flowplayer .fp-prev,.is-mouseover.is-ready.flowplayer .fp-next{opacity:1;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=100)}
285
.flowplayer .fp-prev{left:-20px;background-position:0 -200px;}
288
.flowplayer .fp-next:hover{background-position:0 -500px}
289
290
.fp-playlist-external { text-align:center; }
291
+ .fp-playlist-external a { width:148px; display:inline-block; vertical-align:top; margin:5px 0px 0px 0px;}
292
+ .fp-playlist-external a span { display:block;width:120px;height:80px;margin:0 10px;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s;border:4px solid #fff;background:gray;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;background-size:auto 100px;background-position:center;}
293
+ .fp-playlist-external a:hover span { border-color:#ccc }
294
+ .fp-playlist-external a.is-active span { border-color:#52b9e4; }
295
+ .fp-playlist-external a.is-active { color:#52b9e4;-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s; }
296
297
.add_media span.wp-media-buttons-icon {
298
background: url("img/media-button.png") no-repeat scroll left top;
333
}
334
335