FV Flowplayer Video Player - Version 7.3.13.727

Version Description

  • 2019/04/30 =

  • Ad codes - sensing size of the Google AdSense ad unit, allowing the ad to expand from the player container for maximum ad revenue

  • Ad codes - vi Story ad support - stopping your video if there is an video ad in overlay

  • Embed codes - using database player IDs for the embed URL

  • HLS - added support for multiple audio tracks on desktop browsers

  • Iframe embedding - removed the settings as it's the only way of embedding, you can still use "Disable Embed Button"

  • Screen options - added to the wp-admin -> FV Player screen, allowing you to see count of subtitle, chapter and transcript files

  • Styling - new loading indicator which also appears before the player is initialized on slow connections

  • XML Video Sitemap - includes a lot more videos as it uses the individual player iframe embed links. Until now it was only possible to put in videos using MP4 format without any kind of download protection. Your members only videos stay protected and won't open, but let us know if they appear in sitemap.

Download this release

Release Info

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

Code changes from version 7.3.12.727 to 7.3.13.727

Files changed (52) hide show
  1. controller/backend.php +0 -0
  2. controller/frontend.php +17 -22
  3. controller/settings.php +99 -110
  4. controller/shortcodes.php +6 -3
  5. css/colorbox.css +0 -0
  6. css/flowplayer.css +59 -6
  7. css/fonts/fpicons.eot +0 -0
  8. css/fonts/fpicons.svg +0 -0
  9. css/fonts/fpicons.ttf +0 -0
  10. css/fonts/fpicons.woff +0 -0
  11. css/fvp-icon-sprite.svg +6 -6
  12. css/img/exit_btn.png +0 -0
  13. css/img/flowplayer.png +0 -0
  14. css/img/no_play_white-x2.png +0 -0
  15. css/img/no_play_white.png +0 -0
  16. css/img/techinfo.png +0 -0
  17. css/sitemap-video.xsl +53 -49
  18. flowplayer.php +2 -2
  19. flowplayer/embed.min.js +0 -0
  20. flowplayer/flowplayer.swf +0 -0
  21. flowplayer/flowplayerhls.swf +0 -0
  22. flowplayer/fv-flowplayer.min.js +160 -34
  23. includes/fp-api-private.php +58 -73
  24. js/fancybox.js +1 -1
  25. js/s3-browser.js +16 -7
  26. js/shortcode-editor.js +26 -24
  27. models/checker.php +41 -39
  28. models/custom-videos.php +10 -1
  29. models/db-player.php +31 -10
  30. models/db.php +5 -2
  31. models/email-subscription.php +11 -10
  32. models/flowplayer-frontend.php +54 -48
  33. models/flowplayer.php +27 -29
  34. models/lightbox.php +1 -1
  35. models/list-table.php +153 -111
  36. models/media-browser-s3.php +1 -1
  37. models/system-info.php +11 -3
  38. models/xml-video-sitemap.php +146 -85
  39. readme.txt +11 -0
  40. test/integration/backend/testProfileScreen.html +1 -1
  41. test/integration/frontend/dbTest.php +20 -20
  42. test/integration/frontend/endActionsTest.php +12 -12
  43. test/integration/frontend/player-data-youtube.json +1 -0
  44. test/integration/frontend/shortcodesLightboxTest.php +24 -24
  45. test/integration/frontend/shortcodesPlaylistTest.php +14 -14
  46. test/integration/frontend/testSimpleShortcode.html +5 -5
  47. test/integration/frontend/video-sitemap.xml +48 -0
  48. test/integration/frontend/videoPositionSavingTest.php +6 -8
  49. test/integration/frontend/videoSitemapTest.php +77 -0
  50. test/integration/fv-player-unittest-case.php +2 -0
  51. test/unit/controller/frontendTest.php +0 -9
  52. view/admin.php +4 -5
controller/backend.php CHANGED
File without changes
controller/frontend.php CHANGED
@@ -17,7 +17,7 @@
17
  */
18
 
19
  add_action('wp_footer','flowplayer_prepare_scripts',9);
20
- add_action('wp_footer','flowplayer_display_scripts',100);
21
  add_action('widget_text','do_shortcode');
22
 
23
  add_filter( 'run_ngg_resource_manager', '__return_false' );
@@ -320,12 +320,6 @@ function flowplayer_prepare_scripts() {
320
  if( $fv_fp->_get_option('rtmp-live-buffer') ) {
321
  $aConf['bufferTime'] = apply_filters( 'fv_player_rtmp_bufferTime', 3 );
322
  }
323
-
324
- if( $fv_fp->_get_option( array( 'integrations', 'embed_iframe') ) ) {
325
- $aConf['embed'] = false;
326
- } else {
327
- $aConf['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, 'swfHls' => $sPluginUrl.'/flowplayer/flowplayerhls.swf?ver='.$fv_wp_flowplayer_ver );
328
- }
329
 
330
  if( $fv_fp->_get_option('ui_speed_increment') == 0.25){
331
  $aConf['speeds'] = array( 0.25,0.5,0.75,1,1.25,1.5,1.75,2 );
@@ -450,21 +444,6 @@ function flowplayer_prepare_scripts() {
450
  * Prints flowplayer javascript content to the bottom of the page.
451
  */
452
  function flowplayer_display_scripts() {
453
- global $fv_fp;
454
- if( ( $fv_fp->_get_option('ui_repeat_button') || $fv_fp->_get_option('ui_no_picture_button') ) && file_exists(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg') ) { // todo: only include if it's going to be used!
455
- include_once(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg');
456
- }
457
-
458
- if( $fv_fp->_get_option('ui_rewind_button') ) { // todo: only include if it's going to be used!
459
- ?>
460
- <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" class="fvp-icon" xmlns="http://www.w3.org/2000/svg">
461
- <g id="fvp-rewind">
462
- <path d="M22.7 10.9c0 1.7-0.4 3.3-1.1 4.8 -0.7 1.5-1.8 2.8-3.2 3.8 -0.4 0.3-1.3-0.9-0.9-1.2 1.2-0.9 2.1-2 2.7-3.3 0.7-1.3 1-2.7 1-4.1 0-2.6-0.9-4.7-2.7-6.5 -1.8-1.8-4-2.7-6.5-2.7 -2.5 0-4.7 0.9-6.5 2.7 -1.8 1.8-2.7 4-2.7 6.5 0 2.4 0.8 4.5 2.5 6.3 1.7 1.8 3.7 2.7 6.1 2.9l-1.2-2c-0.2-0.3 0.9-1 1.1-0.7l2.3 3.7c0.2 0.3 0 0.6-0.2 0.7L9.5 23.8c-0.3 0.2-0.9-0.9-0.5-1.2l2.1-1.1c-2.7-0.2-5-1.4-6.9-3.4 -1.9-2-2.8-4.5-2.8-7.2 0-3 1.1-5.5 3.1-7.6C6.5 1.2 9 0.2 12 0.2c3 0 5.5 1.1 7.6 3.1C21.7 5.4 22.7 7.9 22.7 10.9z" fill="#fff"/><path d="M8.1 15.1c-0.1 0-0.1 0-0.1-0.1V8C8 7.7 7.8 7.9 7.7 7.9L6.8 8.3C6.8 8.4 6.7 8.3 6.7 8.2L6.3 7.3C6.2 7.2 6.3 7.1 6.4 7.1l2.7-1.2c0.1 0 0.4 0 0.4 0.3v8.8c0 0.1 0 0.1-0.1 0.1H8.1z" fill="#fff"/><path d="M17.7 10.6c0 2.9-1.3 4.7-3.5 4.7 -2.2 0-3.5-1.8-3.5-4.7s1.3-4.7 3.5-4.7C16.4 5.9 17.7 7.7 17.7 10.6zM12.3 10.6c0 2.1 0.7 3.4 2 3.4 1.3 0 2-1.2 2-3.4 0-2.1-0.7-3.4-2-3.4C13 7.2 12.3 8.5 12.3 10.6z" fill="#fff"/>
463
- </g>
464
- </svg>
465
- <?php
466
- }
467
-
468
  if( flowplayer::is_special_editor() ) {
469
  return;
470
  }
@@ -597,3 +576,19 @@ function fv_player_comment_text( $comment_text ) {
597
 
598
  return $comment_text;
599
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  */
18
 
19
  add_action('wp_footer','flowplayer_prepare_scripts',9);
20
+ add_action('wp_footer','flowplayer_display_scripts',100);
21
  add_action('widget_text','do_shortcode');
22
 
23
  add_filter( 'run_ngg_resource_manager', '__return_false' );
320
  if( $fv_fp->_get_option('rtmp-live-buffer') ) {
321
  $aConf['bufferTime'] = apply_filters( 'fv_player_rtmp_bufferTime', 3 );
322
  }
 
 
 
 
 
 
323
 
324
  if( $fv_fp->_get_option('ui_speed_increment') == 0.25){
325
  $aConf['speeds'] = array( 0.25,0.5,0.75,1,1.25,1.5,1.75,2 );
444
  * Prints flowplayer javascript content to the bottom of the page.
445
  */
446
  function flowplayer_display_scripts() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
447
  if( flowplayer::is_special_editor() ) {
448
  return;
449
  }
576
 
577
  return $comment_text;
578
  }
579
+
580
+ function fv_player_footer_svg_playlist() {
581
+ if( file_exists(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg') ) {
582
+ include_once(dirname( __FILE__ ) . '/../css/fvp-icon-sprite.svg');
583
+ }
584
+ }
585
+
586
+ function fv_player_footer_svg_rewind() {
587
+ ?>
588
+ <svg style="position: absolute; width: 0; height: 0; overflow: hidden;" class="fvp-icon" xmlns="http://www.w3.org/2000/svg">
589
+ <g id="fvp-rewind">
590
+ <path d="M22.7 10.9c0 1.7-0.4 3.3-1.1 4.8 -0.7 1.5-1.8 2.8-3.2 3.8 -0.4 0.3-1.3-0.9-0.9-1.2 1.2-0.9 2.1-2 2.7-3.3 0.7-1.3 1-2.7 1-4.1 0-2.6-0.9-4.7-2.7-6.5 -1.8-1.8-4-2.7-6.5-2.7 -2.5 0-4.7 0.9-6.5 2.7 -1.8 1.8-2.7 4-2.7 6.5 0 2.4 0.8 4.5 2.5 6.3 1.7 1.8 3.7 2.7 6.1 2.9l-1.2-2c-0.2-0.3 0.9-1 1.1-0.7l2.3 3.7c0.2 0.3 0 0.6-0.2 0.7L9.5 23.8c-0.3 0.2-0.9-0.9-0.5-1.2l2.1-1.1c-2.7-0.2-5-1.4-6.9-3.4 -1.9-2-2.8-4.5-2.8-7.2 0-3 1.1-5.5 3.1-7.6C6.5 1.2 9 0.2 12 0.2c3 0 5.5 1.1 7.6 3.1C21.7 5.4 22.7 7.9 22.7 10.9z" fill="#fff"/><path d="M8.1 15.1c-0.1 0-0.1 0-0.1-0.1V8C8 7.7 7.8 7.9 7.7 7.9L6.8 8.3C6.8 8.4 6.7 8.3 6.7 8.2L6.3 7.3C6.2 7.2 6.3 7.1 6.4 7.1l2.7-1.2c0.1 0 0.4 0 0.4 0.3v8.8c0 0.1 0 0.1-0.1 0.1H8.1z" fill="#fff"/><path d="M17.7 10.6c0 2.9-1.3 4.7-3.5 4.7 -2.2 0-3.5-1.8-3.5-4.7s1.3-4.7 3.5-4.7C16.4 5.9 17.7 7.7 17.7 10.6zM12.3 10.6c0 2.1 0.7 3.4 2 3.4 1.3 0 2-1.2 2-3.4 0-2.1-0.7-3.4-2-3.4C13 7.2 12.3 8.5 12.3 10.6z" fill="#fff"/>
591
+ </g>
592
+ </svg>
593
+ <?php
594
+ }
controller/settings.php CHANGED
@@ -6,8 +6,8 @@
6
  add_action('admin_menu', 'fv_player_admin_menu');
7
 
8
  function fv_player_admin_menu () {
9
- if( function_exists('add_submenu_page') ) {
10
- add_options_page( 'FV Player', 'FV Player', 'manage_options', 'fvplayer', 'fv_player_admin_page' );
11
  }
12
  }
13
 
@@ -15,17 +15,17 @@ function fv_player_admin_menu () {
15
 
16
 
17
  function fv_player_admin_page() {
18
- include dirname( __FILE__ ) . '/../view/admin.php';
19
  }
20
 
21
 
22
 
23
 
24
  function fv_player_is_admin_screen() {
25
- if( (isset($_GET['page']) && $_GET['page'] == 'fvplayer') || apply_filters('fv_player_is_admin_screen', false) ) {
26
- return true;
27
- }
28
- return false;
29
  }
30
 
31
 
@@ -53,22 +53,22 @@ function fv_wp_flowplayer_after_plugin_row( $arg) {
53
  return;
54
  }
55
 
56
- $args = func_get_args();
57
-
58
- if( $args[1]['Name'] == 'FV Wordpress Flowplayer' ) {
59
  $options = get_option( 'fvwpflowplayer' );
60
  if( $options['key'] == 'false' || $options['key'] == '' ) :
61
- ?>
62
  <tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
63
- <td class="plugin-update colspanchange" colspan="3">
64
- <div class="update-message">
65
- <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Easter sale!
66
- </div>
67
- </td>
68
  </tr>
69
- <?php
70
- endif;
71
- }
72
  }
73
 
74
 
@@ -93,25 +93,25 @@ add_action('admin_init', 'fv_player_settings_save', 9);
93
 
94
  function fv_player_settings_save() {
95
  // Trick media uploader to show video only, while making sure we use our custom type; Also save options
96
- if( isset($_GET['type']) ) {
97
- if( $_GET['type'] == 'fvplayer_video' || $_GET['type'] == 'fvplayer_video_1' || $_GET['type'] == 'fvplayer_video_2' || $_GET['type'] == 'fvplayer_mobile' ) {
98
- $_GET['post_mime_type'] = 'video';
99
- }
100
- else if( $_GET['type'] == 'fvplayer_splash' || $_GET['type'] == 'fvplayer_logo' ) {
101
- $_GET['post_mime_type'] = 'image';
102
- }
103
  }
104
 
105
  if( isset($_POST['fv-wp-flowplayer-submit']) ) {
106
  check_admin_referer('fv_flowplayer_settings_nonce','fv_flowplayer_settings_nonce');
107
 
108
- global $fv_fp;
109
- if( method_exists($fv_fp,'_set_conf') ) {
110
- $fv_fp->_set_conf();
111
- } else {
112
- echo 'Error saving FV Flowplayer options.';
113
- }
114
- }
115
  }
116
 
117
 
@@ -126,47 +126,58 @@ function fv_player_admin_pointer_boxes() {
126
  global $fv_fp;
127
  global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
128
 
129
- if(
130
- isset($fv_fp->conf['disable_videochecker']) && $fv_fp->conf['disable_videochecker'] == 'false' &&
131
  ( !isset($fv_fp->conf['video_checker_agreement']) || $fv_fp->conf['video_checker_agreement'] != 'true' )
132
- ) {
133
- $fv_fp->pointer_boxes['fv_flowplayer_video_checker_service'] = array(
134
  'id' => '#wp-admin-bar-new-content',
135
  'pointerClass' => 'fv_flowplayer_video_checker_service',
136
  'heading' => __('FV Player Video Checker', 'fv-wordpress-flowplayer'),
137
- '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-wordpress-flowplayer'),
138
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
139
  'button1' => __('Allow', 'fv-wordpress-flowplayer'),
140
  'button2' => __('Disable the video checker', 'fv-wordpress-flowplayer')
141
  );
142
- }
143
 
144
  if( !$fv_fp->_get_option('notice_new_lightbox') ) {
145
- $fv_fp->pointer_boxes['fv_flowplayer_new_lightbox'] = array(
146
  'id' => '#wp-admin-bar-new-content',
147
  'pointerClass' => 'fv_flowplayer_new_lightbox',
148
  'heading' => __('FV Player Video Lightbox', 'fv-wordpress-flowplayer'),
149
  'content' => __("<p>The lightbox technology has been changed from <a href='http://www.jacklmoore.com/colorbox/' target='_blank'>Colorbox</a> to <a href='https://fancyapps.com/fancybox/3/' target='_blank'>fancyBox</a></p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. You can check <a href='https://foliovision.com/player/demos/fv-flowplayer-lightbox' target='_blank'>our FV Player demo page</a> of it too.</p>", 'fv-wordpress-flowplayer'),
150
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
151
- 'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
152
- 'button2' => '<style>.fv_flowplayer_new_lightbox .button-secondary { display: none }</style>'
153
  );
154
- }
155
 
156
  if( !$fv_fp->_get_option('notice_db') ) {
157
- $fv_fp->pointer_boxes['fv_flowplayer_db'] = array(
158
  'id' => '#wp-admin-bar-new-content',
159
  'pointerClass' => 'fv_flowplayer_db',
160
  'heading' => __('FV Player database storage is here!', 'fv-wordpress-flowplayer'),
161
  'content' => __("<p>Any new or updated FV Player instances will be stored in database. This simplifies the shortcodes and increases FV Player reliability. You can read the full announcement <a href='https://foliovision.com/2018/11/video-database/' target='_blank'>here</a></p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. Advanced users can keep using the old shortcodes, but from now on the FV Player editor works with database only.</p>", 'fv-wordpress-flowplayer'),
162
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
 
 
 
 
 
 
 
 
 
 
 
163
  'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
164
- 'button2' => '<style>.fv_flowplayer_db .button-secondary { display: none }</style>'
 
165
  );
166
- }
167
 
168
- if( $fv_fp->_get_option('nag_fv_player_7') ) {
169
- $fv_fp->pointer_boxes['fv_flowplayer_fv_player_7'] = array(
170
  'id' => '#wp-admin-bar-new-content',
171
  'pointerClass' => 'fv_flowplayer_fv_player_7',
172
  'heading' => __('FV Player 7', 'fv-wordpress-flowplayer'),
@@ -180,9 +191,8 @@ function fv_player_admin_pointer_boxes() {
180
  '<p>More information in our <a href="https://foliovision.com/2018/09/fv-player-7" target="_blank">blog announcement</a>.</p>',
181
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
182
  'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
183
- 'button2' => '<style>.fv_flowplayer_fv_player_7 .button-secondary { display: none }</style>'
184
  );
185
- }
186
 
187
  if(
188
  (stripos( $_SERVER['REQUEST_URI'], '/plugins.php') !== false ||fv_player_is_admin_screen() )
@@ -201,7 +211,7 @@ function fv_player_admin_pointer_boxes() {
201
  }
202
 
203
  /*if( !$fv_fp->_get_option('disable_video_hash_links') && !$fv_fp->_get_option('notification_video_links') ) {
204
- $fv_fp->pointer_boxes['fv_player_notification_video_links'] = array(
205
  'id' => '#wp-admin-bar-new-content',
206
  'pointerClass' => 'fv_player_notification_video_links',
207
  'heading' => __('FV Player Video Links', 'fv-wordpress-flowplayer'),
@@ -212,7 +222,7 @@ function fv_player_admin_pointer_boxes() {
212
  );
213
 
214
  add_action( 'admin_print_footer_scripts', 'fv_player_pointer_scripts' );
215
- }*/
216
  }
217
 
218
 
@@ -220,68 +230,47 @@ function fv_player_admin_pointer_boxes() {
220
 
221
  add_action( 'wp_ajax_fv_foliopress_ajax_pointers', 'fv_wp_flowplayer_pointers_ajax' );
222
 
223
- function fv_wp_flowplayer_pointers_ajax() {
224
- if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_video_checker_service' && isset($_POST['value']) ) {
225
- check_ajax_referer('fv_flowplayer_video_checker_service');
226
- $conf = get_option( 'fvwpflowplayer' );
227
- if( $conf ) {
228
- if( $_POST['value'] == 'true' ) {
229
- $conf['disable_videochecker'] = 'false';
230
- $conf['video_checker_agreement'] = 'true';
231
- } else {
232
- $conf['disable_videochecker'] = 'true';
233
- }
234
- update_option( 'fvwpflowplayer', $conf );
235
- }
236
- die();
237
- }
238
-
239
- if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_new_lightbox' && isset($_POST['value']) ) {
240
- check_ajax_referer('fv_flowplayer_new_lightbox');
241
- $conf = get_option( 'fvwpflowplayer' );
242
- if( $conf ) {
243
- $conf['notice_new_lightbox'] = 'true';
244
- update_option( 'fvwpflowplayer', $conf );
245
- }
246
- die();
247
- }
248
-
249
- if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_db' && isset($_POST['value']) ) {
250
- check_ajax_referer('fv_flowplayer_db');
251
- $conf = get_option( 'fvwpflowplayer' );
252
- if( $conf ) {
253
- $conf['notice_db'] = 'true';
254
- update_option( 'fvwpflowplayer', $conf );
255
- }
256
- die();
257
- }
258
 
259
- if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_fv_player_7' && isset($_POST['value']) ) {
260
- check_ajax_referer('fv_flowplayer_fv_player_7');
261
- $conf = get_option( 'fvwpflowplayer' );
262
- if( $conf ) {
263
- unset($conf['nag_fv_player_7']);
264
- update_option( 'fvwpflowplayer', $conf );
265
- }
266
- die();
267
- }
 
 
 
 
 
268
 
269
- if( isset($_POST['key']) && $_POST['key'] == 'fv_player_notification_video_links' && isset($_POST['value']) ) {
270
- check_ajax_referer('fv_player_notification_video_links');
271
- $conf = get_option( 'fvwpflowplayer' );
272
- if( $conf ) {
273
- $conf['notification_video_links'] = 'true';
274
- update_option( 'fvwpflowplayer', $conf );
275
- }
276
- die();
277
- }
278
-
279
  if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_license_expired' && isset($_POST['value']) && $_POST['value'] === 'true' ) {
280
  check_ajax_referer('fv_flowplayer_license_expired');
281
  delete_option("fv_wordpress_flowplayer_persistent_notices");
282
  die();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  }
284
-
285
  }
286
 
287
 
@@ -314,9 +303,9 @@ function fv_flowplayer_admin_scripts() {
314
  if( fv_player_is_admin_screen() ) {
315
  wp_enqueue_media();
316
 
317
- wp_enqueue_script('common');
318
- wp_enqueue_script('wp-lists');
319
- wp_enqueue_script('postbox');
320
 
321
  wp_enqueue_script('jquery-minicolors', flowplayer::get_plugin_url().'/js/jquery-minicolors/jquery.minicolors.min.js',array('jquery'), $fv_wp_flowplayer_ver );
322
  wp_enqueue_script('fv-player-admin', flowplayer::get_plugin_url().'/js/admin.js',array('jquery','jquery-minicolors'), $fv_wp_flowplayer_ver );
6
  add_action('admin_menu', 'fv_player_admin_menu');
7
 
8
  function fv_player_admin_menu () {
9
+ if( function_exists('add_submenu_page') ) {
10
+ add_options_page( 'FV Player', 'FV Player', 'manage_options', 'fvplayer', 'fv_player_admin_page' );
11
  }
12
  }
13
 
15
 
16
 
17
  function fv_player_admin_page() {
18
+ include dirname( __FILE__ ) . '/../view/admin.php';
19
  }
20
 
21
 
22
 
23
 
24
  function fv_player_is_admin_screen() {
25
+ if( (isset($_GET['page']) && $_GET['page'] == 'fvplayer') || apply_filters('fv_player_is_admin_screen', false) ) {
26
+ return true;
27
+ }
28
+ return false;
29
  }
30
 
31
 
53
  return;
54
  }
55
 
56
+ $args = func_get_args();
57
+
58
+ if( $args[1]['Name'] == 'FV Wordpress Flowplayer' ) {
59
  $options = get_option( 'fvwpflowplayer' );
60
  if( $options['key'] == 'false' || $options['key'] == '' ) :
61
+ ?>
62
  <tr class="plugin-update-tr fv-wordpress-flowplayer-tr">
63
+ <td class="plugin-update colspanchange" colspan="3">
64
+ <div class="update-message">
65
+ <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">All Licenses 20% Off</a> - Easter sale!
66
+ </div>
67
+ </td>
68
  </tr>
69
+ <?php
70
+ endif;
71
+ }
72
  }
73
 
74
 
93
 
94
  function fv_player_settings_save() {
95
  // Trick media uploader to show video only, while making sure we use our custom type; Also save options
96
+ if( isset($_GET['type']) ) {
97
+ if( $_GET['type'] == 'fvplayer_video' || $_GET['type'] == 'fvplayer_video_1' || $_GET['type'] == 'fvplayer_video_2' || $_GET['type'] == 'fvplayer_mobile' ) {
98
+ $_GET['post_mime_type'] = 'video';
99
+ }
100
+ else if( $_GET['type'] == 'fvplayer_splash' || $_GET['type'] == 'fvplayer_logo' ) {
101
+ $_GET['post_mime_type'] = 'image';
102
+ }
103
  }
104
 
105
  if( isset($_POST['fv-wp-flowplayer-submit']) ) {
106
  check_admin_referer('fv_flowplayer_settings_nonce','fv_flowplayer_settings_nonce');
107
 
108
+ global $fv_fp;
109
+ if( method_exists($fv_fp,'_set_conf') ) {
110
+ $fv_fp->_set_conf();
111
+ } else {
112
+ echo 'Error saving FV Flowplayer options.';
113
+ }
114
+ }
115
  }
116
 
117
 
126
  global $fv_fp;
127
  global $fv_wp_flowplayer_ver, $fv_wp_flowplayer_core_ver;
128
 
129
+ if(
130
+ isset($fv_fp->conf['disable_videochecker']) && $fv_fp->conf['disable_videochecker'] == 'false' &&
131
  ( !isset($fv_fp->conf['video_checker_agreement']) || $fv_fp->conf['video_checker_agreement'] != 'true' )
132
+ ) {
133
+ $fv_fp->pointer_boxes['fv_flowplayer_video_checker_service'] = array(
134
  'id' => '#wp-admin-bar-new-content',
135
  'pointerClass' => 'fv_flowplayer_video_checker_service',
136
  'heading' => __('FV Player Video Checker', 'fv-wordpress-flowplayer'),
137
+ 'content' => __("<p>FV Player includes a <a href='https://foliovision.com/player/basic-setup/how-to-use-video-checker' target='_blank'>free video checker</a> 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-wordpress-flowplayer'),
138
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
139
  'button1' => __('Allow', 'fv-wordpress-flowplayer'),
140
  'button2' => __('Disable the video checker', 'fv-wordpress-flowplayer')
141
  );
142
+ }
143
 
144
  if( !$fv_fp->_get_option('notice_new_lightbox') ) {
145
+ $fv_fp->pointer_boxes['fv_flowplayer_new_lightbox'] = array(
146
  'id' => '#wp-admin-bar-new-content',
147
  'pointerClass' => 'fv_flowplayer_new_lightbox',
148
  'heading' => __('FV Player Video Lightbox', 'fv-wordpress-flowplayer'),
149
  'content' => __("<p>The lightbox technology has been changed from <a href='http://www.jacklmoore.com/colorbox/' target='_blank'>Colorbox</a> to <a href='https://fancyapps.com/fancybox/3/' target='_blank'>fancyBox</a></p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. You can check <a href='https://foliovision.com/player/demos/fv-flowplayer-lightbox' target='_blank'>our FV Player demo page</a> of it too.</p>", 'fv-wordpress-flowplayer'),
150
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
151
+ 'button1' => __('Acknowledge', 'fv-wordpress-flowplayer')
 
152
  );
153
+ }
154
 
155
  if( !$fv_fp->_get_option('notice_db') ) {
156
+ $fv_fp->pointer_boxes['fv_flowplayer_db'] = array(
157
  'id' => '#wp-admin-bar-new-content',
158
  'pointerClass' => 'fv_flowplayer_db',
159
  'heading' => __('FV Player database storage is here!', 'fv-wordpress-flowplayer'),
160
  'content' => __("<p>Any new or updated FV Player instances will be stored in database. This simplifies the shortcodes and increases FV Player reliability. You can read the full announcement <a href='https://foliovision.com/2018/11/video-database/' target='_blank'>here</a></p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. Advanced users can keep using the old shortcodes, but from now on the FV Player editor works with database only.</p>", 'fv-wordpress-flowplayer'),
161
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
162
+ 'button1' => __('Acknowledge', 'fv-wordpress-flowplayer')
163
+ );
164
+ }
165
+
166
+ if( $fv_fp->_get_option('video_sitemap') && !$fv_fp->_get_option('disableembedding') && !$fv_fp->_get_option('notice_xml_sitemap_iframes') ) {
167
+ $fv_fp->pointer_boxes['fv_flowplayer_notice_xml_sitemap_iframes'] = array(
168
+ 'id' => '#wp-admin-bar-new-content',
169
+ 'pointerClass' => 'fv_flowplayer_notice_xml_sitemap_iframes',
170
+ 'heading' => __('FV Player Video Sitemap coverage', 'fv-wordpress-flowplayer'),
171
+ 'content' => __("<p>The XML Video Sitemap now includes a lot more videos as it uses the individual player iframe embed links. Until now it was only possible to put in videos using MP4 format without any kind of download protection.</p><p>Please <a href='https://foliovision.com/support/fv-wordpress-flowplayer/bug-reports#new-post' target='_blank'>let us know</a> in case you notice any issues. Your members only videos stay protected and won't open, but let us know if they appear in sitemap.</p>", 'fv-wordpress-flowplayer').'<script>jQuery(".fv_flowplayer_notice_xml_sitemap_iframes .button2").click()</script>',
172
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
173
  'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
174
+ 'button2' => __('Go to setting', 'fv-wordpress-flowplayer'),
175
+ 'function2' => 'location.href = "'.admin_url('options-general.php?page=fvplayer').'#fv_flowplayer_seo"',
176
  );
177
+ }
178
 
179
+ if( !$fv_fp->_get_option('notice_db') && !$fv_fp->_get_option('nag_fv_player_7') ) {
180
+ $fv_fp->pointer_boxes['fv_flowplayer_fv_player_7'] = array(
181
  'id' => '#wp-admin-bar-new-content',
182
  'pointerClass' => 'fv_flowplayer_fv_player_7',
183
  'heading' => __('FV Player 7', 'fv-wordpress-flowplayer'),
191
  '<p>More information in our <a href="https://foliovision.com/2018/09/fv-player-7" target="_blank">blog announcement</a>.</p>',
192
  'position' => array( 'edge' => 'top', 'align' => 'center' ),
193
  'button1' => __('Acknowledge', 'fv-wordpress-flowplayer'),
 
194
  );
195
+ }
196
 
197
  if(
198
  (stripos( $_SERVER['REQUEST_URI'], '/plugins.php') !== false ||fv_player_is_admin_screen() )
211
  }
212
 
213
  /*if( !$fv_fp->_get_option('disable_video_hash_links') && !$fv_fp->_get_option('notification_video_links') ) {
214
+ $fv_fp->pointer_boxes['fv_player_notification_video_links'] = array(
215
  'id' => '#wp-admin-bar-new-content',
216
  'pointerClass' => 'fv_player_notification_video_links',
217
  'heading' => __('FV Player Video Links', 'fv-wordpress-flowplayer'),
222
  );
223
 
224
  add_action( 'admin_print_footer_scripts', 'fv_player_pointer_scripts' );
225
+ }*/
226
  }
227
 
228
 
230
 
231
  add_action( 'wp_ajax_fv_foliopress_ajax_pointers', 'fv_wp_flowplayer_pointers_ajax' );
232
 
233
+ function fv_wp_flowplayer_pointers_ajax() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
234
 
235
+ if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_video_checker_service' && isset($_POST['value']) ) {
236
+ check_ajax_referer('fv_flowplayer_video_checker_service');
237
+ $conf = get_option( 'fvwpflowplayer' );
238
+ if( $conf ) {
239
+ if( $_POST['value'] == 'true' ) {
240
+ $conf['disable_videochecker'] = 'false';
241
+ $conf['video_checker_agreement'] = 'true';
242
+ } else {
243
+ $conf['disable_videochecker'] = 'true';
244
+ }
245
+ update_option( 'fvwpflowplayer', $conf );
246
+ }
247
+ die();
248
+ }
249
 
 
 
 
 
 
 
 
 
 
 
250
  if( isset($_POST['key']) && $_POST['key'] == 'fv_flowplayer_license_expired' && isset($_POST['value']) && $_POST['value'] === 'true' ) {
251
  check_ajax_referer('fv_flowplayer_license_expired');
252
  delete_option("fv_wordpress_flowplayer_persistent_notices");
253
  die();
254
+ }
255
+
256
+ $notices = array(
257
+ 'fv_flowplayer_new_lightbox' => 'notice_new_lightbox',
258
+ 'fv_flowplayer_notice_xml_sitemap_iframes' => 'notice_xml_sitemap_iframes',
259
+ 'fv_flowplayer_db' => 'notice_db',
260
+ 'fv_flowplayer_fv_player_7' => 'nag_fv_player_7',
261
+ 'fv_player_notification_video_links' => 'notification_video_links',
262
+ );
263
+
264
+ if( isset($_POST['key']) && isset($_POST['value']) && in_array($_POST['key'], array_keys($notices) ) ) {
265
+ check_ajax_referer($_POST['key']);
266
+ $conf = get_option( 'fvwpflowplayer' );
267
+ if( $conf ) {
268
+ $conf[$notices[$_POST['key']]] = 'true';
269
+ update_option( 'fvwpflowplayer', $conf );
270
+ }
271
+ die();
272
  }
273
+
274
  }
275
 
276
 
303
  if( fv_player_is_admin_screen() ) {
304
  wp_enqueue_media();
305
 
306
+ wp_enqueue_script('common');
307
+ wp_enqueue_script('wp-lists');
308
+ wp_enqueue_script('postbox');
309
 
310
  wp_enqueue_script('jquery-minicolors', flowplayer::get_plugin_url().'/js/jquery-minicolors/jquery.minicolors.min.js',array('jquery'), $fv_wp_flowplayer_ver );
311
  wp_enqueue_script('fv-player-admin', flowplayer::get_plugin_url().'/js/admin.js',array('jquery','jquery-minicolors'), $fv_wp_flowplayer_ver );
controller/shortcodes.php CHANGED
@@ -316,10 +316,13 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
316
  if( isset($atts['src']) ) {
317
  $bridge_atts['src'] = $atts['src'];
318
  }
319
- foreach( array('mp4','webm','ogv','mov','flv','wmv','m4v') AS $key => $value ) {
320
- $src = 'src'.(( $key > 0 ) ? $key : '');
321
- if( isset($atts[$value]) ) {
 
 
322
  $bridge_atts[$src] = $atts[$value];
 
323
  }
324
  }
325
 
316
  if( isset($atts['src']) ) {
317
  $bridge_atts['src'] = $atts['src'];
318
  }
319
+
320
+ $count = 0;
321
+ foreach( array('mp4','webm','ogv','mov','flv','wmv','m4v') AS $key => $value ) {
322
+ if( !empty($atts[$value]) ) {
323
+ $src = 'src'.(( $count > 0 ) ? $count : '');
324
  $bridge_atts[$src] = $atts[$value];
325
+ $count++;
326
  }
327
  }
328
 
css/colorbox.css CHANGED
File without changes
css/flowplayer.css CHANGED
@@ -1,6 +1,7 @@
1
  @charset "UTF-8";
2
  @font-face {
3
  font-family: flowplayer;
 
4
  src: url("icons/flowplayer.eot?#iefix") format("embedded-opentype"), url("icons/flowplayer.woff2") format("woff2"), url("icons/flowplayer.woff") format("woff"); }
5
 
6
  .fp-icon { display: inline-block; }
@@ -47,7 +48,7 @@
47
  width: 100% !important;
48
  height: 100% !important;
49
  max-width: 100% !important;
50
- z-index: 99999 !important;
51
  -webkit-box-shadow: 0 !important;
52
  box-shadow: 0 !important;
53
  background-image: none !important;
@@ -340,7 +341,6 @@
340
  font-size: 16px;
341
  position: relative;
342
  max-height: 100%;
343
- overflow: hidden;
344
  border-radius: .24em;
345
  background-position: center;
346
  background-repeat: no-repeat;
@@ -912,6 +912,46 @@
912
  /*
913
  * FV Player Additions
914
  */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
915
  .flowplayer.skin-slim.is-mouseover.is-ready .fp-ui, .flowplayer.skin-slim.is-paused.is-ready .fp-ui, #content .flowplayer.skin-slim.is-paused.is-ready .fp-ui {
916
  background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .25)), color-stop(15%, transparent));
917
  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .25), transparent 15%);
@@ -958,12 +998,11 @@
958
  .flowplayer.fixed-controls.is-splash .fp-bar-slider, .flowplayer.fixed-controls.is-poster .fp-bar-slider { cursor: pointer; pointer-events: none }
959
 
960
  .flowplayer.fixed-controls .fp-controls, .flowplayer.fixed-controls.is-loading .fp-ui .fp-controls { opacity: 1; filter: alpha(opacity=100); }
961
- .flowplayer.fixed-controls {overflow: visible; margin-bottom: 4em}
962
  .flowplayer.fixed-controls .fp-controls {bottom: -2.4em}
963
  .flowplayer.fixed-controls.fp-full .fp-controls {bottom: -2.8em}
964
  .flowplayer.fixed-controls.is-fullscreen .fp-controls {bottom: 0}
965
 
966
- .flowplayer.has-video-checker {overflow: visible}
967
  .flowplayer .fp-elapsed {min-width: 5.1ch}
968
  .flowplayer.is-long .fp-elapsed {min-width: 7.1ch}
969
 
@@ -1317,12 +1356,13 @@
1317
 
1318
 
1319
  /* Popups */
1320
- .flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
 
1321
  .flowplayer .wpfp_custom_ad img { height: auto; }
1322
  .flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
1323
  .flowplayer.is-poster .wpfp_custom_ad { display: none; }
1324
 
1325
- .fv_fp_close { position: absolute; right: 2px; top: 2px; z-index: 20; }
1326
  .fv_fp_close a { display: block; width: 16px; height: 16px; background: url(img/exit_btn.png) no-repeat; background-size: 16px 16px; }
1327
 
1328
  .wpfp_custom_ad_content h1, .wpfp_custom_ad_content h2, .wpfp_custom_ad_content h3, .wpfp_custom_ad_content h4, .wpfp_custom_ad_content h5, .wpfp_custom_ad_content p { padding: 0 5px 2px 5px; margin: 0 5px 2px 5px; }
@@ -1584,6 +1624,19 @@ article .entry-content .fvfp_admin_error p { line-height: 18px }
1584
  .flowplayer.is-audio.is-loading.fp-default-playlist .fp-waiting svg {left: 2.5em}
1585
  .flowplayer.is-audio .fp-bar {background-color: #ccc}
1586
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1587
 
1588
  .flowplayer.is-audio .fp-fullscreen,.flowplayer.is-audio .fp-ratio,.flowplayer.is-audio.is-splash .fp-timeline-tooltip {display:none}
1589
  .flowplayer.is-audio.is-error {border:0;margin-bottom:50px}
1
  @charset "UTF-8";
2
  @font-face {
3
  font-family: flowplayer;
4
+ font-display: swap;
5
  src: url("icons/flowplayer.eot?#iefix") format("embedded-opentype"), url("icons/flowplayer.woff2") format("woff2"), url("icons/flowplayer.woff") format("woff"); }
6
 
7
  .fp-icon { display: inline-block; }
48
  width: 100% !important;
49
  height: 100% !important;
50
  max-width: 100% !important;
51
+ z-index: 9999999 !important;
52
  -webkit-box-shadow: 0 !important;
53
  box-shadow: 0 !important;
54
  background-image: none !important;
341
  font-size: 16px;
342
  position: relative;
343
  max-height: 100%;
 
344
  border-radius: .24em;
345
  background-position: center;
346
  background-repeat: no-repeat;
912
  /*
913
  * FV Player Additions
914
  */
915
+ @keyframes waiting {
916
+ 0% { transform: scale(1) }
917
+ 20% { transform: scale(1, 2) }
918
+ 40% { transform: scale(1) }
919
+ }
920
+ .fp-preload {
921
+ transition: opacity .3s .1s;
922
+ position: static;
923
+ top: 0;
924
+ bottom: 0;
925
+ left: 0;
926
+ right: 0;
927
+ margin: auto;
928
+ opacity: 0;
929
+ display: block;
930
+ height: 0
931
+ }
932
+ .flowplayer.is-splash .fp-preload, .fp-waiting .fp-preload {
933
+ position: absolute;
934
+ display: block;
935
+ height: 2em;
936
+ opacity: .8
937
+ }
938
+ .fp-preload b {
939
+ animation: waiting 1s ease-in-out infinite;
940
+ box-shadow: 0 0 .5rem #222;
941
+ background-color: white;
942
+ display: inline-block;
943
+ border-radius: .1em;
944
+ margin: 0 .2em;
945
+ height: 2em;
946
+ width: .4em
947
+ }
948
+ .fp-preload b:nth-child(1) { animation-delay: 0 }
949
+ .fp-preload b:nth-child(2) { animation-delay: .1s }
950
+ .fp-preload b:nth-child(3) { animation-delay: .15s }
951
+ .fp-preload b:nth-child(4) { animation-delay: .25s }
952
+
953
+ .flowplayer.is-splash .fp-ui noscript{display:block;z-index: 1000;position: absolute;left:0;right:0;padding:2em;background:black;margin-top:20%}
954
+
955
  .flowplayer.skin-slim.is-mouseover.is-ready .fp-ui, .flowplayer.skin-slim.is-paused.is-ready .fp-ui, #content .flowplayer.skin-slim.is-paused.is-ready .fp-ui {
956
  background-image: -webkit-gradient(linear, left bottom, left top, from(rgba(0, 0, 0, .25)), color-stop(15%, transparent));
957
  background-image: -webkit-linear-gradient(bottom, rgba(0, 0, 0, .25), transparent 15%);
998
  .flowplayer.fixed-controls.is-splash .fp-bar-slider, .flowplayer.fixed-controls.is-poster .fp-bar-slider { cursor: pointer; pointer-events: none }
999
 
1000
  .flowplayer.fixed-controls .fp-controls, .flowplayer.fixed-controls.is-loading .fp-ui .fp-controls { opacity: 1; filter: alpha(opacity=100); }
1001
+ .flowplayer.fixed-controls {margin-bottom: 4em}
1002
  .flowplayer.fixed-controls .fp-controls {bottom: -2.4em}
1003
  .flowplayer.fixed-controls.fp-full .fp-controls {bottom: -2.8em}
1004
  .flowplayer.fixed-controls.is-fullscreen .fp-controls {bottom: 0}
1005
 
 
1006
  .flowplayer .fp-elapsed {min-width: 5.1ch}
1007
  .flowplayer.is-long .fp-elapsed {min-width: 7.1ch}
1008
 
1356
 
1357
 
1358
  /* Popups */
1359
+ .flowplayer .wpfp_custom_ad { display: none; overflow: hidden; }
1360
+ .flowplayer .wpfp_custom_ad.tall-ad { top: 0; bottom: auto; }
1361
  .flowplayer .wpfp_custom_ad img { height: auto; }
1362
  .flowplayer.is-playing .wpfp_custom_ad, .flowplayer.is-ready .wpfp_custom_ad { display: block; }
1363
  .flowplayer.is-poster .wpfp_custom_ad { display: none; }
1364
 
1365
+ .fv_fp_close { position: absolute; right: 2px; top: 2px; z-index: 2147483647; }
1366
  .fv_fp_close a { display: block; width: 16px; height: 16px; background: url(img/exit_btn.png) no-repeat; background-size: 16px 16px; }
1367
 
1368
  .wpfp_custom_ad_content h1, .wpfp_custom_ad_content h2, .wpfp_custom_ad_content h3, .wpfp_custom_ad_content h4, .wpfp_custom_ad_content h5, .wpfp_custom_ad_content p { padding: 0 5px 2px 5px; margin: 0 5px 2px 5px; }
1624
  .flowplayer.is-audio.is-loading.fp-default-playlist .fp-waiting svg {left: 2.5em}
1625
  .flowplayer.is-audio .fp-bar {background-color: #ccc}
1626
 
1627
+ .flowplayer.is-audio.is-loading .fp-preload {
1628
+ z-index: 10;
1629
+ left: 0.3em;
1630
+ top: 3.2em;
1631
+ width: 2.7em;
1632
+ }
1633
+
1634
+ .flowplayer.is-audio.is-loading .fp-preload b {
1635
+ margin: 0 .15em;
1636
+ height: 0.9em;
1637
+ width: 0.35em;
1638
+ }
1639
+
1640
 
1641
  .flowplayer.is-audio .fp-fullscreen,.flowplayer.is-audio .fp-ratio,.flowplayer.is-audio.is-splash .fp-timeline-tooltip {display:none}
1642
  .flowplayer.is-audio.is-error {border:0;margin-bottom:50px}
css/fonts/fpicons.eot CHANGED
File without changes
css/fonts/fpicons.svg CHANGED
File without changes
css/fonts/fpicons.ttf CHANGED
File without changes
css/fonts/fpicons.woff CHANGED
File without changes
css/fvp-icon-sprite.svg CHANGED
@@ -4,13 +4,13 @@
4
  <path class="svg-color" d="M4.972,44.723C2.984,42.668,2,40.282,2,37.543v-35.9h14.36v31.792h37.345V18.057l24.629,22.574
5
  L53.704,63.19V47.813H12.26C9.388,47.813,6.95,46.778,4.972,44.723z"/>
6
  </g>
7
- <g id="fvp-playlist-play"><title id=“fvp-all“>Play All</title>
8
  <rect class="svg-color" x="23.586" y="3.15" width="61.164" height="10.187"/>
9
  <rect class="svg-color" x="23.586" y="43.934" width="61.164" height="10.186"/>
10
  <rect class="svg-color" x="43.158" y="23.544" width="41.592" height="10.184"/>
11
  <polygon class="svg-color" points="2.5,9.351 2.5,47.919 33.858,28.698 "/>
12
  </g>
13
- <g id="fvp-replay-list"><title id=“fvp-rp“>Replay Playlist</title>
14
  <path class="svg-color" d="M48.928,50.465h27.599l-1.523,26.074l-8.122-8.305c-3.784,3.645-8.062,6.352-12.861,8.121
15
  c-4.784,1.769-9.63,2.646-14.553,2.646c-4.907,0-9.737-0.938-14.46-2.83c-4.722-1.893-8.984-4.724-12.752-8.506
16
  c-3.277-3.278-5.8-6.847-7.569-10.677c-1.753-3.847-2.892-7.846-3.4-12.015l9.646-0.369c1,6.291,3.768,11.722,8.307,16.245
@@ -21,8 +21,8 @@
21
  c-2.769-2.77-5.921-4.893-9.444-6.338s-7.124-2.169-10.769-2.169c-3.661,0-7.245,0.662-10.784,1.985
22
  c-3.522,1.322-6.738,3.307-9.645,5.953L30.96,29.851L3.362,30.036L4.87,3.961z"/>
23
  </g>
24
- <g id="fvp-replay-track"><title id=“fvp-rt“>Replay Track</title>
25
- <path class="svg-color"d="M35.069,1.699c4.643,0,9.001,0.852,13.09,2.568c4.082,1.703,7.651,4.042,10.686,7.015
26
  c3.034,2.987,5.468,6.475,7.285,10.502c1.825,4.015,2.791,8.286,2.906,12.8h10.131l-15.18,17.113L48.774,34.585H60.73
27
  c-0.115-3.433-0.858-6.637-2.251-9.624c-1.386-3.001-3.251-5.596-5.582-7.813c-2.332-2.217-5.028-3.96-8.083-5.231
28
  s-6.306-1.906-9.746-1.906c-3.555,0-6.86,0.662-9.915,1.987c-3.055,1.325-5.751,3.163-8.083,5.488
@@ -33,7 +33,7 @@
33
  C2.135,44.696,1.27,40.303,1.27,35.667c0-4.744,0.878-9.165,2.649-13.247c1.764-4.095,4.197-7.677,7.292-10.773
34
  c3.089-3.095,6.677-5.528,10.766-7.299C26.066,2.591,30.426,1.699,35.069,1.699z"/>
35
  </g>
36
- <g id="fvp-shuffle"><title id=“fvp-sp“>Shuffle Playlist</title>
37
  <path class="svg-color" d="M60.216,22.676c-2.176,0-4.198,0.417-6.064,1.24c-1.858,0.835-3.624,1.973-5.28,3.427
38
  c-1.656,1.455-3.263,3.137-4.818,5.046c-1.557,1.923-3.105,3.908-4.661,5.982c-1.764,2.39-3.629,4.742-5.596,7.07
39
  c-1.967,2.34-4.142,4.489-6.526,6.45c-2.384,1.973-5.002,3.554-7.848,4.743c-2.852,1.188-6.09,1.782-9.713,1.782H1.626V47.542
@@ -48,7 +48,7 @@
48
  c0.202-0.201,0.386-0.442,0.544-0.695c0.151-0.265,0.335-0.543,0.544-0.859c1.967,2.074,4.04,3.73,6.216,4.97
49
  c2.176,1.24,4.61,1.872,7.304,1.872h2.795V40.547z"/>
50
  </g>
51
- <g id="fvp-nopicture"><title id=“fvp-hidepic”>Hide picture</title>
52
  <path class="svg-color" fill-rule="evenodd" clip-rule="evenodd" d="M84.069,8.698c-1.358-1.945-19.374-7.091-39.067-7.091
53
  c-19.51,0-36.575,5.161-38.318,7.091S1.671,22.833,1.671,39.893c0,17.241,2.881,29.125,5.013,31.285s18.989,7.215,38.59,7.215
54
  c19.602,0,36.903-5.125,38.794-7.215s4.696-14.089,4.696-31.238C88.766,22.786,85.428,10.644,84.069,8.698z M67.653,58.217
4
  <path class="svg-color" d="M4.972,44.723C2.984,42.668,2,40.282,2,37.543v-35.9h14.36v31.792h37.345V18.057l24.629,22.574
5
  L53.704,63.19V47.813H12.26C9.388,47.813,6.95,46.778,4.972,44.723z"/>
6
  </g>
7
+ <g id="fvp-playlist-play"><title id="fvp-all">Play All</title>
8
  <rect class="svg-color" x="23.586" y="3.15" width="61.164" height="10.187"/>
9
  <rect class="svg-color" x="23.586" y="43.934" width="61.164" height="10.186"/>
10
  <rect class="svg-color" x="43.158" y="23.544" width="41.592" height="10.184"/>
11
  <polygon class="svg-color" points="2.5,9.351 2.5,47.919 33.858,28.698 "/>
12
  </g>
13
+ <g id="fvp-replay-list"><title id="fvp-rp">Replay Playlist</title>
14
  <path class="svg-color" d="M48.928,50.465h27.599l-1.523,26.074l-8.122-8.305c-3.784,3.645-8.062,6.352-12.861,8.121
15
  c-4.784,1.769-9.63,2.646-14.553,2.646c-4.907,0-9.737-0.938-14.46-2.83c-4.722-1.893-8.984-4.724-12.752-8.506
16
  c-3.277-3.278-5.8-6.847-7.569-10.677c-1.753-3.847-2.892-7.846-3.4-12.015l9.646-0.369c1,6.291,3.768,11.722,8.307,16.245
21
  c-2.769-2.77-5.921-4.893-9.444-6.338s-7.124-2.169-10.769-2.169c-3.661,0-7.245,0.662-10.784,1.985
22
  c-3.522,1.322-6.738,3.307-9.645,5.953L30.96,29.851L3.362,30.036L4.87,3.961z"/>
23
  </g>
24
+ <g id="fvp-replay-track"><title id="fvp-rt">Replay Track</title>
25
+ <path class="svg-color" d="M35.069,1.699c4.643,0,9.001,0.852,13.09,2.568c4.082,1.703,7.651,4.042,10.686,7.015
26
  c3.034,2.987,5.468,6.475,7.285,10.502c1.825,4.015,2.791,8.286,2.906,12.8h10.131l-15.18,17.113L48.774,34.585H60.73
27
  c-0.115-3.433-0.858-6.637-2.251-9.624c-1.386-3.001-3.251-5.596-5.582-7.813c-2.332-2.217-5.028-3.96-8.083-5.231
28
  s-6.306-1.906-9.746-1.906c-3.555,0-6.86,0.662-9.915,1.987c-3.055,1.325-5.751,3.163-8.083,5.488
33
  C2.135,44.696,1.27,40.303,1.27,35.667c0-4.744,0.878-9.165,2.649-13.247c1.764-4.095,4.197-7.677,7.292-10.773
34
  c3.089-3.095,6.677-5.528,10.766-7.299C26.066,2.591,30.426,1.699,35.069,1.699z"/>
35
  </g>
36
+ <g id="fvp-shuffle"><title id="fvp-sp">Shuffle Playlist</title>
37
  <path class="svg-color" d="M60.216,22.676c-2.176,0-4.198,0.417-6.064,1.24c-1.858,0.835-3.624,1.973-5.28,3.427
38
  c-1.656,1.455-3.263,3.137-4.818,5.046c-1.557,1.923-3.105,3.908-4.661,5.982c-1.764,2.39-3.629,4.742-5.596,7.07
39
  c-1.967,2.34-4.142,4.489-6.526,6.45c-2.384,1.973-5.002,3.554-7.848,4.743c-2.852,1.188-6.09,1.782-9.713,1.782H1.626V47.542
48
  c0.202-0.201,0.386-0.442,0.544-0.695c0.151-0.265,0.335-0.543,0.544-0.859c1.967,2.074,4.04,3.73,6.216,4.97
49
  c2.176,1.24,4.61,1.872,7.304,1.872h2.795V40.547z"/>
50
  </g>
51
+ <g id="fvp-nopicture"><title id="fvp-hidepic">Hide picture</title>
52
  <path class="svg-color" fill-rule="evenodd" clip-rule="evenodd" d="M84.069,8.698c-1.358-1.945-19.374-7.091-39.067-7.091
53
  c-19.51,0-36.575,5.161-38.318,7.091S1.671,22.833,1.671,39.893c0,17.241,2.881,29.125,5.013,31.285s18.989,7.215,38.59,7.215
54
  c19.602,0,36.903-5.125,38.794-7.215s4.696-14.089,4.696-31.238C88.766,22.786,85.428,10.644,84.069,8.698z M67.653,58.217
css/img/exit_btn.png CHANGED
File without changes
css/img/flowplayer.png CHANGED
File without changes
css/img/no_play_white-x2.png CHANGED
File without changes
css/img/no_play_white.png CHANGED
File without changes
css/img/techinfo.png CHANGED
File without changes
css/sitemap-video.xsl CHANGED
@@ -76,7 +76,7 @@
76
  <div id="content">
77
  <h1>FV Player Video Sitemap</h1>
78
  <p class="expl">
79
- This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs.
80
  </p>
81
  <div class="content">
82
  <table id="sitemap">
@@ -91,54 +91,58 @@
91
  </thead>
92
  <tbody>
93
  <xsl:for-each select="sitemap:urlset/sitemap:url">
94
- <tr>
95
- <xsl:if test="position() mod 2 = 1">
96
- <xsl:attribute name="class">odd</xsl:attribute>
97
- </xsl:if>
98
-
99
- <td>
100
- <xsl:variable name="thumbURL">
101
- <xsl:value-of select="video:video/video:thumbnail_loc"/>
102
- </xsl:variable>
103
-
104
- <xsl:variable name="flvURL">
105
- <xsl:value-of select="video:video/video:player_loc"/>
106
- </xsl:variable>
107
-
108
- <img src="{$thumbURL}" width="100" />
109
- </td>
110
-
111
- <td>
112
- <xsl:variable name="itemURL">
113
- <xsl:value-of select="sitemap:loc"/>
114
- </xsl:variable>
115
- <a href="{$itemURL}">
116
- <strong><xsl:value-of disable-output-escaping="yes" select="video:video/video:title"/></strong>
117
- </a>
118
- </td>
119
-
120
- <td>
121
- <xsl:variable name="desc">
122
- <xsl:value-of disable-output-escaping="yes" select="video:video/video:description"/>
123
- </xsl:variable>
124
- <xsl:choose>
125
- <xsl:when test="string-length($desc) &lt; 200">
126
- <xsl:value-of select="$desc"/>
127
- </xsl:when>
128
- <xsl:otherwise>
129
- <xsl:value-of select="concat(substring($desc,1,200),' ...')"/>
130
- </xsl:otherwise>
131
- </xsl:choose>
132
- </td>
133
-
134
- <td>
135
- <xsl:value-of select="video:video/video:category"/>
136
- </td>
137
-
138
- <td>
139
- <xsl:value-of select="concat(substring(video:video/video:publication_date,0,11),concat(' ', substring(video:video/video:publication_date,12,5)))"/>
140
- </td>
141
- </tr>
 
 
 
 
142
  </xsl:for-each>
143
  </tbody>
144
  </table>
76
  <div id="content">
77
  <h1>FV Player Video Sitemap</h1>
78
  <p class="expl">
79
+ This sitemap contains <xsl:value-of select="count(sitemap:urlset/sitemap:url)"/> URLs with <xsl:value-of select="count(sitemap:urlset/sitemap:url/video:video)"/> videos.
80
  </p>
81
  <div class="content">
82
  <table id="sitemap">
91
  </thead>
92
  <tbody>
93
  <xsl:for-each select="sitemap:urlset/sitemap:url">
94
+ <xsl:variable name="itemURL">
95
+ <xsl:value-of select="sitemap:loc"/>
96
+ </xsl:variable>
97
+ <xsl:for-each select="video:video">
98
+ <tr>
99
+ <xsl:if test="position() mod 2 = 1">
100
+ <xsl:attribute name="class">odd</xsl:attribute>
101
+ </xsl:if>
102
+
103
+ <td>
104
+ <xsl:variable name="thumbURL">
105
+ <xsl:value-of select="video:thumbnail_loc"/>
106
+ </xsl:variable>
107
+
108
+ <xsl:variable name="videoURL">
109
+ <xsl:value-of select="video:player_loc"/>
110
+ <xsl:value-of select="video:content_loc"/>
111
+ </xsl:variable>
112
+ <a href="{$videoURL}">
113
+ <img src="{$thumbURL}" width="100" />
114
+ </a>
115
+ </td>
116
+
117
+ <td>
118
+ <a href="{$itemURL}">
119
+ <strong><xsl:value-of disable-output-escaping="yes" select="video:title"/></strong>
120
+ </a>
121
+ </td>
122
+
123
+ <td>
124
+ <xsl:variable name="desc">
125
+ <xsl:value-of disable-output-escaping="yes" select="video:description"/>
126
+ </xsl:variable>
127
+ <xsl:choose>
128
+ <xsl:when test="string-length($desc) &lt; 200">
129
+ <xsl:value-of select="$desc"/>
130
+ </xsl:when>
131
+ <xsl:otherwise>
132
+ <xsl:value-of select="concat(substring($desc,1,200),' ...')"/>
133
+ </xsl:otherwise>
134
+ </xsl:choose>
135
+ </td>
136
+
137
+ <td>
138
+ <xsl:value-of select="video:category"/>
139
+ </td>
140
+
141
+ <td>
142
+ <xsl:value-of select="concat(substring(video:publication_date,0,11),concat(' ', substring(video:publication_date,12,5)))"/>
143
+ </td>
144
+ </tr>
145
+ </xsl:for-each>
146
  </xsl:for-each>
147
  </tbody>
148
  </table>
flowplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
- Version: 7.3.12.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -27,7 +27,7 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
- $fv_wp_flowplayer_ver = '7.3.12.727';
31
  $fv_wp_flowplayer_core_ver = '7.2.7.1';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
+ Version: 7.3.13.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
+ $fv_wp_flowplayer_ver = '7.3.13.727';
31
  $fv_wp_flowplayer_core_ver = '7.2.7.1';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
flowplayer/embed.min.js CHANGED
File without changes
flowplayer/flowplayer.swf CHANGED
File without changes
flowplayer/flowplayerhls.swf CHANGED
File without changes
flowplayer/fv-flowplayer.min.js CHANGED
@@ -26,6 +26,7 @@ if( typeof(fv_flowplayer_conf) != "undefined" ) {
26
  } catch(e) {}
27
 
28
  flowplayer.conf = fv_flowplayer_conf;
 
29
  flowplayer.conf.share = false;
30
 
31
  if( !flowplayer.support.android && flowplayer.conf.dacast_hlsjs ) {
@@ -361,7 +362,7 @@ jQuery(document).on('click', '.flowplayer .embed-code-toggle', function() {
361
  });
362
 
363
  return false;
364
- } );
365
 
366
 
367
  function fv_flowplayer_mobile_switch(id) {
@@ -850,25 +851,8 @@ flowplayer( function(api,root) {
850
  root.find('.fp-chromecast').insertAfter( root.find('.fp-header .fp-fullscreen') );
851
  });
852
 
853
- // svg color fix
854
- root.find('.fp-waiting .sq animate').each( function() {
855
- jQuery(this).attr('values',jQuery(this).attr('values').replace(/0,0,0,.5/g,'255,255,255,0.8'));
856
- jQuery(this).attr('to',jQuery(this).attr('to').replace(/0,0,0,.5/g,'255,255,255,0.8'))
857
- jQuery(this).attr('values',jQuery(this).attr('values').replace(/0,0,0,0/g,'0,0,0,0.8'))
858
- jQuery(this).attr('to',jQuery(this).attr('to').replace(/0,0,0,0/g,'0,0,0,0.8'))
859
- });
860
-
861
- // performance fix as showing too many SVGs at once increases CPU load
862
- var waiting = root.find('.fp-waiting'),
863
- svgs = waiting.children();
864
-
865
- svgs.remove();
866
-
867
- api.bind('load', function() {
868
- svgs.appendTo(waiting);
869
- }).bind('unload', function() {
870
- svgs.remove();
871
- });
872
 
873
  if( !flowplayer.support.fullscreen ) {
874
  var id = root.attr('id'),
@@ -940,7 +924,8 @@ if( isIE11 ) {
940
  */
941
  flowplayer(function (api,root) {
942
  root = jQuery(root);
943
- var player_id = root.attr('id');
 
944
 
945
  if( root.data('end_popup_preview') ){
946
  jQuery(document).ready( function() {
@@ -948,6 +933,36 @@ flowplayer(function (api,root) {
948
  });
949
  }
950
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
951
  function show_popup( event ) {
952
  var popup = root.find('.wpfp_custom_popup');
953
  if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" && ( event == 'finish' || fv_flowplayer_popup[player_id].pause || fv_flowplayer_popup[player_id].html.match(/fv-player-ppv-purchase-btn-wrapper/) ) ) {
@@ -956,11 +971,13 @@ flowplayer(function (api,root) {
956
  }
957
  }
958
 
959
- api.bind("ready", function (e, api) {
960
- if( !root.hasClass('is-cva') && root.find('#'+player_id+'_ad').length == 0 && typeof(fv_flowplayer_ad) != "undefined" && typeof(fv_flowplayer_ad[player_id]) != "undefined" && root.width() >= parseInt(fv_flowplayer_ad[player_id].width) ) {
961
- var html = fv_flowplayer_ad[player_id].html;
962
- html = html.replace( '%random%', Math.random() );
963
- root.find('.fp-player').append( '<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+'</div>' );
 
 
964
  }
965
  }).bind("finish", function (e, api) {
966
  if( typeof(api.video.index) == "undefined" || api.video.index+1 == api.conf.playlist.length ) {
@@ -976,6 +993,16 @@ flowplayer(function (api,root) {
976
  });
977
  });
978
 
 
 
 
 
 
 
 
 
 
 
979
  /*
980
  * Popups form
981
  */
@@ -1046,11 +1073,6 @@ flowplayer( function(api,root) {
1046
  var root = jQuery(root);
1047
  api.bind('progress', function(e,api,current) {
1048
  fv_track(e,api,current);
1049
- if (!jQuery(root).hasClass("is-cva")){
1050
- if (current > (jQuery(root).data('ad_show_after') )){
1051
- jQuery(root).find(".wpfp_custom_ad_content").fadeIn();
1052
- }
1053
- }
1054
  }).bind('finish ready ', function(e,api) {
1055
  //if( typeof(aFVPlayersSwitching[root.attr('id')]) != "undefined" ) { // todo: problem that it won't work on video replay or playlist
1056
  //return;
@@ -1862,6 +1884,7 @@ function fv_player_notice(root, message, timeout) {
1862
  notice.fadeOut(2000,function() { jQuery(this).remove(); });
1863
  }, timeout );
1864
  }
 
1865
  }
1866
 
1867
 
@@ -2051,11 +2074,11 @@ if( flowplayer.conf.mobile_force_fullscreen && ( 'ontouchstart' in window ) && f
2051
 
2052
  if( flowplayer.support.iOS.iPad || flowplayer.support.iOS.iPhone && flowplayer.support.iOS.version >= 10 ) {
2053
  api.bind('ready', function() {
2054
- api.fullscreen();
2055
  });
2056
  } else if( flowplayer.support.android ) {
2057
  jQuery(root).on('click', function() {
2058
- if( !api.ready ) api.fullscreen();
2059
  });
2060
  }
2061
  });
@@ -2208,7 +2231,7 @@ flowplayer( function(api,root) {
2208
 
2209
  api.bind('ready', function(e,api) {
2210
  if( !api.video.type.match(/^audio/) && root.data('button-no-picture') && root.find('.fv-fp-no-picture').length == 0 ) {
2211
- var button_no_picture = jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></strspanong>');
2212
 
2213
  button_no_picture.insertAfter( root.find('.fp-controls .fp-volume') ).click( function(e) {
2214
  e.preventDefault();
@@ -2826,3 +2849,106 @@ flowplayer( function(api,root) {
2826
  });
2827
 
2828
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  } catch(e) {}
27
 
28
  flowplayer.conf = fv_flowplayer_conf;
29
+ flowplayer.conf.embed = false;
30
  flowplayer.conf.share = false;
31
 
32
  if( !flowplayer.support.android && flowplayer.conf.dacast_hlsjs ) {
362
  });
363
 
364
  return false;
365
+ } );
366
 
367
 
368
  function fv_flowplayer_mobile_switch(id) {
851
  root.find('.fp-chromecast').insertAfter( root.find('.fp-header .fp-fullscreen') );
852
  });
853
 
854
+ // replacing loading SVG with CSS animation
855
+ root.find('.fp-waiting').html('<div class="fp-preload"><b></b><b></b><b></b><b></b></div>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
856
 
857
  if( !flowplayer.support.fullscreen ) {
858
  var id = root.attr('id'),
924
  */
925
  flowplayer(function (api,root) {
926
  root = jQuery(root);
927
+ var player_id = root.attr('id'),
928
+ ad = false;
929
 
930
  if( root.data('end_popup_preview') ){
931
  jQuery(document).ready( function() {
933
  });
934
  }
935
 
936
+ function ad_height_check() {
937
+ var count = 0;
938
+ var ad_height_check = setInterval( function() {
939
+ var height = ad.find('.adsbygoogle').height();
940
+ count++;
941
+ if( count > 20*10 || height > 0 ) clearInterval(ad_height_check);
942
+ if( height > root.height() ) {
943
+ ad.addClass('tall-ad');
944
+ }
945
+ }, 50 );
946
+ }
947
+
948
+ function show_ad() {
949
+ if( !ad && !root.hasClass('is-cva') && root.find('#'+player_id+'_ad').length == 0 && typeof(fv_flowplayer_ad) != "undefined" && typeof(fv_flowplayer_ad[player_id]) != "undefined" && root.width() >= parseInt(fv_flowplayer_ad[player_id].width) ) {
950
+ var html = fv_flowplayer_ad[player_id].html;
951
+ html = html.replace( '%random%', Math.random() );
952
+ ad = jQuery('<div id="'+player_id+'_ad" class="wpfp_custom_ad">'+html+'</div>');
953
+ root.find('.fp-player').append(ad);
954
+
955
+ ad_height_check();
956
+ // check if the ad contains any video and pause the player if the video is found
957
+ setTimeout( function() {
958
+ if( root.find('.wpfp_custom_ad video').length ) {
959
+ api.pause();
960
+ }
961
+ },500);
962
+
963
+ }
964
+ }
965
+
966
  function show_popup( event ) {
967
  var popup = root.find('.wpfp_custom_popup');
968
  if( typeof(fv_flowplayer_popup) != "undefined" && typeof(fv_flowplayer_popup[player_id]) != "undefined" && ( event == 'finish' || fv_flowplayer_popup[player_id].pause || fv_flowplayer_popup[player_id].html.match(/fv-player-ppv-purchase-btn-wrapper/) ) ) {
971
  }
972
  }
973
 
974
+ api.bind("ready", function (e, api) {
975
+ if( !root.data('ad_show_after') ) {
976
+ show_ad();
977
+ }
978
+ }).bind('progress', function(e,api,current) {
979
+ if (current > root.data('ad_show_after') ){
980
+ show_ad();
981
  }
982
  }).bind("finish", function (e, api) {
983
  if( typeof(api.video.index) == "undefined" || api.video.index+1 == api.conf.playlist.length ) {
993
  });
994
  });
995
 
996
+ jQuery(document).on('click', '.fv_fp_close', function() {
997
+ var ad = jQuery(this).parents('.wpfp_custom_ad_content'),
998
+ video = ad.find('video');
999
+
1000
+ ad.fadeOut();
1001
+ if( video.length ) video[0].pause();
1002
+
1003
+ return false;
1004
+ } );
1005
+
1006
  /*
1007
  * Popups form
1008
  */
1073
  var root = jQuery(root);
1074
  api.bind('progress', function(e,api,current) {
1075
  fv_track(e,api,current);
 
 
 
 
 
1076
  }).bind('finish ready ', function(e,api) {
1077
  //if( typeof(aFVPlayersSwitching[root.attr('id')]) != "undefined" ) { // todo: problem that it won't work on video replay or playlist
1078
  //return;
1884
  notice.fadeOut(2000,function() { jQuery(this).remove(); });
1885
  }, timeout );
1886
  }
1887
+ return notice;
1888
  }
1889
 
1890
 
2074
 
2075
  if( flowplayer.support.iOS.iPad || flowplayer.support.iOS.iPhone && flowplayer.support.iOS.version >= 10 ) {
2076
  api.bind('ready', function() {
2077
+ api.fullscreen(true);
2078
  });
2079
  } else if( flowplayer.support.android ) {
2080
  jQuery(root).on('click', function() {
2081
+ if( !api.ready ) api.fullscreen(true);
2082
  });
2083
  }
2084
  });
2231
 
2232
  api.bind('ready', function(e,api) {
2233
  if( !api.video.type.match(/^audio/) && root.data('button-no-picture') && root.find('.fv-fp-no-picture').length == 0 ) {
2234
+ var button_no_picture = jQuery('<span class="fv-fp-no-picture"><svg viewBox="0 0 90 80" width="20px" height="20px" class="fvp-icon fvp-nopicture"><use xlink:href="#fvp-nopicture"></use></svg></span>');
2235
 
2236
  button_no_picture.insertAfter( root.find('.fp-controls .fp-volume') ).click( function(e) {
2237
  e.preventDefault();
2849
  });
2850
 
2851
  });
2852
+
2853
+ /*
2854
+ * Hls - audio menu
2855
+ */
2856
+ flowplayer( function(api,root) {
2857
+
2858
+ root = jQuery(root);
2859
+ var hlsjs, player, videoTag ,audioUXGroup, audioGroups;
2860
+ var hls_audio_button, hls_audio_menu;
2861
+ var mse = window.MediaSource || window.WebKitMediaSource;
2862
+
2863
+ flowplayer.engine('hlsjs-lite').plugin(function(params) {
2864
+ hlsjs = params.hls;
2865
+ });
2866
+
2867
+ selectAudioTrack = function (audioTrack) {
2868
+ var elements = root.find(".fv-fp-hls-menu a");
2869
+ elements.each(function (k,el) {
2870
+ var adata = jQuery(el).attr("data-audio"),
2871
+ isSelected = adata === audioTrack.name;
2872
+ jQuery(el).toggleClass("fp-selected", isSelected);
2873
+ });
2874
+ }
2875
+
2876
+ function removeAudioMenu(){
2877
+ jQuery(hls_audio_menu).remove();
2878
+ jQuery(hls_audio_button).remove();
2879
+ }
2880
+
2881
+ function initAudio(data){
2882
+ audioGroups = [];
2883
+ audioUXGroup = [];
2884
+
2885
+ data.levels.forEach(function (level) {
2886
+ var agroup = level.attrs.AUDIO;
2887
+
2888
+ if (agroup && audioGroups.indexOf(agroup) < 0/* && mse.isTypeSupported("video/mp4;codecs=" + level.videoCodec + "," + level.audioCodec)*/) { //TODO: test & fix
2889
+ audioGroups.push(agroup);
2890
+ }
2891
+
2892
+ if (audioGroups.length) {
2893
+ audioUXGroup = data.audioTracks.filter(function (audioTrack) {
2894
+ return audioTrack.groupId === audioGroups[0];
2895
+ });
2896
+ }
2897
+ });
2898
+ }
2899
+
2900
+ api.bind('ready', function(e,api) {
2901
+ removeAudioMenu();
2902
+
2903
+ if( !hlsjs || api.video.type != 'application/x-mpegurl'){
2904
+ return;
2905
+ }
2906
+
2907
+ initAudio(hlsjs);
2908
+
2909
+ if (!audioUXGroup || audioUXGroup.length < 2) {
2910
+ return;
2911
+ }
2912
+
2913
+ // gui
2914
+ hls_audio_button = jQuery('<strong class="fv-fp-hls">AUD</strong>');
2915
+ hls_audio_menu = jQuery('<div class="fp-menu fv-fp-hls-menu"></div>').insertAfter( root.find('.fp-controls') );
2916
+
2917
+ hls_audio_menu.append('<strong>AUDIO</strong>');
2918
+
2919
+ // audio options
2920
+ audioUXGroup.forEach(function (audioTrack) {
2921
+ hls_audio_menu.append('<a data-audio="'+audioTrack.name+'">'+audioTrack.name+'</a>');
2922
+ });
2923
+
2924
+ // button
2925
+ hls_audio_button.insertAfter( root.find('.fp-controls .fp-volume') ).click( function(e) {
2926
+ e.preventDefault();
2927
+ e.stopPropagation();
2928
+
2929
+ if( hls_audio_menu.hasClass('fp-active') ) {
2930
+ api.hideMenu(hls_audio_menu[0]);
2931
+ }
2932
+ else {
2933
+ root.click();
2934
+ api.showMenu(hls_audio_menu[0]);
2935
+ }
2936
+ });
2937
+
2938
+ jQuery('a',hls_audio_menu).click( function(e) {
2939
+ var adata = e.target.getAttribute("data-audio");
2940
+ var gid = hlsjs.audioTracks[hlsjs.audioTrack].groupId;
2941
+
2942
+ // confine choice to current group
2943
+ var atrack = hlsjs.audioTracks.filter(function (at) {
2944
+ return at.groupId === gid && (at.name === adata || at.lang === adata);
2945
+ })[0];
2946
+ hlsjs.audioTrack = atrack.id; // change track
2947
+ selectAudioTrack(atrack); // gui
2948
+ });
2949
+
2950
+ var currentAudioTrack = hlsjs.audioTracks[hlsjs.audioTrack];
2951
+ selectAudioTrack(currentAudioTrack);
2952
+ });
2953
+
2954
+ });
includes/fp-api-private.php CHANGED
@@ -23,7 +23,7 @@
23
 
24
  In the plugin constructor:
25
  $this->readme_URL = 'http://plugins.trac.wordpress.org/browser/{plugin-slug}/trunk/readme.txt?format=txt';
26
- add_action( 'in_plugin_update_message-{plugin-dir}/{plugin-file}.php', array( &$this, 'plugin_update_message' ) );
27
  */
28
 
29
  /**
@@ -302,23 +302,17 @@ class FV_Wordpress_Flowplayer_Plugin_Private
302
 
303
 
304
  function checkLicenseTransient(){
305
- $strTransient = $this->strPluginSlug . '_license';
306
-
307
- $aCheck = get_transient( $strTransient );
308
- if( isset($aCheck->valid) && $aCheck->valid)
309
- return TRUE;
310
- else
311
- return FALSE;
312
  }
313
 
314
  function getUpgradeUrl(){
315
- $strTransient = $this->strPluginSlug . '_license';
316
-
317
- $aCheck = get_transient( $strTransient );
318
- if( isset($aCheck->upgrade) && !empty($aCheck->upgrade) )
319
- return $aCheck->upgrade;
320
- else
321
- return FALSE;
322
  }
323
 
324
 
@@ -480,22 +474,13 @@ $this->strPrivateAPI - also
480
  return;
481
  }
482
 
483
- /*$options = get_option( 'wpseo' );
484
- if ( ! isset( $options['yoast_tracking'] ) || ( ! isset( $options['ignore_tour'] ) || ! $options['ignore_tour'] ) ) {*/
485
- wp_enqueue_style( 'wp-pointer' );
486
- wp_enqueue_script( 'jquery-ui' );
487
- wp_enqueue_script( 'wp-pointer' );
488
- wp_enqueue_script( 'utils' );
489
- /*}
490
- if ( ! isset( $options['tracking_popup'] ) && ! isset( $_GET['allow_tracking'] ) ) {*/
491
-
492
- /*}
493
- else if ( ! isset( $options['ignore_tour'] ) || ! $options['ignore_tour'] ) {
494
- add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
495
- add_action( 'admin_head', array( $this, 'admin_head' ) );
496
- } */
497
  add_action( 'admin_print_footer_scripts', array( $this, 'pointers_init_scripts' ) );
498
- }
499
 
500
 
501
  private function get_readme_url_remote( $url = false ) { // todo: caching
@@ -646,54 +631,54 @@ $this->strPrivateAPI - also
646
  </script>
647
  <?php
648
 
649
- foreach( $this->pointer_boxes AS $sKey => $aPopup ) {
650
- $sNonce = wp_create_nonce( $sKey );
651
-
652
- $content = '<h3>'.$aPopup['heading'].'</h3>';
653
- if( stripos( $aPopup['content'], '</p>' ) !== false ) {
654
- $content .= $aPopup['content'];
 
 
 
 
 
 
 
 
 
 
 
 
 
655
  } else {
656
- $content .= '<p>'.$aPopup['content'].'</p>';
657
  }
658
 
659
- $position = ( isset($aPopup['position']) ) ? $aPopup['position'] : array( 'edge' => 'top', 'align' => 'center' );
660
-
661
- $opt_arr = array( 'pointerClass' => $sKey, 'content' => $content, 'position' => $position );
662
-
663
- $function2 = $this->class_name.'_store_answer("'.$sKey.'", "false","' . $sNonce . '")';
664
- $function1 = $this->class_name.'_store_answer("'.$sKey.'", "true","' . $sNonce . '")';
665
-
666
- $this->pointers_print_scripts( $sKey, $aPopup['id'], $opt_arr, $aPopup['button2'], $aPopup['button1'], $function2, $function1 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
667
  }
668
  }
669
 
670
-
671
-
672
- function pointers_print_scripts( $id, $selector, $options, $button1, $button2 = false, $button2_function = '', $button1_function = '' ) {
673
- ?>
674
- <script type="text/javascript">
675
- //<![CDATA[
676
- (function ($) {
677
- var pointer_options = <?php echo json_encode( $options ); ?>,
678
- setup = function () {
679
- $('<?php echo $selector; ?>').pointer(pointer_options).pointer('open');
680
- var buttons = $('.<?php echo $id; ?> .wp-pointer-buttons').html('');
681
- buttons.append( $('<a style="margin-left:5px" class="button-secondary">' + '<?php echo addslashes($button1); ?>' + '</a>').bind('click.pointer', function () { <?php echo $button2_function; ?>; t.element.pointer('close'); }) );
682
- <?php if ( $button2 ) { ?>
683
- buttons.append( $('<a class="button-primary">' + '<?php echo addslashes($button2); ?>' + '</a>').bind('click.pointer', function () { <?php echo $button1_function; ?> }) );
684
- <?php } ?>
685
- };
686
-
687
- if(pointer_options.position && pointer_options.position.defer_loading)
688
- $(window).bind('load.wp-pointers', setup);
689
- else
690
- $(document).ready(setup);
691
- })(jQuery);
692
- //]]>
693
- </script>
694
- <?php
695
- }
696
-
697
 
698
  function check_domain_license() {
699
  if( $_POST['slug'] != $this->strPluginSlug ) {
@@ -817,7 +802,7 @@ $this->strPrivateAPI - also
817
  echo self::install_form_text($form, $name);
818
  include( ABSPATH . 'wp-admin/admin-footer.php' );
819
  die;
820
- }
821
 
822
  if ( ! WP_Filesystem( $creds ) ) {
823
  ob_start();
23
 
24
  In the plugin constructor:
25
  $this->readme_URL = 'http://plugins.trac.wordpress.org/browser/{plugin-slug}/trunk/readme.txt?format=txt';
26
+ add_action( 'in_plugin_update_message-{plugin-dir}/{plugin-file}.php', array( &$this, 'plugin_update_message' ) );
27
  */
28
 
29
  /**
302
 
303
 
304
  function checkLicenseTransient(){
305
+ $aCheck = get_transient( $this->strPluginSlug . '_license' );
306
+ return isset($aCheck->valid) && $aCheck->valid;
 
 
 
 
 
307
  }
308
 
309
  function getUpgradeUrl(){
310
+ $aCheck = get_transient( $this->strPluginSlug . '_license' );
311
+ if( isset($aCheck->upgrade) && !empty($aCheck->upgrade) ) {
312
+ return $aCheck->upgrade;
313
+ } else {
314
+ return false;
315
+ }
 
316
  }
317
 
318
 
474
  return;
475
  }
476
 
477
+ wp_enqueue_style( 'wp-pointer' );
478
+ wp_enqueue_script( 'jquery-ui' );
479
+ wp_enqueue_script( 'wp-pointer' );
480
+ wp_enqueue_script( 'utils' );
481
+
 
 
 
 
 
 
 
 
 
482
  add_action( 'admin_print_footer_scripts', array( $this, 'pointers_init_scripts' ) );
483
+ }
484
 
485
 
486
  private function get_readme_url_remote( $url = false ) { // todo: caching
631
  </script>
632
  <?php
633
 
634
+ foreach( $this->pointer_boxes AS $key => $args ) {
635
+ $nonce = wp_create_nonce( $key );
636
+
637
+ $args = wp_parse_args( $args, array(
638
+ 'button1' => false, // req
639
+ 'button2' => false,
640
+ 'function1' => $this->class_name.'_store_answer("'.$key.'", "true","' . $nonce . '")',
641
+ 'function2' => $this->class_name.'_store_answer("'.$key.'", "false","' . $nonce . '")',
642
+ 'heading' => false, // req
643
+ 'id' => false, // req
644
+ 'content' => false, // req
645
+ 'position' => array( 'edge' => 'top', 'align' => 'center' ),
646
+ ) );
647
+
648
+ extract($args);
649
+
650
+ $html = '<h3>'.$heading.'</h3>';
651
+ if( stripos( $content, '</p>' ) !== false ) {
652
+ $html .= $content;
653
  } else {
654
+ $html .= '<p>'.$content.'</p>';
655
  }
656
 
657
+ ?>
658
+ <script type="text/javascript">
659
+ //<![CDATA[
660
+ (function ($) {
661
+ var pointer_options = <?php echo json_encode( array( 'pointerClass' => $key, 'content' => $html, 'position' => $position ) ); ?>,
662
+ setup = function () {
663
+ $('<?php echo $id; ?>').pointer(pointer_options).pointer('open');
664
+ var buttons = $('.<?php echo $key; ?> .wp-pointer-buttons').html('');
665
+ buttons.append( $('<a style="margin-left:5px" class="button-primary">' + '<?php echo addslashes($button1); ?>' + '</a>').bind('click.pointer', function () { <?php echo $function1; ?>; t.element.pointer('close'); }) );
666
+ <?php if ( $button2 ) { ?>
667
+ buttons.append( $('<a class="button-secondary">' + '<?php echo addslashes($button2); ?>' + '</a>').bind('click.pointer', function () { <?php echo $function2; ?> }) );
668
+ <?php } ?>
669
+ };
670
+
671
+ if(pointer_options.position && pointer_options.position.defer_loading)
672
+ $(window).bind('load.wp-pointers', setup);
673
+ else
674
+ $(document).ready(setup);
675
+ })(jQuery);
676
+ //]]>
677
+ </script>
678
+ <?php
679
  }
680
  }
681
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
682
 
683
  function check_domain_license() {
684
  if( $_POST['slug'] != $this->strPluginSlug ) {
802
  echo self::install_form_text($form, $name);
803
  include( ABSPATH . 'wp-admin/admin-footer.php' );
804
  die;
805
+ }
806
 
807
  if ( ! WP_Filesystem( $creds ) ) {
808
  ob_start();
js/fancybox.js CHANGED
@@ -193,7 +193,7 @@ function fv_player_lightbox_bind(){
193
  , PLAY_SHARP_OUTLINE = "PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=";
194
 
195
  if( flowplayer.version.match(/^7/) && flowplayer.support.svg ) {
196
- jQuery(this).find('.fp-play').append( atob(PLAY_ROUNDED_OUTLINE) + atob(PLAY_ROUNDED_FILL) + atob(PLAY_SHARP_FILL) + atob(PLAY_SHARP_OUTLINE) )
197
  jQuery(this).removeClass('no-svg');
198
  }
199
  } );
193
  , PLAY_SHARP_OUTLINE = "PHN2ZyBjbGFzcz0iZnAtcGxheS1zaGFycC1vdXRsaW5lIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA5OS44NDQgOTkuODQzNCI+PGRlZnM+PHN0eWxlPi5jb250cm9sYnV0dG9uYmd7b3BhY2l0eTowLjY1O30uY29udHJvbGJ1dHRvbntmaWxsOiNmZmY7fTwvc3R5bGU+CjwvZGVmcz48dGl0bGU+cGxheS1zaGFycC1vdXRsaW5lPC90aXRsZT48cGF0aCBjbGFzcz0iZnAtY29sb3ItcGxheSIgZD0iTTQ5LjkyMTctLjA3OGE1MCw1MCwwLDEsMCw1MCw1MEE1MC4wNTY0LDUwLjA1NjQsMCwwLDAsNDkuOTIxNy0uMDc4WiIvPjxwYXRoIGNsYXNzPSJjb250cm9sYnV0dG9uIiBkPSJNMzYuOTQ0Myw3Mi4yNDczVjI3LjI5MTZMNzUuODc3Niw0OS43N1ptMi4yLTQxLjE0NTVWNjguNDM3MUw3MS40Nzc2LDQ5Ljc3WiIgZmlsdGVyPSJ1cmwoI2YxKSIvPjwvc3ZnPgo=";
194
 
195
  if( flowplayer.version.match(/^7/) && flowplayer.support.svg ) {
196
+ jQuery(this).find('.fp-preload').replaceWith( '<div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a>' + atob(PLAY_ROUNDED_OUTLINE) + atob(PLAY_ROUNDED_FILL) + atob(PLAY_SHARP_FILL) + atob(PLAY_SHARP_OUTLINE) + '</div>' )
197
  jQuery(this).removeClass('no-svg');
198
  }
199
  } );
js/s3-browser.js CHANGED
@@ -328,14 +328,23 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
328
  scannedFiles.forEach(function(f) {
329
 
330
  var fileSize = typeof(f.size) == "number" ? bytesToSize(f.size) : f.size, // just show the size for placeholders
331
- name = escapeHTML(f.name),
332
- fileType = name.split('.'),
333
- icon = '<span class="icon file"></span>',
334
- fileType = fileType[fileType.length-1],
335
- icon = '<span class="icon file f-'+fileType+'">.'+fileType+'</span>',
336
- link = f.link ? 'href="'+ f.link+'"' : '',
337
- $href = jQuery('<a '+link+' title="'+ name +'" class="files">'+icon+'<span class="name">'+ name +'</span> <span class="details">'+fileSize+'</span></a>'),
338
  file = jQuery('<li class="files"></li>');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
339
 
340
  if( f.link ) {
341
  $href.on('click', fileUrlIntoShortcodeEditor);
328
  scannedFiles.forEach(function(f) {
329
 
330
  var fileSize = typeof(f.size) == "number" ? bytesToSize(f.size) : f.size, // just show the size for placeholders
331
+ name = escapeHTML(f.name),
332
+ link = f.link ? 'href="'+ f.link+'"' : '',
 
 
 
 
 
333
  file = jQuery('<li class="files"></li>');
334
+
335
+ if( f.splash ) {
336
+ icon = '<img src="'+f.splash+'" />';
337
+ } else {
338
+ var fileType = name.split('.');
339
+ if( fileType.length > 1 ) {
340
+ fileType = fileType[fileType.length-1];
341
+ icon = '<span class="icon file f-'+fileType+'">.'+fileType+'</span>';
342
+ } else {
343
+ icon = '<span class="icon file"></span>';
344
+ }
345
+ }
346
+
347
+ var $href = jQuery('<a '+link+' title="'+ name +'" class="files">'+icon+'<span class="name">'+ name +'</span> <span class="details">'+fileSize+'</span></a>');
348
 
349
  if( f.link ) {
350
  $href.on('click', fileUrlIntoShortcodeEditor);
js/shortcode-editor.js CHANGED
@@ -1049,7 +1049,7 @@ function fv_wp_flowplayer_edit() {
1049
  // create empty shortcode for Add New button on the list page
1050
  fv_wp_flowplayer_content = '';
1051
  shortcode = '';
1052
- } else if( fv_wp_flowplayer_hTinyMCE == undefined || tinyMCE.activeEditor.isHidden() ) {
1053
  fv_wp_flowplayer_content = fv_wp_flowplayer_oEditor.GetHTML();
1054
  if (fv_wp_flowplayer_content.match( fv_wp_flowplayer_re_insert ) == null) {
1055
  fv_wp_flowplayer_oEditor.InsertHtml('<'+fvwpflowplayer_helper_tag+' rel="FCKFVWPFlowplayerPlaceholder">&shy;</'+fvwpflowplayer_helper_tag+'>');
@@ -1796,7 +1796,7 @@ function fv_wp_flowplayer_set_html( html ) {
1796
  jQuery('#widget-widget_fvplayer-'+FVFP_sWidgetId+'-text').trigger('fv_flowplayer_shortcode_insert', [ html ] );
1797
  }else if( typeof(FCKeditorAPI) == 'undefined' && jQuery('#content:not([aria-hidden=true])').length ){
1798
  jQuery('#content:not([aria-hidden=true])').val(html);
1799
- }else if( fv_wp_flowplayer_hTinyMCE == undefined || tinyMCE.activeEditor.isHidden() ) {
1800
  fv_wp_flowplayer_oEditor.SetHTML( html );
1801
  }
1802
  else {
@@ -2447,8 +2447,7 @@ function fv_wp_flowplayer_submit( preview, insert_as_new ) {
2447
  jQuery.post(ajaxurl, {
2448
  action: 'fv_player_db_save',
2449
  data: JSON.stringify(ajax_data),
2450
- nonce: fv_player_editor_conf.preview_nonce,
2451
- cookie: encodeURIComponent(document.cookie),
2452
  }, function(playerID) {
2453
  if (playerID == parseInt(playerID)) {
2454
  // we have extra parameters to keep
@@ -3110,23 +3109,25 @@ function fv_flowplayer_insertUpdateOrDeleteVideoMeta(options) {
3110
  }
3111
  };
3112
 
3113
- // extending DB player edit lock's timer
3114
- jQuery( document ).on( 'heartbeat-send', function ( event, data ) {
3115
- if (fv_flowplayer_conf.current_player_db_id) {
3116
- data.fv_flowplayer_edit_lock_id = fv_flowplayer_conf.current_player_db_id;
3117
- }
 
 
 
 
 
 
3118
 
3119
- if (fv_flowplayer_conf.fv_flowplayer_edit_lock_removal) {
3120
- data.fv_flowplayer_edit_lock_removal = fv_flowplayer_conf.fv_flowplayer_edit_lock_removal;
3121
- }
3122
- });
3123
-
3124
- // remove edit locks in the config if it was removed on the server
3125
- jQuery( document ).on( 'heartbeat-tick', function ( event, data ) {
3126
- if ( data.fv_flowplayer_edit_locks_removed ) {
3127
- fv_flowplayer_conf.fv_flowplayer_edit_lock_removal = {};
3128
- }
3129
- });
3130
 
3131
 
3132
 
@@ -3540,10 +3541,11 @@ function fv_player_editor_show_stream_fields(e,index) {
3540
  // on fv_flowplayer_shortcode_new
3541
  if( item.length == 0 ) item = jQuery('.fv-player-playlist-item[data-index=0]');
3542
 
3543
- var rtmp = item.find('[name=fv_wp_flowplayer_field_rtmp_path]').val();
3544
- var show = rtmp || src.match(/\.m3u8/) || src.match(/rtmp:/) || src.match(/\.mpd/);
 
3545
 
3546
- item.find('[name=fv_wp_flowplayer_field_live]').closest('tr').toggle(!!show);
3547
- item.find('[name=fv_wp_flowplayer_field_audio]').closest('tr').toggle(!!show);
3548
 
3549
  }
1049
  // create empty shortcode for Add New button on the list page
1050
  fv_wp_flowplayer_content = '';
1051
  shortcode = '';
1052
+ } else if( fv_wp_flowplayer_hTinyMCE == undefined || typeof tinyMCE !== 'undefined' && tinyMCE.activeEditor.isHidden() ) {
1053
  fv_wp_flowplayer_content = fv_wp_flowplayer_oEditor.GetHTML();
1054
  if (fv_wp_flowplayer_content.match( fv_wp_flowplayer_re_insert ) == null) {
1055
  fv_wp_flowplayer_oEditor.InsertHtml('<'+fvwpflowplayer_helper_tag+' rel="FCKFVWPFlowplayerPlaceholder">&shy;</'+fvwpflowplayer_helper_tag+'>');
1796
  jQuery('#widget-widget_fvplayer-'+FVFP_sWidgetId+'-text').trigger('fv_flowplayer_shortcode_insert', [ html ] );
1797
  }else if( typeof(FCKeditorAPI) == 'undefined' && jQuery('#content:not([aria-hidden=true])').length ){
1798
  jQuery('#content:not([aria-hidden=true])').val(html);
1799
+ }else if( fv_wp_flowplayer_hTinyMCE == undefined || typeof tinyMCE !== 'undefined' && tinyMCE.activeEditor.isHidden() ) {
1800
  fv_wp_flowplayer_oEditor.SetHTML( html );
1801
  }
1802
  else {
2447
  jQuery.post(ajaxurl, {
2448
  action: 'fv_player_db_save',
2449
  data: JSON.stringify(ajax_data),
2450
+ nonce: fv_player_editor_conf.preview_nonce
 
2451
  }, function(playerID) {
2452
  if (playerID == parseInt(playerID)) {
2453
  // we have extra parameters to keep
3109
  }
3110
  };
3111
 
3112
+ if( typeof(fv_flowplayer_conf) != "undefined" ) {
3113
+ // extending DB player edit lock's timer
3114
+ jQuery( document ).on( 'heartbeat-send', function ( event, data ) {
3115
+ if (fv_flowplayer_conf.current_player_db_id) {
3116
+ data.fv_flowplayer_edit_lock_id = fv_flowplayer_conf.current_player_db_id;
3117
+ }
3118
+
3119
+ if (fv_flowplayer_conf.fv_flowplayer_edit_lock_removal) {
3120
+ data.fv_flowplayer_edit_lock_removal = fv_flowplayer_conf.fv_flowplayer_edit_lock_removal;
3121
+ }
3122
+ });
3123
 
3124
+ // remove edit locks in the config if it was removed on the server
3125
+ jQuery( document ).on( 'heartbeat-tick', function ( event, data ) {
3126
+ if ( data.fv_flowplayer_edit_locks_removed ) {
3127
+ fv_flowplayer_conf.fv_flowplayer_edit_lock_removal = {};
3128
+ }
3129
+ });
3130
+ }
 
 
 
 
3131
 
3132
 
3133
 
3541
  // on fv_flowplayer_shortcode_new
3542
  if( item.length == 0 ) item = jQuery('.fv-player-playlist-item[data-index=0]');
3543
 
3544
+ var rtmp = item.find('[name=fv_wp_flowplayer_field_rtmp_path]').val(),
3545
+ show_live = rtmp || src.match(/\.m3u8/) || src.match(/rtmp:/) || src.match(/\.mpd/) || src.match(/vimeo\.com\//),
3546
+ show_audio = src.match(/\.m3u8/);
3547
 
3548
+ item.find('[name=fv_wp_flowplayer_field_live]').closest('tr').toggle(!!show_live);
3549
+ item.find('[name=fv_wp_flowplayer_field_audio]').closest('tr').toggle(!!show_audio);
3550
 
3551
  }
models/checker.php CHANGED
@@ -260,50 +260,52 @@ class FV_Player_Checker {
260
 
261
 
262
  function checker_cron() {
263
-
264
- // get all video IDs for which there is no duration meta_key
265
- global $wpdb, $fv_fp;
266
- $aVideos = $wpdb->get_results( "SELECT id, src FROM `{$wpdb->prefix}fv_player_videos` as v left join ( select id_video from {$wpdb->prefix}fv_player_videometa WHERE meta_key = 'duration' ) as m ON v.id = m.id_video where m.id_video IS NULL ORDER BY id DESC" );
267
-
268
- if( $aVideos ) {
269
- foreach( $aVideos AS $objVideo ) {
270
- $id = $objVideo->id;
271
- $url = $objVideo->src;
272
-
273
- global $FV_Player_Db;
274
- $objVideo = new FV_Player_Db_Video( $id, array(), $FV_Player_Db );
275
- $last_check = $objVideo->getMetaValue('last_video_meta_check',true);
276
-
277
- if( $last_check && intval($last_check) + 3600 > time() ) {
278
- continue;
279
- }
280
-
281
- $meta_data = apply_filters('fv_player_meta_data', $url, false);
282
- if( $meta_data == false) {
283
- if( $secured_url = $fv_fp->get_video_src( $url, array( 'dynamic' => true ) ) ) {
284
- $url = $secured_url;
285
  }
286
 
287
- $meta_data['duration'] = $this->check_mimetype(array($url), false, true);
288
- $meta_data['duration'] = $meta_data['duration']['duration'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
 
290
- }
291
-
292
- if( !empty($meta_data['thumbnail']) ) {
293
- if( !$objVideo->getSplash() || $objVideo->getMetaValue('auto_splash',true) ) {
294
- $video_object = new FV_Player_Db_Video( $objVideo->getId(), array(), $FV_Player_Db );
295
- $video_object->link2db( $objVideo->getId() );
296
- $video_object->set( 'splash', $meta_data['thumbnail'] );
297
- $video_object->save();
298
  }
 
299
  }
300
-
301
- $objVideo->updateMetaValue('last_video_meta_check', time());
302
-
303
- if( $meta_data['duration'] ) {
304
- $objVideo->updateMetaValue( 'duration', $meta_data['duration'] );
305
- }
306
-
307
  }
308
  }
309
 
260
 
261
 
262
  function checker_cron() {
263
+ global $fv_fp;
264
+ if( $fv_fp->_get_option('video_model_db_checked') && $fv_fp->_get_option('video_meta_model_db_checked') ) {
265
+ // get all video IDs for which there is no duration meta_key
266
+ global $wpdb;
267
+ $aVideos = $wpdb->get_results( "SELECT id, src FROM `{$wpdb->prefix}fv_player_videos` as v left join ( select id_video from {$wpdb->prefix}fv_player_videometa WHERE meta_key = 'duration' ) as m ON v.id = m.id_video where m.id_video IS NULL ORDER BY id DESC" );
268
+
269
+ if( $aVideos ) {
270
+ foreach( $aVideos AS $objVideo ) {
271
+ $id = $objVideo->id;
272
+ $url = $objVideo->src;
273
+
274
+ global $FV_Player_Db;
275
+ $objVideo = new FV_Player_Db_Video( $id, array(), $FV_Player_Db );
276
+ $last_check = $objVideo->getMetaValue('last_video_meta_check',true);
277
+
278
+ if( $last_check && intval($last_check) + 86400 > time() ) {
279
+ continue;
 
 
 
 
 
280
  }
281
 
282
+ $meta_data = apply_filters('fv_player_meta_data', $url, false);
283
+ if( $meta_data == false) {
284
+ if( $secured_url = $fv_fp->get_video_src( $url, array( 'dynamic' => true ) ) ) {
285
+ $url = $secured_url;
286
+ }
287
+
288
+ $meta_data['duration'] = $this->check_mimetype(array($url), false, true);
289
+ $meta_data['duration'] = $meta_data['duration']['duration'];
290
+
291
+ }
292
+
293
+ if( !empty($meta_data['thumbnail']) ) {
294
+ if( !$objVideo->getSplash() || $objVideo->getMetaValue('auto_splash',true) ) {
295
+ $video_object = new FV_Player_Db_Video( $objVideo->getId(), array(), $FV_Player_Db );
296
+ $video_object->link2db( $objVideo->getId() );
297
+ $video_object->set( 'splash', $meta_data['thumbnail'] );
298
+ $video_object->save();
299
+ }
300
+ }
301
 
302
+ $objVideo->updateMetaValue('last_video_meta_check', time());
303
+
304
+ if( $meta_data['duration'] ) {
305
+ $objVideo->updateMetaValue( 'duration', $meta_data['duration'] );
 
 
 
 
306
  }
307
+
308
  }
 
 
 
 
 
 
 
309
  }
310
  }
311
 
models/custom-videos.php CHANGED
@@ -79,7 +79,16 @@ class FV_Player_Custom_Videos {
79
 
80
  public function get_html_part( $video, $edit = false ) {
81
  global $FV_Player_Custom_Videos_Master, $post;
82
- $args = !empty($FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type]) ? $FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type][$this->meta] : array( 'multiple' => true );
 
 
 
 
 
 
 
 
 
83
 
84
  // exp: what matters here is .fv-player-editor-field and .fv-player-editor-button wrapped in .fv-player-editor-wrapper and .fv-player-editor-preview
85
  if( $edit ) {
79
 
80
  public function get_html_part( $video, $edit = false ) {
81
  global $FV_Player_Custom_Videos_Master, $post;
82
+ $args = array(
83
+ 'multiple' => true,
84
+ 'labels' => array(
85
+ 'edit' => 'Edit Video',
86
+ 'remove' => 'Remove Video'
87
+ ) );
88
+
89
+ if( !empty($post) && !empty($post->post_type) && !empty($FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type]) ) {
90
+ $args = $FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type][$this->meta];
91
+ }
92
 
93
  // exp: what matters here is .fv-player-editor-field and .fv-player-editor-button wrapped in .fv-player-editor-wrapper and .fv-player-editor-preview
94
  if( $edit ) {
models/db-player.php CHANGED
@@ -194,6 +194,13 @@ class FV_Player_Db_Player {
194
  public function getCopyText() {
195
  return $this->copy_text;
196
  }
 
 
 
 
 
 
 
197
 
198
  /**
199
  * @return string
@@ -436,12 +443,14 @@ CREATE TABLE " . self::$db_table_name . " (
436
  foreach ($options as $key => $value) {
437
  if (property_exists($this, $key)) {
438
  $this->$key = stripslashes($value);
439
- } else {
440
- // ignore old database structure records
441
- if (!in_array($key, array('drm_text', 'email_list', 'live', 'popup_id'))) {
442
- // generate warning
443
- trigger_error('Unknown property for new DB player: ' . $key);
444
- }
 
 
445
  }
446
  }
447
 
@@ -541,12 +550,12 @@ CREATE TABLE " . self::$db_table_name . " (
541
  if ($id === null || count($query_ids)) {
542
 
543
  // load multiple players via their IDs but a single query and return their values
544
- $select = '*';
545
- if( !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ) $select = 'id,'.esc_sql($options['db_options']['select_fields']);
546
 
547
  $where = '';
548
  if( $id !== null ) {
549
- $where = ' WHERE id IN('. implode(',', $query_ids).') ';
550
 
551
  // if we have multiple video IDs to load players for, let's prepare a like statement here
552
  } else if( !empty($options['db_options']) && !empty($options['db_options']['search_by_video_ids'])){
@@ -570,7 +579,19 @@ CREATE TABLE " . self::$db_table_name . " (
570
  $limit = ' LIMIT '.intval($options['db_options']['offset']).', '.intval($options['db_options']['per_page']);
571
  }
572
 
573
- $player_data = $wpdb->get_results('SELECT '.$select.' FROM '.self::$db_table_name.$where.$order.$limit );
 
 
 
 
 
 
 
 
 
 
 
 
574
 
575
  } else if ($id !== null && !count($query_ids)) {
576
  $all_cached = true;
194
  public function getCopyText() {
195
  return $this->copy_text;
196
  }
197
+
198
+ public function getCount($video_meta) {
199
+ if( $video_meta == 'subtitles' && isset($this->subtitles_count) ) return $this->subtitles_count;
200
+ if( $video_meta == 'chapters' && isset($this->chapters_count) ) return $this->chapters_count;
201
+ if( $video_meta == 'transcript' && isset($this->transcript_count) ) return $this->transcript_count;
202
+ return 0;
203
+ }
204
 
205
  /**
206
  * @return string
443
  foreach ($options as $key => $value) {
444
  if (property_exists($this, $key)) {
445
  $this->$key = stripslashes($value);
446
+
447
+ } else if ( in_array($key, array('subtitles_count', 'chapters_count', 'transcript_count'))) {
448
+ $this->$key = stripslashes($value);
449
+
450
+ } else if (!in_array($key, array('drm_text', 'email_list', 'live', 'popup_id'))) {
451
+ // generate warning
452
+ trigger_error('Unknown property for new DB player: ' . $key);
453
+
454
  }
455
  }
456
 
550
  if ($id === null || count($query_ids)) {
551
 
552
  // load multiple players via their IDs but a single query and return their values
553
+ $select = 'p.*';
554
+ if( !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ) $select = 'p.id,'.esc_sql($options['db_options']['select_fields']);
555
 
556
  $where = '';
557
  if( $id !== null ) {
558
+ $where = ' WHERE p.id IN('. implode(',', $query_ids).') ';
559
 
560
  // if we have multiple video IDs to load players for, let's prepare a like statement here
561
  } else if( !empty($options['db_options']) && !empty($options['db_options']['search_by_video_ids'])){
579
  $limit = ' LIMIT '.intval($options['db_options']['offset']).', '.intval($options['db_options']['per_page']);
580
  }
581
 
582
+ $player_data = $wpdb->get_results('SELECT
583
+ '.$select.',
584
+ count(subtitles.id) as subtitles_count,
585
+ count(chapters.id) as chapters_count,
586
+ count(transcript.id) as transcript_count
587
+ FROM `'.self::$db_table_name.'` AS p
588
+ JOIN `'.$wpdb->prefix.'fv_player_videos` AS v on FIND_IN_SET(v.id, p.videos)
589
+ LEFT JOIN `'.$wpdb->prefix.'fv_player_videometa` AS subtitles ON v.id = subtitles.id_video AND subtitles.meta_key like "subtitles%"
590
+ LEFT JOIN `'.$wpdb->prefix.'fv_player_videometa` AS chapters ON v.id = chapters.id_video AND chapters.meta_key = "chapters"
591
+ LEFT JOIN `'.$wpdb->prefix.'fv_player_videometa` AS transcript ON v.id = transcript.id_video AND transcript.meta_key = "transcript"
592
+ '.$where.'
593
+ GROUP BY p.id
594
+ '.$order.$limit);
595
 
596
  } else if ($id !== null && !count($query_ids)) {
597
  $all_cached = true;
models/db.php CHANGED
@@ -224,7 +224,7 @@ class FV_Player_Db {
224
 
225
  new FV_Player_Db_Player( null, array(
226
  'db_options' => array(
227
- 'select_fields' => 'id, player_name, date_created, videos',
228
  'order_by' => $order_by,
229
  'order' => $order,
230
  'offset' => $offset,
@@ -237,7 +237,7 @@ class FV_Player_Db {
237
  // load all players, which will put them into the cache automatically
238
  new FV_Player_Db_Player( null, array(
239
  'db_options' => array(
240
- 'select_fields' => 'id, player_name, date_created, videos',
241
  'order_by' => $order_by,
242
  'order' => $order,
243
  'offset' => $offset,
@@ -287,6 +287,9 @@ class FV_Player_Db {
287
  $result_row->player_name = $player->getPlayerName();
288
  $result_row->date_created = $player->getDateCreated();
289
  $result_row->thumbs = array();
 
 
 
290
 
291
  // no player name, we'll assemble it from video captions and/or sources
292
  if (!$result_row->player_name) {
224
 
225
  new FV_Player_Db_Player( null, array(
226
  'db_options' => array(
227
+ 'select_fields' => 'player_name, date_created, videos',
228
  'order_by' => $order_by,
229
  'order' => $order,
230
  'offset' => $offset,
237
  // load all players, which will put them into the cache automatically
238
  new FV_Player_Db_Player( null, array(
239
  'db_options' => array(
240
+ 'select_fields' => 'player_name, date_created, videos',
241
  'order_by' => $order_by,
242
  'order' => $order,
243
  'offset' => $offset,
287
  $result_row->player_name = $player->getPlayerName();
288
  $result_row->date_created = $player->getDateCreated();
289
  $result_row->thumbs = array();
290
+ $result_row->subtitles_count = $player->getCount('subtitles');
291
+ $result_row->chapters_count = $player->getCount('chapters');
292
+ $result_row->transcript_count = $player->getCount('transcript');
293
 
294
  // no player name, we'll assemble it from video captions and/or sources
295
  if (!$result_row->player_name) {
models/email-subscription.php CHANGED
@@ -504,6 +504,7 @@ class FV_Player_Email_Subscription {
504
  if(empty($data['email']) || filter_var(trim($data['email']), FILTER_VALIDATE_EMAIL)===false){
505
  $result['status'] = 'ERROR';
506
  $result['text'] = __('Malformed Email Address.', 'fv-wordpress-flowplayer');
 
507
  };
508
 
509
  $count = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'fv_player_emails WHERE email="' . addslashes($data['email']) . '" AND id_list = "'. addslashes($list_id) .'"' );
@@ -511,12 +512,12 @@ class FV_Player_Email_Subscription {
511
 
512
  if(intval($count) === 0){
513
  $wpdb->insert($table_name, array(
514
- 'email' => $data['email'],
515
  'data' => serialize($data),
516
- 'id_list'=>$list_id,
517
- 'date'=>date("Y-m-d H:i:s"),
518
- 'first_name' => isset($data['first_name']) ? $data['first_name'] : '',
519
- 'last_name' => isset($data['last_name']) ? $data['last_name'] : '',
520
  'integration' => $list['integration'],
521
  'integration_nice' => $integration_nice,
522
  'status' => $result['status'],
@@ -531,12 +532,12 @@ class FV_Player_Email_Subscription {
531
 
532
  }else{
533
  $wpdb->insert($table_name, array(
534
- 'email' => $data['email'],
535
  'data' => serialize($data),
536
- 'id_list'=>$list_id,
537
- 'date'=>date("Y-m-d H:i:s"),
538
- 'first_name' => isset($data['first_name']) ? $data['first_name'] : '',
539
- 'last_name' => isset($data['last_name']) ? $data['last_name'] : '',
540
  'integration' => $list['integration'],
541
  'integration_nice' => $integration_nice,
542
  'status' => $result['status'],
504
  if(empty($data['email']) || filter_var(trim($data['email']), FILTER_VALIDATE_EMAIL)===false){
505
  $result['status'] = 'ERROR';
506
  $result['text'] = __('Malformed Email Address.', 'fv-wordpress-flowplayer');
507
+ die(json_encode($result));
508
  };
509
 
510
  $count = $wpdb->get_var('SELECT COUNT(*) FROM ' . $wpdb->prefix . 'fv_player_emails WHERE email="' . addslashes($data['email']) . '" AND id_list = "'. addslashes($list_id) .'"' );
512
 
513
  if(intval($count) === 0){
514
  $wpdb->insert($table_name, array(
515
+ 'email' => strip_tags($data['email']),
516
  'data' => serialize($data),
517
+ 'id_list'=> intval($list_id),
518
+ 'date' => date("Y-m-d H:i:s"),
519
+ 'first_name' => isset($data['first_name']) ? strip_tags($data['first_name']) : '',
520
+ 'last_name' => isset($data['last_name']) ? strip_tags($data['last_name']) : '',
521
  'integration' => $list['integration'],
522
  'integration_nice' => $integration_nice,
523
  'status' => $result['status'],
532
 
533
  }else{
534
  $wpdb->insert($table_name, array(
535
+ 'email' => strip_tags($data['email']),
536
  'data' => serialize($data),
537
+ 'id_list' => intval($list_id),
538
+ 'date' => date("Y-m-d H:i:s"),
539
+ 'first_name' => isset($data['first_name']) ? strip_tags($data['first_name']) : '',
540
+ 'last_name' => isset($data['last_name']) ? strip_tags($data['last_name']) : '',
541
  'integration' => $list['integration'],
542
  'integration_nice' => $integration_nice,
543
  'status' => $result['status'],
models/flowplayer-frontend.php CHANGED
@@ -88,10 +88,16 @@ class flowplayer_frontend extends flowplayer
88
  // force horizontal playlist style for audio as that the only one styled properly
89
  if( $player = $this->current_player() ) {
90
  if( $videos = $player->getVideos() ) {
91
- if( !empty($videos[0]) && $videos[0]->getMetaValue('audio',true) ) {
 
 
 
 
92
  $this->aCurArgs['liststyle'] = 'horizontal';
93
  }
94
  }
 
 
95
  }
96
 
97
  $media = $this->aCurArgs['src'];
@@ -440,25 +446,11 @@ class flowplayer_frontend extends flowplayer
440
  $attributes['class'] .= ' fixed-controls';
441
  }
442
 
443
- // Play button
444
- $bPlayButton = $this->_get_option('ui_play_button');
445
- if( isset($this->aCurArgs['play_button']) ) {
446
- if( strcmp($this->aCurArgs['play_button'],'yes') == 0 ) {
447
- $bPlayButton = true;
448
- } else if( strcmp($this->aCurArgs['play_button'],'no') == 0 ) {
449
- $bPlayButton = false;
450
- }
451
- }
452
 
453
- if( $this->_get_option('ui_no_picture_button') ) {
454
- $attributes['data-button-no-picture'] = true;
455
- }
456
- if( $this->_get_option('ui_repeat_button') ) {
457
- $attributes['data-button-repeat'] = true;
458
- }
459
- if( $this->_get_option('ui_rewind_button') ) {
460
- $attributes['data-button-rewind'] = true;
461
- }
462
 
463
  // Align
464
  $attributes['class'] .= $this->get_align();
@@ -467,16 +459,10 @@ class flowplayer_frontend extends flowplayer
467
  $attributes['data-engine'] = 'flash';
468
  }
469
 
470
- if( $this->_get_option( array( 'integrations', 'embed_iframe' ) ) ) {
471
- if( $this->aCurArgs['embed'] == 'false' || $this->aCurArgs['embed'] == 'off' || ( $this->_get_option('disableembedding') && $this->aCurArgs['embed'] != 'true' ) ) {
472
 
473
- } else {
474
- $attributes['data-fv-embed'] = $this->get_embed_url();
475
- }
476
  } else {
477
- if( $this->aCurArgs['embed'] == 'false' || $this->aCurArgs['embed'] == 'off' || ( $this->_get_option('disableembedding') && $this->aCurArgs['embed'] != 'true' ) ) {
478
- $attributes['data-embed'] = 'false';
479
- }
480
  }
481
 
482
  if( isset($this->aCurArgs['logo']) && $this->aCurArgs['logo'] ) {
@@ -612,7 +598,7 @@ class flowplayer_frontend extends flowplayer
612
 
613
  if( !$bIsAudio && isset($this->fRatio) ) {
614
  $this->ret['html'] .= "\t".'<div class="fp-ratio" style="padding-top: '.str_replace(',','.',$this->fRatio * 100).'%"></div>'."\n";
615
- $this->ret['html'] .= "\t".'<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>'."\n";
616
  }
617
 
618
  $this->ret['html'] .= $this->get_buttons();
@@ -737,26 +723,17 @@ class flowplayer_frontend extends flowplayer
737
  $ad_width = ( $this->_get_option('ad_width') ) ? $this->_get_option('ad_width').'px' : '100%';
738
  $ad_height = ( $this->_get_option('ad_height') ) ? $this->_get_option('ad_height').'px' : '';
739
  }
740
-
741
-
742
- if( $this->_get_option('ad_show_after') ){
743
- $ad_display = 'none';
744
- }else{
745
- $ad_display = 'block' ;
746
- }
747
-
748
-
749
 
750
  $ad = apply_filters( 'fv_flowplayer_ad_html', $ad);
751
  if( strlen(trim($ad)) > 0 ) {
752
  $ad_contents = array(
753
- 'html' => "<div class='wpfp_custom_ad_content' style='width: $ad_width; height: $ad_height; display:$ad_display;'>\n\t\t<div class='fv_fp_close'><a href='#' onclick='jQuery(\"#wpfp_".$this->hash."_ad\").fadeOut(); return false'></a></div>\n\t\t\t".$ad."\n\t\t</div>",
754
  'width' => $ad_width,
755
  'height' => $ad_height
756
  );
757
  }
758
  }
759
- //var_dump($ad_contents);die();
760
  return $ad_contents;
761
  }
762
 
@@ -788,26 +765,55 @@ class flowplayer_frontend extends flowplayer
788
  if( $sHTML ) {
789
  $sHTML = "<div class='fv-player-buttons-wrap'>$sHTML</div>";
790
  }
791
-
792
- //var_dump($sHTML);die();
793
  return $sHTML;
794
  }
795
 
796
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
  function get_embed_url() {
798
  if( empty($this->aPlayers[get_the_ID()]) ) {
799
- $this->aPlayers[get_the_ID()] = 1;
800
- $append = 'fvp';
801
- $append_num = 1;
802
  } else {
803
- $this->aPlayers[get_the_ID()]++;
804
- $append_num = $this->aPlayers[get_the_ID()];
805
- $append = 'fvp'.$append_num;
 
 
 
 
 
 
 
 
806
  }
807
 
808
  $rewrite = get_option('rewrite_rules');
809
  if( empty($rewrite) ) {
810
- return add_query_arg( 'fv_player_embed', $append_num, get_permalink() );
811
  } else {
812
  return user_trailingslashit( trailingslashit( get_permalink() ).$append );
813
  }
88
  // force horizontal playlist style for audio as that the only one styled properly
89
  if( $player = $this->current_player() ) {
90
  if( $videos = $player->getVideos() ) {
91
+ if( !empty($videos[0]) && (
92
+ $videos[0]->getMetaValue('audio',true) ||
93
+ preg_match( '~\.(mp3|wav|ogg)([?#].*?)?$~', $videos[0]->getSrc() )
94
+ )
95
+ ) {
96
  $this->aCurArgs['liststyle'] = 'horizontal';
97
  }
98
  }
99
+ } else if(preg_match( '~\.(mp3|wav|ogg)([?#].*?)?$~', $media ) ) {
100
+ $this->aCurArgs['liststyle'] = 'horizontal';
101
  }
102
 
103
  $media = $this->aCurArgs['src'];
446
  $attributes['class'] .= ' fixed-controls';
447
  }
448
 
449
+ $attributes = $this->get_button_data( $attributes, 'no_picture', $this->aCurArgs );
 
 
 
 
 
 
 
 
450
 
451
+ $attributes = $this->get_button_data( $attributes, 'repeat', $this->aCurArgs );
452
+
453
+ $attributes = $this->get_button_data( $attributes, 'rewind', $this->aCurArgs );
 
 
 
 
 
 
454
 
455
  // Align
456
  $attributes['class'] .= $this->get_align();
459
  $attributes['data-engine'] = 'flash';
460
  }
461
 
462
+ if( $this->aCurArgs['embed'] == 'false' || $this->aCurArgs['embed'] == 'off' || ( $this->_get_option('disableembedding') && $this->aCurArgs['embed'] != 'true' ) ) {
 
463
 
 
 
 
464
  } else {
465
+ $attributes['data-fv-embed'] = $this->get_embed_url();
 
 
466
  }
467
 
468
  if( isset($this->aCurArgs['logo']) && $this->aCurArgs['logo'] ) {
598
 
599
  if( !$bIsAudio && isset($this->fRatio) ) {
600
  $this->ret['html'] .= "\t".'<div class="fp-ratio" style="padding-top: '.str_replace(',','.',$this->fRatio * 100).'%"></div>'."\n";
601
+ $this->ret['html'] .= "\t".'<div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>'."\n";
602
  }
603
 
604
  $this->ret['html'] .= $this->get_buttons();
723
  $ad_width = ( $this->_get_option('ad_width') ) ? $this->_get_option('ad_width').'px' : '100%';
724
  $ad_height = ( $this->_get_option('ad_height') ) ? $this->_get_option('ad_height').'px' : '';
725
  }
 
 
 
 
 
 
 
 
 
726
 
727
  $ad = apply_filters( 'fv_flowplayer_ad_html', $ad);
728
  if( strlen(trim($ad)) > 0 ) {
729
  $ad_contents = array(
730
+ 'html' => "<div class='wpfp_custom_ad_content' style='width: $ad_width; height: $ad_height'>\n\t\t<div class='fv_fp_close'><a href='#'></a></div>\n\t\t\t".$ad."\n\t\t</div>",
731
  'width' => $ad_width,
732
  'height' => $ad_height
733
  );
734
  }
735
  }
736
+
737
  return $ad_contents;
738
  }
739
 
765
  if( $sHTML ) {
766
  $sHTML = "<div class='fv-player-buttons-wrap'>$sHTML</div>";
767
  }
768
+
 
769
  return $sHTML;
770
  }
771
 
772
 
773
+ function get_button_data( $attributes, $type, $args ) {
774
+ $show = $this->_get_option('ui_'.$type.'_button');
775
+ if( isset($args[$type.'_button']) ) {
776
+ if( strcmp($args[$type.'_button'],'yes') == 0 ) {
777
+ $show = true;
778
+ } else if( strcmp($args[$type.'_button'],'no') == 0 ) {
779
+ $show = false;
780
+ }
781
+ }
782
+ if( $show ) {
783
+ $attributes['data-button-'.$type] = true;
784
+
785
+ if( $type == 'rewind' ) {
786
+ add_action( 'wp_footer', 'fv_player_footer_svg_rewind', 101 );
787
+ } else if( $type == 'repeat' || $type == 'no_picture' ) {
788
+ add_action( 'wp_footer', 'fv_player_footer_svg_playlist', 101 );
789
+ }
790
+
791
+ }
792
+
793
+ return $attributes;
794
+ }
795
+
796
+
797
  function get_embed_url() {
798
  if( empty($this->aPlayers[get_the_ID()]) ) {
799
+ $num = $this->aPlayers[get_the_ID()] = 1;
 
 
800
  } else {
801
+ $num = ++$this->aPlayers[get_the_ID()];
802
+ }
803
+
804
+ $append = 'fvp';
805
+ if( $num > 1 ) {
806
+ $append .= $num;
807
+ }
808
+
809
+ if( $player = $this->current_player() ) {
810
+ $append = 'fvp-'.$player->getId();
811
+ $num = $append;
812
  }
813
 
814
  $rewrite = get_option('rewrite_rules');
815
  if( empty($rewrite) ) {
816
+ return add_query_arg( 'fv_player_embed', $num, get_permalink() );
817
  } else {
818
  return user_trailingslashit( trailingslashit( get_permalink() ).$append );
819
  }
models/flowplayer.php CHANGED
@@ -128,8 +128,6 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
128
  add_filter( 'fv_flowplayer_splash', array( $this, 'get_amazon_secure') );
129
  add_filter( 'fv_flowplayer_playlist_splash', array( $this, 'get_amazon_secure') );
130
 
131
- add_filter('fv_flowplayer_css_writeout', array( $this, 'css_writeout_option' ) );
132
-
133
  add_action( 'wp_enqueue_scripts', array( $this, 'css_enqueue' ) );
134
  add_action( 'admin_enqueue_scripts', array( $this, 'css_enqueue' ) );
135
 
@@ -495,8 +493,9 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
495
  $conf['nag_fv_player_7'] = true;
496
  $conf['notice_new_lightbox'] = true;
497
  $conf['notice_db'] = true;
498
- }
499
-
 
500
  if( !isset( $conf['autoplay'] ) ) $conf['autoplay'] = 'false';
501
  if( !isset( $conf['googleanalytics'] ) ) $conf['googleanalytics'] = 'false';
502
  if( !isset( $conf['key'] ) ) $conf['key'] = 'false';
@@ -1203,7 +1202,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1203
 
1204
 
1205
  function css_option() {
1206
- return 'css_writeout-'.sanitize_title(WP_CONTENT_URL);
1207
  }
1208
 
1209
 
@@ -1227,7 +1226,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1227
 
1228
 
1229
  function css_writeout() {
1230
- if( !apply_filters('fv_flowplayer_css_writeout', true ) ) {
1231
  return false;
1232
  }
1233
 
@@ -1429,14 +1428,16 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1429
  global $post, $fv_fp;
1430
  $post_id = ( $post_id ) ? $post_id : $post->ID;
1431
 
1432
- global $wpdb;
1433
- $tDuration = intval( $wpdb->get_var( "SELECT vm.meta_value FROM {$wpdb->prefix}fv_player_playermeta AS pm JOIN {$wpdb->prefix}fv_player_players AS p ON p.id = pm.id_player JOIN {$wpdb->prefix}fv_player_videos AS v ON FIND_IN_SET(v.id, p.videos) > 0 JOIN {$wpdb->prefix}fv_player_videometa AS vm ON v.id = vm.id_video WHERE pm.meta_key = 'post_id' AND pm.meta_value = ".intval($post_id)." AND vm.meta_key = 'duration' ORDER BY CAST(vm.meta_value AS UNSIGNED) DESC LIMIT 1" ) );
1434
- if( $tDuration > 3600 ) {
1435
- return gmdate( "H:i:s", $tDuration );
1436
- } else if( $tDuration > 0 ) {
1437
- return gmdate( "i:s", $tDuration );
 
 
1438
  }
1439
-
1440
  $content = false;
1441
  $objPost = get_post($post_id);
1442
  if( $aVideos = FV_Player_Checker::get_videos($objPost->ID) ) {
@@ -1870,14 +1871,6 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1870
  }
1871
  }
1872
 
1873
-
1874
- function css_writeout_option( $value ) {
1875
- if( $this->_get_option('css_disable') ) {
1876
- return false;
1877
- }
1878
- return $value;
1879
- }
1880
-
1881
 
1882
  function popup_css( $css ){
1883
  $aPopupData = get_option('fv_player_popups');
@@ -1905,7 +1898,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1905
 
1906
  $bFound = false;
1907
  foreach( $aRewriteRules AS $k => $v ) {
1908
- if( stripos($v,'&fv_player_embed=') !== false ) {
1909
  $bFound = true;
1910
  break;
1911
  }
@@ -1925,7 +1918,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1925
  $new_k = str_replace( '/trackback/', '/fvp/', $k );
1926
  $new_v = str_replace( '&tb=1', '&fv_player_embed=1', $v );
1927
  $aRulesNew[$new_k] = $new_v;
1928
- $new_k = str_replace( '/trackback/', '/fvp(\d+)?/', $k );
1929
  $new_v = str_replace( '&tb=1', '&fv_player_embed=$matches['.(substr_count($v,'$matches[')+1).']', $v );
1930
  $aRulesNew[$new_k] = $new_v;
1931
  }
@@ -1955,8 +1948,8 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1955
  }
1956
 
1957
  function template_embed() {
1958
-
1959
- if( get_query_var('fv_player_embed') ) {
1960
  $content = ob_get_contents();
1961
  ob_clean();
1962
 
@@ -1975,7 +1968,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
1975
  <body class="fv-player-preview">
1976
  <?php if( isset($_GET['fv_player_preview']) && !empty($_GET['fv_player_preview']) ) :
1977
 
1978
- if( !is_user_logged_in() || !current_user_can('edit_posts') || !wp_verify_nonce( get_query_var('fv_player_embed'),"fv-player-preview-".get_current_user_id() ) ){
1979
  ?><script>window.parent.jQuery(window.parent.document).trigger('fvp-preview-complete');</script>
1980
  <div style="background:white;">
1981
  <div id="wrapper" style="background:white; overflow:hidden; <?php echo $width . $height; ?>;">
@@ -2058,12 +2051,12 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
2058
  $bFound = false;
2059
  $rewrite = get_option('rewrite_rules');
2060
  if( empty($rewrite) ) {
2061
- $sLink = 'fv_player_embed='.get_query_var('fv_player_embed');
2062
  } else {
2063
- $sPostfix = get_query_var('fv_player_embed') > 1 ? 'fvp'.get_query_var('fv_player_embed') : 'fvp';
2064
  $sLink = user_trailingslashit( trailingslashit( get_permalink() ).$sPostfix );
2065
  }
2066
-
2067
  $aPlayers = explode( '<!--fv player end-->', $content );
2068
  if( $aPlayers ) {
2069
  foreach( $aPlayers AS $k => $v ) {
@@ -2075,6 +2068,11 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
2075
  }
2076
  }
2077
 
 
 
 
 
 
2078
  if( !$bFound ) {
2079
  echo "<p>Player not found, see the full article: <a href='".get_permalink()."' target='_blank'>".get_the_title()."</a>.</p>";
2080
  }
128
  add_filter( 'fv_flowplayer_splash', array( $this, 'get_amazon_secure') );
129
  add_filter( 'fv_flowplayer_playlist_splash', array( $this, 'get_amazon_secure') );
130
 
 
 
131
  add_action( 'wp_enqueue_scripts', array( $this, 'css_enqueue' ) );
132
  add_action( 'admin_enqueue_scripts', array( $this, 'css_enqueue' ) );
133
 
493
  $conf['nag_fv_player_7'] = true;
494
  $conf['notice_new_lightbox'] = true;
495
  $conf['notice_db'] = true;
496
+ $conf['notice_xml_sitemap_iframes'] = true;
497
+ }
498
+
499
  if( !isset( $conf['autoplay'] ) ) $conf['autoplay'] = 'false';
500
  if( !isset( $conf['googleanalytics'] ) ) $conf['googleanalytics'] = 'false';
501
  if( !isset( $conf['key'] ) ) $conf['key'] = 'false';
1202
 
1203
 
1204
  function css_option() {
1205
+ return 'css_writeout-'.sanitize_title(home_url());
1206
  }
1207
 
1208
 
1226
 
1227
 
1228
  function css_writeout() {
1229
+ if( $this->_get_option('css_disable') ) {
1230
  return false;
1231
  }
1232
 
1428
  global $post, $fv_fp;
1429
  $post_id = ( $post_id ) ? $post_id : $post->ID;
1430
 
1431
+ if( $fv_fp->_get_option('player_model_db_checked') && $fv_fp->_get_option('player_meta_model_db_checked') && $fv_fp->_get_option('video_model_db_checked') && $fv_fp->_get_option('video_meta_model_db_checked') ) {
1432
+ global $wpdb;
1433
+ $tDuration = intval( $wpdb->get_var( "SELECT vm.meta_value FROM {$wpdb->prefix}fv_player_playermeta AS pm JOIN {$wpdb->prefix}fv_player_players AS p ON p.id = pm.id_player JOIN {$wpdb->prefix}fv_player_videos AS v ON FIND_IN_SET(v.id, p.videos) > 0 JOIN {$wpdb->prefix}fv_player_videometa AS vm ON v.id = vm.id_video WHERE pm.meta_key = 'post_id' AND pm.meta_value = ".intval($post_id)." AND vm.meta_key = 'duration' ORDER BY CAST(vm.meta_value AS UNSIGNED) DESC LIMIT 1" ) );
1434
+ if( $tDuration > 3600 ) {
1435
+ return gmdate( "H:i:s", $tDuration );
1436
+ } else if( $tDuration > 0 ) {
1437
+ return gmdate( "i:s", $tDuration );
1438
+ }
1439
  }
1440
+
1441
  $content = false;
1442
  $objPost = get_post($post_id);
1443
  if( $aVideos = FV_Player_Checker::get_videos($objPost->ID) ) {
1871
  }
1872
  }
1873
 
 
 
 
 
 
 
 
 
1874
 
1875
  function popup_css( $css ){
1876
  $aPopupData = get_option('fv_player_popups');
1898
 
1899
  $bFound = false;
1900
  foreach( $aRewriteRules AS $k => $v ) {
1901
+ if( stripos($k,'/fvp(-?\d+)?/') !== false ) {
1902
  $bFound = true;
1903
  break;
1904
  }
1918
  $new_k = str_replace( '/trackback/', '/fvp/', $k );
1919
  $new_v = str_replace( '&tb=1', '&fv_player_embed=1', $v );
1920
  $aRulesNew[$new_k] = $new_v;
1921
+ $new_k = str_replace( '/trackback/', '/fvp(-?\d+)?/', $k );
1922
  $new_v = str_replace( '&tb=1', '&fv_player_embed=$matches['.(substr_count($v,'$matches[')+1).']', $v );
1923
  $aRulesNew[$new_k] = $new_v;
1924
  }
1948
  }
1949
 
1950
  function template_embed() {
1951
+
1952
+ if( $embed_id = get_query_var('fv_player_embed') ) {
1953
  $content = ob_get_contents();
1954
  ob_clean();
1955
 
1968
  <body class="fv-player-preview">
1969
  <?php if( isset($_GET['fv_player_preview']) && !empty($_GET['fv_player_preview']) ) :
1970
 
1971
+ if( !is_user_logged_in() || !current_user_can('edit_posts') || !wp_verify_nonce( $embed_id,"fv-player-preview-".get_current_user_id() ) ){
1972
  ?><script>window.parent.jQuery(window.parent.document).trigger('fvp-preview-complete');</script>
1973
  <div style="background:white;">
1974
  <div id="wrapper" style="background:white; overflow:hidden; <?php echo $width . $height; ?>;">
2051
  $bFound = false;
2052
  $rewrite = get_option('rewrite_rules');
2053
  if( empty($rewrite) ) {
2054
+ $sLink = 'fv_player_embed='.$embed_id;
2055
  } else {
2056
+ $sPostfix = $embed_id == 1 ? 'fvp' : 'fvp'.$embed_id;
2057
  $sLink = user_trailingslashit( trailingslashit( get_permalink() ).$sPostfix );
2058
  }
2059
+
2060
  $aPlayers = explode( '<!--fv player end-->', $content );
2061
  if( $aPlayers ) {
2062
  foreach( $aPlayers AS $k => $v ) {
2068
  }
2069
  }
2070
 
2071
+ if( !$bFound && is_numeric($embed_id) && !empty($aPlayers[$embed_id-1]) ) {
2072
+ echo substr($aPlayers[$embed_id-1], stripos($aPlayers[$embed_id-1],'<div id="wpfp_') );
2073
+ $bFound = true;
2074
+ }
2075
+
2076
  if( !$bFound ) {
2077
  echo "<p>Player not found, see the full article: <a href='".get_permalink()."' target='_blank'>".get_the_title()."</a>.</p>";
2078
  }
models/lightbox.php CHANGED
@@ -209,7 +209,7 @@ class FV_Player_lightbox {
209
 
210
  $html = "<div".$this->fancybox_opts($sSplash)." id='fv_flowplayer_" . $aArgs[1]->hash . "_lightbox_starter' $sTitle href='#wpfp_" . $aArgs[1]->hash . "' class='flowplayer lightbox-starter is-splash$sClass' $sStyle>";
211
 
212
- $html .= '<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>';
213
 
214
  if ($iWidth > 0) {
215
  $html .= '<div class="fp-ratio" style="padding-top: '.str_replace(',','.',round($iHeight / $iWidth, 4) * 100).'%"></div>';
209
 
210
  $html = "<div".$this->fancybox_opts($sSplash)." id='fv_flowplayer_" . $aArgs[1]->hash . "_lightbox_starter' $sTitle href='#wpfp_" . $aArgs[1]->hash . "' class='flowplayer lightbox-starter is-splash$sClass' $sStyle>";
211
 
212
+ $html .= '<div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>';
213
 
214
  if ($iWidth > 0) {
215
  $html .= '<div class="fp-ratio" style="padding-top: '.str_replace(',','.',round($iHeight / $iWidth, 4) * 100).'%"></div>';
models/list-table.php CHANGED
@@ -3,10 +3,12 @@
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  if ( ! class_exists( 'WP_List_Table' ) ) {
6
- require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
7
  }
8
 
9
  class FV_Player_List_Table_View {
 
 
10
 
11
  function __construct() {
12
  add_action( 'init', array( $this, 'load_options' ) );
@@ -16,13 +18,59 @@ class FV_Player_List_Table_View {
16
  global $wpdb;
17
  if( current_user_can('edit_posts') ) {
18
  add_menu_page( 'FV Player', 'FV Player', 'edit_posts', 'fv_player', '', flowplayer::get_plugin_url().'/images/icon@x2.png', 30 );
19
- add_submenu_page( 'fv_player', 'FV Player', 'FV Player', 'edit_posts', 'fv_player', array($this, 'tools_panel') );
 
 
 
 
20
  }
21
  }
22
 
23
  function load_options() {
24
  add_action( 'admin_menu', array($this, 'admin_menu') );
25
- add_action( 'admin_head', array($this, 'styling') );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
 
28
  function styling() {
@@ -32,16 +80,27 @@ class FV_Player_List_Table_View {
32
 
33
  wp_enqueue_media();
34
  }
35
- ?>
36
- <style>#adminmenu #toplevel_page_fv_player .wp-menu-image img {width:28px;height:25px;padding-top:4px}</style>
37
- <?php
38
  }
39
 
40
  function tools_panel() {
41
- $table = new FV_Player_List_Table();
42
- $table->prepare_items();
43
- ?>
44
- <div class="wrap">
 
 
 
 
 
 
 
 
 
 
 
45
  <h1 class="wp-heading-inline">FV Player</h1>
46
  <a href="#" class="page-title-action fv-player-edit" data-add_new="1">Add New</a>
47
  <a href="#" class="page-title-action fv-player-import">Import</a>
@@ -58,7 +117,7 @@ class FV_Player_List_Table_View {
58
  </form>
59
  </div>
60
 
61
- </div>
62
  <?php
63
  fv_player_shortcode_editor_scripts_enqueue();
64
  fv_wp_flowplayer_edit_form_after_editor();
@@ -71,36 +130,35 @@ $FV_Player_List_Table_View = new FV_Player_List_Table_View;
71
 
72
  class FV_Player_List_Table extends WP_List_Table {
73
 
74
- public $per_page = 25;
75
 
76
- public $base_url;
77
 
78
  public $counts;
79
-
80
- public $total_impressions = 0;
81
-
82
- public $total_clicks = 0;
83
 
84
  public $total_items = 0;
85
 
86
  private $dropdown_cache = false;
87
 
88
- public function __construct() {
89
-
90
- global $status, $page;
91
-
92
- parent::__construct( array(
93
- 'singular' => 'Log entry',
94
- 'plural' => 'Log entries',
95
- 'ajax' => false,
96
- ) );
97
 
98
- $this->get_result_counts();
99
- $this->process_bulk_action();
100
- $this->base_url = admin_url( 'admin.php?page=fv_player' );
101
- }
102
-
103
- public function advanced_filters() {
104
  if ( ! empty( $_REQUEST['orderby'] ) )
105
  echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
106
  if ( ! empty( $_REQUEST['order'] ) )
@@ -118,33 +176,22 @@ class FV_Player_List_Table extends WP_List_Table {
118
  <?php submit_button( "Search players", 'button', false, false, array('ID' => 'search-submit') ); ?><br/>
119
  </p>
120
  <?php
121
- }
122
-
123
- public function get_columns() {
124
- return array(
125
- //'cb' => '<input type="checkbox" />',
126
- 'id' => __( 'Playlist', 'fv-wordpress-flowplayer' ),
127
- 'player_name' => __( 'Playlist Name', 'fv-wordpress-flowplayer' ),
128
- 'date_created' => __( 'Date', 'fv-wordpress-flowplayer' ),
129
- //'author' => __( 'Author', 'fv-wordpress-flowplayer' ),
130
- 'thumbs' => __( 'Videos', 'fv-wordpress-flowplayer' ),
131
- 'embeds' => __( 'Embedded on', 'fv-wordpress-flowplayer' ),
132
- 'shortcode' => __( 'Shortcode', 'fv-wordpress-flowplayer' ),
133
- 'shortcode-copy' => '',
134
- );
135
- }
136
 
137
- public function get_sortable_columns() {
138
- return array(
139
- 'id' => array( 'ID', true ),
140
- 'player_name' => array( 'player_name', true ),
141
- 'date_created' => array( 'date_created', true )
142
- );
143
- }
 
 
 
144
 
145
- protected function get_primary_column_name() {
146
- return 'id';
147
- }
148
 
149
  function get_user_dropdown( $user_id, $name = false, $disabled = false ) {
150
  if( !$this->dropdown_cache ) {
@@ -163,18 +210,18 @@ class FV_Player_List_Table extends WP_List_Table {
163
 
164
  return $html;
165
  }
166
-
167
- public function column_cb( $player ) {
168
- return sprintf(
169
- '<input type="checkbox" name="%1$s[]" value="%2$s" />',
170
- 'log_id',
171
- $player->id
172
- );
173
- }
174
 
175
- public function column_default( $player, $column_name ) {
 
 
 
 
 
 
 
 
176
  $id = $player->id;
177
- switch ( $column_name ) {
178
  case 'id':
179
  $value = '<span class="fv_player_id_value" data-player_id="'. $id .'">' . $id . '</span>';
180
  break;
@@ -210,65 +257,60 @@ class FV_Player_List_Table extends WP_List_Table {
210
  case 'shortcode-copy':
211
  $value = '<a href="#" class="button fv-player-shortcode-copy">Copy</a>';
212
  break;
213
- default:
214
- $value = isset($player->$column_name) && $player->$column_name ? $player->$column_name : '';
215
- break;
216
 
217
- }
218
-
219
- return $value;
220
- }
221
 
222
- public function get_bulk_actions() { // todo: any bulk action?
223
- return array();
224
- }
225
 
226
- public function process_bulk_action() { // todo: any bulk action?
227
  return;
228
- }
229
 
230
- public function get_result_counts() {
231
  $this->total_items = FV_Player_Db_Player::getTotalPlayersCount();
232
- }
233
 
234
- public function get_data() {
235
- $current = !empty($_GET['paged']) ? intval($_GET['paged']) : 1;
236
- $order = !empty($_GET['order']) ? esc_sql($_GET['order']) : 'desc';
237
- $order_by = !empty($_GET['orderby']) ? esc_sql($_GET['orderby']) : 'id';
238
  $single_id = !empty($_GET['id']) ? esc_sql($_GET['id']) : null;
239
  $search = !empty($_GET['s']) ? esc_sql($_GET['s']) : null;
240
 
241
- $per_page = $this->per_page;
242
- $offset = ( $current - 1 ) * $per_page;
243
  return FV_Player_Db::getListPageData($order_by, $order, $offset, $per_page, $single_id, $search);
244
- }
245
-
246
- public function prepare_items() {
247
 
248
- wp_reset_vars( array( 'action', 'payment', 'orderby', 'order', 's' ) );
249
 
250
- $columns = $this->get_columns();
251
- $hidden = array(); // No hidden columns
252
- $sortable = $this->get_sortable_columns();
253
- $data = $this->get_data();
254
 
255
- // re-count number of players to show when searching
256
- if (isset($_GET['s']) && $_GET['s']) {
257
- $this->get_result_counts();
258
- }
259
 
260
- $status = isset( $_GET['status'] ) ? $_GET['status'] : 'all';
261
 
262
- $this->_column_headers = array( $columns, $hidden, $sortable );
263
-
264
- $this->items = $data;
 
 
 
 
 
 
265
 
266
- $this->set_pagination_args( array(
267
- 'total_items' => $this->total_items,
268
- 'per_page' => $this->per_page,
269
- 'total_pages' => ceil( $this->total_items / $this->per_page ),
270
- )
271
- );
272
- }
273
-
274
  }
3
  if ( ! defined( 'ABSPATH' ) ) exit;
4
 
5
  if ( ! class_exists( 'WP_List_Table' ) ) {
6
+ require_once ABSPATH . 'wp-admin/includes/class-wp-list-table.php';
7
  }
8
 
9
  class FV_Player_List_Table_View {
10
+
11
+ var $list_page = false;
12
 
13
  function __construct() {
14
  add_action( 'init', array( $this, 'load_options' ) );
18
  global $wpdb;
19
  if( current_user_can('edit_posts') ) {
20
  add_menu_page( 'FV Player', 'FV Player', 'edit_posts', 'fv_player', '', flowplayer::get_plugin_url().'/images/icon@x2.png', 30 );
21
+ $this->list_page = add_submenu_page( 'fv_player', 'FV Player', 'FV Player', 'edit_posts', 'fv_player', array($this, 'tools_panel') );
22
+
23
+ add_action( 'load-'.$this->list_page, array( $this, 'screen_options' ) );
24
+ add_filter( 'manage_toplevel_page_fv_player_columns', array( $this, 'screen_columns' ) );
25
+ add_filter( 'hidden_columns', array( $this, 'screen_columns_hidden' ), 10, 3 );
26
  }
27
  }
28
 
29
  function load_options() {
30
  add_action( 'admin_menu', array($this, 'admin_menu') );
31
+ add_action( 'admin_head', array($this, 'styling') );
32
+ add_filter( 'set-screen-option', array($this, 'set_screen_option'), 10, 3);
33
+ }
34
+
35
+ function set_screen_option($status, $option, $value) {
36
+ if( 'fv_player_per_page' == $option ) return $value;
37
+ }
38
+
39
+ function screen_columns() {
40
+ return array(
41
+ //'cb' => '<input type="checkbox" />',
42
+ 'id' => __( 'Playlist', 'fv-wordpress-flowplayer' ),
43
+ 'player_name' => __( 'Playlist Name', 'fv-wordpress-flowplayer' ),
44
+ 'date_created' => __( 'Date', 'fv-wordpress-flowplayer' ),
45
+ //'author' => __( 'Author', 'fv-wordpress-flowplayer' ),
46
+ 'thumbs' => __( 'Videos', 'fv-wordpress-flowplayer' ),
47
+ 'subtitles_count' => __( 'Subtitles', 'fv-wordpress-flowplayer' ),
48
+ 'chapters_count' => __( 'Chapters', 'fv-wordpress-flowplayer' ),
49
+ 'transcript_count' => __( 'Transcript', 'fv-wordpress-flowplayer' ),
50
+ 'embeds' => __( 'Embedded on', 'fv-wordpress-flowplayer' ),
51
+ 'shortcode' => __( 'Shortcode', 'fv-wordpress-flowplayer' ),
52
+ 'shortcode-copy' => '',
53
+ );
54
+ }
55
+
56
+ function screen_columns_hidden( $hidden, $screen, $use_defaults ) {
57
+ if( $use_defaults && $screen->id == $this->list_page) {
58
+ $hidden = array( 'subtitles_count', 'chapters_count', 'transcript_count' );
59
+ }
60
+ return $hidden;
61
+ }
62
+
63
+ function screen_options() {
64
+ $screen = get_current_screen();
65
+ if(!is_object($screen) || $screen->id != $this->list_page)
66
+ return;
67
+
68
+ $args = array(
69
+ 'label' => __('Players per page', 'pippin'),
70
+ 'default' => 25,
71
+ 'option' => 'fv_player_per_page'
72
+ );
73
+ add_screen_option( 'per_page', $args );
74
  }
75
 
76
  function styling() {
80
 
81
  wp_enqueue_media();
82
  }
83
+ ?>
84
+ <style>#adminmenu #toplevel_page_fv_player .wp-menu-image img {width:28px;height:25px;padding-top:4px}</style>
85
+ <?php
86
  }
87
 
88
  function tools_panel() {
89
+
90
+ $user = get_current_user_id();
91
+ $screen = get_current_screen();
92
+ $screen_option = $screen->get_option('per_page', 'option');
93
+ $per_page = get_user_meta($user, $screen_option, true);
94
+ if ( empty ( $per_page) || $per_page < 1 ) {
95
+ $per_page = $screen->get_option( 'per_page', 'default' );
96
+ }
97
+ $table = new FV_Player_List_Table( array(
98
+ 'per_page' => $per_page
99
+ ) );
100
+
101
+ $table->prepare_items();
102
+ ?>
103
+ <div class="wrap">
104
  <h1 class="wp-heading-inline">FV Player</h1>
105
  <a href="#" class="page-title-action fv-player-edit" data-add_new="1">Add New</a>
106
  <a href="#" class="page-title-action fv-player-import">Import</a>
117
  </form>
118
  </div>
119
 
120
+ </div>
121
  <?php
122
  fv_player_shortcode_editor_scripts_enqueue();
123
  fv_wp_flowplayer_edit_form_after_editor();
130
 
131
  class FV_Player_List_Table extends WP_List_Table {
132
 
133
+ public $args;
134
 
135
+ public $base_url;
136
 
137
  public $counts;
138
+
139
+ public $total_impressions = 0;
140
+
141
+ public $total_clicks = 0;
142
 
143
  public $total_items = 0;
144
 
145
  private $dropdown_cache = false;
146
 
147
+ public function __construct( $args ) {
148
+ $this->args = $args;
149
+ //var_dump($args);
150
+ parent::__construct( array(
151
+ 'singular' => 'Log entry',
152
+ 'plural' => 'Log entries',
153
+ 'ajax' => false,
154
+ ) );
 
155
 
156
+ $this->get_result_counts();
157
+ $this->process_bulk_action();
158
+ $this->base_url = admin_url( 'admin.php?page=fv_player' );
159
+ }
160
+
161
+ public function advanced_filters() {
162
  if ( ! empty( $_REQUEST['orderby'] ) )
163
  echo '<input type="hidden" name="orderby" value="' . esc_attr( $_REQUEST['orderby'] ) . '" />';
164
  if ( ! empty( $_REQUEST['order'] ) )
176
  <?php submit_button( "Search players", 'button', false, false, array('ID' => 'search-submit') ); ?><br/>
177
  </p>
178
  <?php
179
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
 
181
+ public function get_sortable_columns() {
182
+ return array(
183
+ 'id' => array( 'ID', true ),
184
+ 'player_name' => array( 'player_name', true ),
185
+ 'date_created' => array( 'date_created', true ),
186
+ 'subtitles_count' => array( 'subtitles_count', true ),
187
+ 'chapters_count' => array( 'chapters_count', true ),
188
+ 'transcript_count' => array( 'transcript_count', true )
189
+ );
190
+ }
191
 
192
+ protected function get_primary_column_name() {
193
+ return 'id';
194
+ }
195
 
196
  function get_user_dropdown( $user_id, $name = false, $disabled = false ) {
197
  if( !$this->dropdown_cache ) {
210
 
211
  return $html;
212
  }
 
 
 
 
 
 
 
 
213
 
214
+ public function column_cb( $player ) {
215
+ return sprintf(
216
+ '<input type="checkbox" name="%1$s[]" value="%2$s" />',
217
+ 'log_id',
218
+ $player->id
219
+ );
220
+ }
221
+
222
+ public function column_default( $player, $column_name ) {
223
  $id = $player->id;
224
+ switch ( $column_name ) {
225
  case 'id':
226
  $value = '<span class="fv_player_id_value" data-player_id="'. $id .'">' . $id . '</span>';
227
  break;
257
  case 'shortcode-copy':
258
  $value = '<a href="#" class="button fv-player-shortcode-copy">Copy</a>';
259
  break;
260
+ default:
261
+ $value = isset($player->$column_name) && $player->$column_name ? $player->$column_name : '';
262
+ break;
263
 
264
+ }
265
+
266
+ return $value;
267
+ }
268
 
269
+ public function get_bulk_actions() { // todo: any bulk action?
270
+ return array();
271
+ }
272
 
273
+ public function process_bulk_action() { // todo: any bulk action?
274
  return;
275
+ }
276
 
277
+ public function get_result_counts() {
278
  $this->total_items = FV_Player_Db_Player::getTotalPlayersCount();
279
+ }
280
 
281
+ public function get_data() {
282
+ $current = !empty($_GET['paged']) ? intval($_GET['paged']) : 1;
283
+ $order = !empty($_GET['order']) ? esc_sql($_GET['order']) : 'desc';
284
+ $order_by = !empty($_GET['orderby']) ? esc_sql($_GET['orderby']) : 'p.id';
285
  $single_id = !empty($_GET['id']) ? esc_sql($_GET['id']) : null;
286
  $search = !empty($_GET['s']) ? esc_sql($_GET['s']) : null;
287
 
288
+ $per_page = $this->args['per_page'];
289
+ $offset = ( $current - 1 ) * $per_page;
290
  return FV_Player_Db::getListPageData($order_by, $order, $offset, $per_page, $single_id, $search);
291
+ }
292
+
293
+ public function prepare_items() {
294
 
295
+ wp_reset_vars( array( 'action', 'payment', 'orderby', 'order', 's' ) );
296
 
297
+ $data = $this->get_data();
 
 
 
298
 
299
+ // re-count number of players to show when searching
300
+ if (isset($_GET['s']) && $_GET['s']) {
301
+ $this->get_result_counts();
302
+ }
303
 
304
+ $status = isset( $_GET['status'] ) ? $_GET['status'] : 'all';
305
 
306
+ $this->items = $data;
307
+
308
+ $this->set_pagination_args( array(
309
+ 'total_items' => $this->total_items,
310
+ 'per_page' => $this->args['per_page'],
311
+ 'total_pages' => ceil( $this->total_items / $this->args['per_page'] ),
312
+ )
313
+ );
314
+ }
315
 
 
 
 
 
 
 
 
 
316
  }
models/media-browser-s3.php CHANGED
@@ -140,7 +140,7 @@ class FV_Player_Media_Browser_S3 extends FV_Player_Media_Browser {
140
  }
141
 
142
  } catch ( Aws\CloudFront\Exception\CloudFrontException $e ) {
143
- $err = 'It appears that the policy of AWS IAM user identified by '.$key.' doesn\'t permit List and Read operations for the CloudFront service. Please add these access levels if you are using CloudFront for your S3 buckets in order to obtain CloudFront links for your videos.';
144
  }
145
 
146
  // instantiate the S3 client with AWS credentials
140
  }
141
 
142
  } catch ( Aws\CloudFront\Exception\CloudFrontException $e ) {
143
+ $err = 'It appears that the policy of AWS IAM user identified by '.$key.' doesn\'t permit List and Read operations for the CloudFront service. Please add CloudFrontReadOnlyAccess policy for the user if you are using CloudFront for your S3 buckets. Otherwise you won\'t be getting the proper CloudFront links for your videos.';
144
  }
145
 
146
  // instantiate the S3 client with AWS credentials
models/system-info.php CHANGED
@@ -55,6 +55,7 @@ Multisite: <?php echo is_multisite() ? 'Yes' . "\n" : 'No' . "\n"
55
 
56
  SITE_URL: <?php echo site_url() . "\n"; ?>
57
  HOME_URL: <?php echo home_url() . "\n"; ?>
 
58
 
59
  FV Player version: <?php echo $fv_wp_flowplayer_ver . "\n"; ?>
60
  FV Player core version: <?php echo $fv_wp_flowplayer_core_ver . "\n"; ?>
@@ -191,9 +192,16 @@ DATABASE
191
  <?php
192
  global $wpdb;
193
  foreach( array( 'fv_player_players', 'fv_player_playermeta', 'fv_player_videos', 'fv_player_videometa' ) AS $table) {
194
- $res = $wpdb->get_row( "SHOW CREATE TABLE {$wpdb->prefix}{$table}", ARRAY_A );
195
- if( isset($res['Create Table']) ) {
196
- echo $res['Create Table']."\n\n";
 
 
 
 
 
 
 
197
  } else {
198
  echo $table." not found!\n";
199
  }
55
 
56
  SITE_URL: <?php echo site_url() . "\n"; ?>
57
  HOME_URL: <?php echo home_url() . "\n"; ?>
58
+ Plugin URL: <?php echo flowplayer::get_plugin_url() . "\n"; ?>
59
 
60
  FV Player version: <?php echo $fv_wp_flowplayer_ver . "\n"; ?>
61
  FV Player core version: <?php echo $fv_wp_flowplayer_core_ver . "\n"; ?>
192
  <?php
193
  global $wpdb;
194
  foreach( array( 'fv_player_players', 'fv_player_playermeta', 'fv_player_videos', 'fv_player_videometa' ) AS $table) {
195
+ $found = false;
196
+ $table_name = $wpdb->prefix.$table;
197
+ if ( $wpdb->get_var( $wpdb->prepare( 'SHOW TABLES LIKE %s', $wpdb->esc_like( $table_name ) ) ) == $table_name ) {
198
+ $res = $wpdb->get_row( "SHOW CREATE TABLE {$table_name}", ARRAY_A );
199
+ if( $res && $res['Create Table'] ) {
200
+ $found = $res['Create Table'];
201
+ }
202
+ }
203
+ if( $found ) {
204
+ echo $found."\n\n";
205
  } else {
206
  echo $table." not found!\n";
207
  }
models/xml-video-sitemap.php CHANGED
@@ -74,59 +74,82 @@ class FV_Xml_Video_Sitemap {
74
  }
75
 
76
  foreach ($posts as $objPost) {
77
- $did_videos = array();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
78
 
79
- if ( $objPost ) {
80
- $content = $objPost->post_content;
81
- $content = preg_replace( '~<code>.*?</code>~', '', $content );
82
- if( $this->get_meta_keys() ) {
83
- foreach( $this->get_meta_keys() AS $meta_key ) {
84
- $content .= implode( get_post_meta($objPost->ID, $meta_key) );
 
 
 
 
 
 
 
85
  }
86
  }
87
-
88
- // we apply the shortcodes to make sure any membership restrictions work, but we omit the FV Player shortcodes as we want to parse these elsewhere
89
- $content = str_replace( array('[fvplayer','[flowplayer'), '[noplayer', $content );
90
- $content = do_shortcode($content);
91
- $content = str_replace( '[noplayer', '[fvplayer', $content );
92
-
93
- preg_match_all( '~\[(?:flowplayer|fvplayer).*?\]~', $content, $matches );
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
96
  if( $meta = get_post_meta($objPost->ID, '_aioseop_description', true ) ) {
97
- $sanitized_description = $meta;
98
  } else if( $meta = get_post_meta($objPost->ID, '_yoast_wpseo_metadesc', true ) ) {
99
- $sanitized_description = $meta;
100
  } else if( $meta = get_post_meta($objPost->ID, '_genesis_description', true ) ) {
101
- $sanitized_description = $meta;
102
  } else {
103
- $sanitized_description = !empty($objPost->post_excerpt) ? $objPost->post_excerpt : wp_trim_words( strip_shortcodes($objPost->post_content),10, '...');
104
  }
105
 
106
- $sanitized_description = htmlspecialchars( $sanitized_description,ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
107
 
108
- if ( isset( $matches[0] ) && count( $matches[0] ) ) {
109
- $video_alt_captions_counter = 1;
110
 
111
- foreach ( $matches[0] AS $shortcode ) {
 
 
 
 
112
  $increment_video_counter = false;
113
  $aArgs = shortcode_parse_atts( rtrim( $shortcode, ']' ) );
114
 
115
  global $FV_Player_Db;
116
- if( !empty($aArgs['id']) && !empty($FV_Player_Db) ) {
117
  $aArgs = $FV_Player_Db->getPlayerAttsFromDb( $aArgs );
118
  }
119
 
120
- if( !empty($did_videos[$aArgs['src']]) ) continue;
121
- $did_videos[$aArgs['src']] = true;
122
-
123
- // sitemap data generation - remove the first item (start of the tag)
124
- // and leave everything else that was defined
125
- $new_video_record = array(
126
- // landing page
127
- 'loc' => get_permalink($objPost),
128
- 'video' => array()
129
- );
130
 
131
  // this crazyness needs to be first converted into non-html characters (so &quot; becomes "), then
132
  // stripped of them all and returned back HTML-encoded for the XML formatting to be correct
@@ -143,7 +166,8 @@ class FV_Xml_Video_Sitemap {
143
  $splash = 'http:'.$splash;
144
  }
145
  } else {
146
- $splash = plugins_url('css/img/play_white.png', __DIR__);
 
147
  }
148
 
149
  // check for caption - if none present, build it up from page title and video position
@@ -165,70 +189,83 @@ class FV_Xml_Video_Sitemap {
165
  $sanitized_page_title = htmlspecialchars(strip_tags($objPost->post_title), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
166
 
167
  // set thumbnail
168
- $new_video_record['video']['thumbnail_loc'] = apply_filters( 'fv_player_sitemap_thumbnail', $splash, $aArgs['src'], $objPost->ID );
169
 
170
  // set video title
171
  if (!empty($sanitized_caption)) {
172
- $new_video_record['video']['title'] = $sanitized_caption;
 
 
173
  } else {
174
- if (!empty($sanitized_page_title)) {
175
- $new_video_record['video']['title'] = $sanitized_page_title;
176
- } else {
177
- $new_video_record['video']['title'] = 'Video ' . $video_alt_captions_counter;
178
- $increment_video_counter = true;
179
- }
180
  }
181
-
182
- // don't return empty descriptions (can happen if the video tag it the only thing on the page)
183
- if( strlen(trim($sanitized_description)) == 0 ) {
184
- $new_video_record['video']['description'] = $new_video_record['video']['title'];
185
- $increment_video_counter = true;
186
  } else {
187
- $new_video_record['video']['description'] = $sanitized_description;
188
  }
189
 
190
- if( $aCategories = get_the_category($objPost->ID) ) {
191
- $new_video_record['video']['category'] = mb_substr( implode(', ',wp_list_pluck($aCategories,'name')), 0, 250 );
192
- }
193
- $new_video_record['video']['publication_date'] = get_the_date(DATE_W3C, $objPost->ID);
194
 
195
- // update video counter used for naming videos without caption on pages without titles
196
- if ($increment_video_counter) {
197
- $video_alt_captions_counter++;
198
  }
199
 
200
- if( count($dynamic_domains) ) {
201
- $is_dynamic = false;
202
- foreach( $dynamic_domains AS $domain ) {
203
- if( stripos($sanitized_src,$domain) !== false ) {
204
- $is_dynamic = true;
205
- }
 
 
 
 
 
 
 
 
 
206
  }
207
- if( $is_dynamic ) continue;
 
208
  }
209
-
210
- // files with extensions are considered direct video files,
211
- // everything else is considered a path to player location
212
- // note: we check for strlen($extension) < 10, since abc.com would otherwise register as extension
 
 
213
  if ((strpos($aArgs['src'], '.') !== false) && ($extension = substr(strrchr($aArgs['src'], "."), 1)) && strlen($extension) < 10) {
214
  // filename URL
215
- $new_video_record['video']['content_loc'] = $sanitized_src;
216
- } else {
 
217
  continue;
 
 
 
 
 
 
 
 
 
218
  }
219
 
220
- $videos[] = $new_video_record;
221
 
222
  }
223
  }
224
 
225
- if ( count( $videos ) > 0 ) {
226
-
227
- } else {
228
- $videos = false;
229
  }
230
  }
231
-
232
  return $videos;
233
  }
234
 
@@ -296,10 +333,10 @@ class FV_Xml_Video_Sitemap {
296
  }
297
 
298
  function fv_generate_video_sitemap() {
299
- global $wpdb, $fv_wp_flowplayer_ver, $fv_fp;
300
-
301
- if( !$fv_fp->_get_option('video_sitemap') ) return;
302
 
 
 
303
  // if output buffering is active, clear it
304
  if ( ob_get_level() ) ob_clean();
305
 
@@ -314,9 +351,15 @@ class FV_Xml_Video_Sitemap {
314
  newrelic_disable_autorum();
315
  }
316
 
317
- $date_query = false;
318
  $year = intval(get_query_var('fvp_sitemap_year'));
319
  $month = intval(get_query_var('fvp_sitemap_monthnum'));
 
 
 
 
 
 
 
320
  if( $year && $month ) {
321
  $date_query = " year(post_date) = ".$year." AND month(post_date) = ".$month." AND ";
322
  } else if( get_query_var('year') ) {
@@ -341,14 +384,16 @@ class FV_Xml_Video_Sitemap {
341
  echo '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
342
  echo '<'.'?xml-stylesheet type="text/xsl" href="'.flowplayer::get_plugin_url().'/css/sitemap-video.xsl?ver='.$fv_wp_flowplayer_ver.'"?'.'>'."\n";
343
  echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">'."\n";
344
- foreach ($data as $video) {
345
  echo "\t<url>\n";
346
- echo "\t\t<loc>".$video['loc']."</loc>\n";
347
- echo "\t\t<video:video>\n";
348
- foreach ($video['video'] as $videoTag => $videoTagValue) {
349
- echo "\t\t\t<video:$videoTag>$videoTagValue</video:$videoTag>\n";
350
- }
351
- echo "\t\t</video:video>\n";
 
 
352
  echo "\t</url>\n";
353
  }
354
  echo "</urlset>\n";
@@ -415,6 +460,14 @@ class FV_Xml_Video_Sitemap {
415
  function options() {
416
  global $fv_fp;
417
  $fv_fp->_get_checkbox(__('Use XML Video Sitemap', 'fv-wordpress-flowplayer'), 'video_sitemap', sprintf( __('Creates <code>%s</code> which you can submit via Google Webmaster Tools.', 'fv-wordpress-flowplayer'), home_url('video-sitemap.xml') ), __('As feeds tend to be cached by web browser make sure you clear your browser cache if you are doing some testing.', 'fv-wordpress-flowplayer') );
 
 
 
 
 
 
 
 
418
  $fv_fp->_get_input_text( array( 'name' => __('Sitemap Post Meta', 'fv-wordpress-flowplayer'), 'key' => 'video_sitemap_meta', 'help' => __('You can enter post meta keys here, use <code>,</code> to separate multiple values.', 'fv-wordpress-flowplayer') ) );
419
  }
420
 
@@ -431,6 +484,14 @@ class FV_Xml_Video_Sitemap {
431
  }
432
  return $settings;
433
  }
 
 
 
 
 
 
 
434
  }
435
 
 
436
  $FV_Xml_Video_Sitemap = new FV_Xml_Video_Sitemap();
74
  }
75
 
76
  foreach ($posts as $objPost) {
77
+ $count = 0;
78
+
79
+ $permalink = get_permalink($objPost);
80
+
81
+ $xml_loc = array(
82
+ // landing page
83
+ 'loc' => $permalink,
84
+ 'video' => array()
85
+ );
86
+
87
+ $used_videos = array();
88
+ $used_titles = array();
89
+ $used_descriptions = array();
90
+
91
+ $content = $objPost->post_content;
92
+ $content = preg_replace( '~<code.*?</code>~', '', $content );
93
+ $content = preg_replace( '~<pre[\s\S]*?</pre>~', '', $content );
94
 
95
+ $content = $this->strip_membership_content($content);
96
+
97
+ preg_match_all( '~\[(?:flowplayer|fvplayer).*?\]~', $content, $matches );
98
+
99
+ if( $this->get_meta_keys() ) {
100
+ foreach( $this->get_meta_keys() AS $meta_key ) {
101
+ $meta_values = implode( get_post_meta($objPost->ID, $meta_key) );
102
+
103
+ $meta_values = $this->strip_membership_content($meta_values);
104
+
105
+ preg_match_all( '~\[(?:flowplayer|fvplayer).*?\]~', $meta_values, $meta_matches );
106
+ if( is_array($meta_matches) && count($meta_matches) > 0 ) {
107
+ $matches[$meta_key] = $meta_matches[0];
108
  }
109
  }
 
 
 
 
 
 
 
110
  }
111
 
112
+ $content_no_tags = preg_replace( '~</p>~', "</p>\n", $content );
113
+ $content_no_tags = preg_replace( '~\n+~', "\n", $content );
114
+ $content_no_tags = strip_tags( $content_no_tags );
115
+ $content_no_tags = explode( "\n", $content_no_tags );
116
+
117
+ // we apply the shortcodes to make sure any membership restrictions work, but we omit the FV Player shortcodes as we want to parse these elsewhere
118
+ $content = str_replace( array('[fvplayer','[flowplayer'), '[noplayer', $content );
119
+ $content = do_shortcode($content);
120
+ $content = str_replace( '[noplayer', '[fvplayer', $content );
121
+
122
  if( $meta = get_post_meta($objPost->ID, '_aioseop_description', true ) ) {
123
+ $description = $meta;
124
  } else if( $meta = get_post_meta($objPost->ID, '_yoast_wpseo_metadesc', true ) ) {
125
+ $description = $meta;
126
  } else if( $meta = get_post_meta($objPost->ID, '_genesis_description', true ) ) {
127
+ $description = $meta;
128
  } else {
129
+ $description = !empty($objPost->post_excerpt) ? $objPost->post_excerpt : wp_trim_words( strip_shortcodes($objPost->post_content),10, '...');
130
  }
131
 
132
+ $description = htmlspecialchars( $description,ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
133
 
134
+ foreach ( $matches AS $meta_key => $partial ) {
 
135
 
136
+ foreach ( $partial AS $key => $shortcode ) {
137
+ $count++;
138
+
139
+ $xml_video = array();
140
+
141
  $increment_video_counter = false;
142
  $aArgs = shortcode_parse_atts( rtrim( $shortcode, ']' ) );
143
 
144
  global $FV_Player_Db;
145
+ if( !empty($FV_Player_Db) ) {
146
  $aArgs = $FV_Player_Db->getPlayerAttsFromDb( $aArgs );
147
  }
148
 
149
+ if( empty($aArgs['embed']) ) $aArgs['embed'] = '';
150
+
151
+ if( empty($aArgs['src']) || !empty($used_videos[$aArgs['src']]) ) continue;
152
+ $used_videos[$aArgs['src']] = true;
 
 
 
 
 
 
153
 
154
  // this crazyness needs to be first converted into non-html characters (so &quot; becomes "), then
155
  // stripped of them all and returned back HTML-encoded for the XML formatting to be correct
166
  $splash = 'http:'.$splash;
167
  }
168
  } else {
169
+ $splash = get_the_post_thumbnail_url( $objPost->ID, 'thumbnail' );
170
+ if( !$splash ) $splash = plugins_url('css/img/play_white.png', __DIR__);
171
  }
172
 
173
  // check for caption - if none present, build it up from page title and video position
189
  $sanitized_page_title = htmlspecialchars(strip_tags($objPost->post_title), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
190
 
191
  // set thumbnail
192
+ $xml_video['thumbnail_loc'] = apply_filters( 'fv_player_sitemap_thumbnail', $splash, $aArgs['src'], $objPost->ID );
193
 
194
  // set video title
195
  if (!empty($sanitized_caption)) {
196
+ $title = $sanitized_caption;
197
+ } else if (!empty($sanitized_page_title)) {
198
+ $title = $sanitized_page_title;
199
  } else {
200
+ $title = 'Video';
 
 
 
 
 
201
  }
202
+
203
+ if( !empty($used_titles[$title]) ) {
204
+ $used_titles[$title]++;
205
+ $title .= ' '.$used_titles[$title];
 
206
  } else {
207
+ $used_titles[$title] = 1;
208
  }
209
 
210
+ $xml_video['title'] = $title;
 
 
 
211
 
212
+ // don't return empty descriptions (can happen if the video tag it the only thing on the page)
213
+ if( strlen(trim($description)) == 0 ) {
214
+ $description = $xml_video['title'];
215
  }
216
 
217
+ $xml_video['description'] = $description;
218
+
219
+ // if description is already in use try to find the previous sentence
220
+ if( !empty($used_descriptions[$description]) ) {
221
+ $last = false;
222
+ foreach( $content_no_tags AS $p ) {
223
+ if( stripos($p,$shortcode) !== false ) break;
224
+ $last = trim( strip_shortcodes($p) );
225
+ }
226
+
227
+ if( $last ) {
228
+ $xml_video['description'] = wp_trim_words($last,20,'...');
229
+ } else {
230
+ $used_descriptions[$description]++;
231
+ $xml_video['description'] .= ' '.$used_descriptions[$description];
232
  }
233
+ } else {
234
+ $used_descriptions[$description] = 1;
235
  }
236
+
237
+ if( $aCategories = get_the_category($objPost->ID) ) {
238
+ $xml_video['category'] = mb_substr( implode(', ',wp_list_pluck($aCategories,'name')), 0, 250 );
239
+ }
240
+ $xml_video['publication_date'] = get_the_date(DATE_W3C, $objPost->ID);
241
+
242
  if ((strpos($aArgs['src'], '.') !== false) && ($extension = substr(strrchr($aArgs['src'], "."), 1)) && strlen($extension) < 10) {
243
  // filename URL
244
+ $xml_video['content_loc'] = $sanitized_src;
245
+
246
+ } else if( $aArgs['embed'] == 'false' || $aArgs['embed'] == 'off' || ( $fv_fp->_get_option('disableembedding') && $aArgs['embed'] != 'true' ) ) {
247
  continue;
248
+
249
+ } else {
250
+ if( $player = $fv_fp->current_player() ) {
251
+ $embed_id = 'fvp-'.$player->getId();
252
+ } else {
253
+ $embed_id = 'fvp';
254
+ if( $count > 1 ) $embed_id .= $count;
255
+ }
256
+ $xml_video['player_loc'] = user_trailingslashit( trailingslashit($permalink).$embed_id );
257
  }
258
 
259
+ $xml_loc['video'][] = $xml_video;
260
 
261
  }
262
  }
263
 
264
+ if ( count($xml_loc['video']) > 0 ) {
265
+ $videos[] = $xml_loc;
 
 
266
  }
267
  }
268
+
269
  return $videos;
270
  }
271
 
333
  }
334
 
335
  function fv_generate_video_sitemap() {
336
+ global $fv_fp;
 
 
337
 
338
+ if( !$fv_fp->_get_option('video_sitemap') ) return;
339
+
340
  // if output buffering is active, clear it
341
  if ( ob_get_level() ) ob_clean();
342
 
351
  newrelic_disable_autorum();
352
  }
353
 
 
354
  $year = intval(get_query_var('fvp_sitemap_year'));
355
  $month = intval(get_query_var('fvp_sitemap_monthnum'));
356
+ echo $this->fv_generate_video_sitemap_do( $year, $month );
357
+ }
358
+
359
+ function fv_generate_video_sitemap_do( $year, $month ) {
360
+ global $wpdb, $fv_wp_flowplayer_ver;
361
+
362
+ $date_query = false;
363
  if( $year && $month ) {
364
  $date_query = " year(post_date) = ".$year." AND month(post_date) = ".$month." AND ";
365
  } else if( get_query_var('year') ) {
384
  echo '<'.'?xml version="1.0" encoding="UTF-8"?'.'>'."\n";
385
  echo '<'.'?xml-stylesheet type="text/xsl" href="'.flowplayer::get_plugin_url().'/css/sitemap-video.xsl?ver='.$fv_wp_flowplayer_ver.'"?'.'>'."\n";
386
  echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">'."\n";
387
+ foreach ($data as $xml_loc) {
388
  echo "\t<url>\n";
389
+ echo "\t\t<loc>".$xml_loc['loc']."</loc>\n";
390
+ foreach ($xml_loc['video'] as $xml_video ) {
391
+ echo "\t\t<video:video>\n";
392
+ foreach( $xml_video AS $videoTag => $videoTagValue) {
393
+ echo "\t\t\t<video:$videoTag>$videoTagValue</video:$videoTag>\n";
394
+ }
395
+ echo "\t\t</video:video>\n";
396
+ }
397
  echo "\t</url>\n";
398
  }
399
  echo "</urlset>\n";
460
  function options() {
461
  global $fv_fp;
462
  $fv_fp->_get_checkbox(__('Use XML Video Sitemap', 'fv-wordpress-flowplayer'), 'video_sitemap', sprintf( __('Creates <code>%s</code> which you can submit via Google Webmaster Tools.', 'fv-wordpress-flowplayer'), home_url('video-sitemap.xml') ), __('As feeds tend to be cached by web browser make sure you clear your browser cache if you are doing some testing.', 'fv-wordpress-flowplayer') );
463
+
464
+ if( $fv_fp->_get_option('disableembedding') ) : ?>
465
+ <tr>
466
+ <td></td>
467
+ <td><strong>Note:</strong> Since <a href="#fv_flowplayer_default_options">Disable Embed Button</a> setting is on the video sitemap can only present the bare MP4 or HLS videos. Disable that option to make it show your other video types too.</td>
468
+ </tr>
469
+ <?php endif;
470
+
471
  $fv_fp->_get_input_text( array( 'name' => __('Sitemap Post Meta', 'fv-wordpress-flowplayer'), 'key' => 'video_sitemap_meta', 'help' => __('You can enter post meta keys here, use <code>,</code> to separate multiple values.', 'fv-wordpress-flowplayer') ) );
472
  }
473
 
484
  }
485
  return $settings;
486
  }
487
+
488
+ function strip_membership_content( $content ) {
489
+ $content = preg_replace( '~\[is_paid[\s\S]*?\[/is_paid\]~', '', $content );
490
+ $content = preg_replace( '~\[restrict[\s\S]*?\[/restrict\]~', '', $content );
491
+ $content = preg_replace( '~\[am4show[\s\S]*?\[/am4show\]~', '', $content );
492
+ return $content;
493
+ }
494
  }
495
 
496
+ global $FV_Xml_Video_Sitemap;
497
  $FV_Xml_Video_Sitemap = new FV_Xml_Video_Sitemap();
readme.txt CHANGED
@@ -357,6 +357,17 @@ Thank you for being part of the HMTL 5 mobile video revolution!
357
 
358
  == Changelog ==
359
 
 
 
 
 
 
 
 
 
 
 
 
360
  = 7.3.12.727 - 2019/02/26 =
361
 
362
  * New Feature - Rewind Button - seeks 10 seconds back in the video, enable in Settings -> FV Player -> Sitewide FV Player Defaults
357
 
358
  == Changelog ==
359
 
360
+ = 7.3.13.727 - 2019/04/30 =
361
+
362
+ * Ad codes - sensing size of the Google AdSense ad unit, allowing the ad to expand from the player container for maximum ad revenue
363
+ * Ad codes - vi Story ad support - stopping your video if there is an video ad in overlay
364
+ * Embed codes - using database player IDs for the embed URL
365
+ * HLS - added support for multiple audio tracks on desktop browsers
366
+ * Iframe embedding - removed the settings as it's the only way of embedding, you can still use "Disable Embed Button"
367
+ * Screen options - added to the wp-admin -> FV Player screen, allowing you to see count of subtitle, chapter and transcript files
368
+ * Styling - new loading indicator which also appears before the player is initialized on slow connections
369
+ * XML Video Sitemap - includes a lot more videos as it uses the individual player iframe embed links. Until now it was only possible to put in videos using MP4 format without any kind of download protection. Your members only videos stay protected and won't open, but let us know if they appear in sitemap.
370
+
371
  = 7.3.12.727 - 2019/02/26 =
372
 
373
  * New Feature - Rewind Button - seeks 10 seconds back in the video, enable in Settings -> FV Player -> Sitewide FV Player Defaults
test/integration/backend/testProfileScreen.html CHANGED
@@ -49,6 +49,6 @@ src='//www.youtube.com/embed/6ZfuNTqbHE8?origin=' frameborder='0' webkitallowful
49
  </div>
50
  </div><div style="clear: both"></div>
51
  </div>
52
- <input type='hidden' name='fv-player-custom-videos-entity-id[_fv_player_user_video]' value='4' /><input type='hidden' name='fv-player-custom-videos-entity-type[_fv_player_user_video]' value='user' /><input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="0926bc6617" /><input type="hidden" name="_wp_http_referer" value="" /><input type='hidden' name='action' value='fv-player-custom-videos-save' /><input type='submit' value='Save Videos' /></form></div> <p class="description">You can put your Vimeo or YouTube links here. <abbr title="These show up as a part of the user bio. Licensed users get FV Player Pro which embeds these video types in FV Player interface without Vimeo or YouTube interface showing up."><span class="dashicons dashicons-editor-help"></span></abbr></p>
53
  </td>
54
  </tr>
49
  </div>
50
  </div><div style="clear: both"></div>
51
  </div>
52
+ <input type='hidden' name='fv-player-custom-videos-entity-id[_fv_player_user_video]' value='2' /><input type='hidden' name='fv-player-custom-videos-entity-type[_fv_player_user_video]' value='user' /><input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="0926bc6617" /><input type="hidden" name="_wp_http_referer" value="" /><input type='hidden' name='action' value='fv-player-custom-videos-save' /><input type='submit' value='Save Videos' /></form></div> <p class="description">You can put your Vimeo or YouTube links here. <abbr title="These show up as a part of the user bio. Licensed users get FV Player Pro which embeds these video types in FV Player interface without Vimeo or YouTube interface showing up."><span class="dashicons dashicons-editor-help"></span></abbr></p>
53
  </td>
54
  </tr>
test/integration/frontend/dbTest.php CHANGED
@@ -34,14 +34,20 @@ final class FV_Player_DBTest extends FV_Player_UnitTestCase {
34
 
35
  }
36
 
 
 
 
 
 
 
37
  public function testDBShortcode() {
38
 
39
  $output = apply_filters( 'the_content', '[fvplayer id="1"]' );
40
 
41
  $sample = <<< HTML
42
- <div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
43
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
44
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
45
 
46
  </div>
47
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
@@ -59,9 +65,9 @@ HTML;
59
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="oldest"]' );
60
 
61
  $sample = <<< HTML
62
- <div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
63
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
64
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
65
 
66
  </div>
67
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
@@ -76,15 +82,15 @@ HTML;
76
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="newest"]' );
77
 
78
  $sample = <<< HTML
79
- <div id="wpfp_abbc39b8f78820ec7d8d7a8e34d43856" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
80
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
81
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
82
 
83
  </div>
84
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_abbc39b8f78820ec7d8d7a8e34d43856">
85
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
86
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
87
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
88
  </div>
89
  HTML;
90
 
@@ -93,27 +99,21 @@ HTML;
93
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="title"]' );
94
 
95
  $sample = <<< HTML
96
- <div id="wpfp_4836d78a28ea12e5df615a50be31878f" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
97
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
98
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
99
 
100
  </div>
101
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_4836d78a28ea12e5df615a50be31878f">
102
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
103
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
104
- <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
105
  </div>
106
  HTML;
107
 
108
  $this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
109
  }
110
 
111
- public function testDBExport() {
112
- global $FV_Player_Db;
113
- $output = json_encode( $FV_Player_Db->export_player_data(false,false,1), JSON_UNESCAPED_SLASHES );
114
- $this->assertEquals( file_get_contents(dirname(__FILE__).'/player-data.json'), $output );
115
- }
116
-
117
  public function tearDown() {
118
  delete_option('fv_player_popups');
119
  }
34
 
35
  }
36
 
37
+ public function testDBExport() {
38
+ global $FV_Player_Db;
39
+ $output = json_encode( $FV_Player_Db->export_player_data(false,false,1), JSON_UNESCAPED_SLASHES );
40
+ $this->assertEquals( file_get_contents(dirname(__FILE__).'/player-data.json'), $output );
41
+ }
42
+
43
  public function testDBShortcode() {
44
 
45
  $output = apply_filters( 'the_content', '[fvplayer id="1"]' );
46
 
47
  $sample = <<< HTML
48
+ <div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
49
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
50
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
51
 
52
  </div>
53
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
65
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="oldest"]' );
66
 
67
  $sample = <<< HTML
68
+ <div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
69
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
70
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
71
 
72
  </div>
73
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
82
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="newest"]' );
83
 
84
  $sample = <<< HTML
85
+ <div id="wpfp_abbc39b8f78820ec7d8d7a8e34d43856" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
86
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
87
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
88
 
89
  </div>
90
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_abbc39b8f78820ec7d8d7a8e34d43856">
91
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"id":3,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
92
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"id":2,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
93
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}],"id":1}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
94
  </div>
95
  HTML;
96
 
99
  $output = apply_filters( 'the_content', '[fvplayer id="1" sort="title"]' );
100
 
101
  $sample = <<< HTML
102
+ <div id="wpfp_4836d78a28ea12e5df615a50be31878f" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
103
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
104
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
105
 
106
  </div>
107
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_4836d78a28ea12e5df615a50be31878f">
108
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"id":3,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
109
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}],"id":1}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
110
+ <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"id":2,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
111
  </div>
112
  HTML;
113
 
114
  $this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
115
  }
116
 
 
 
 
 
 
 
117
  public function tearDown() {
118
  delete_option('fv_player_popups');
119
  }
test/integration/frontend/endActionsTest.php CHANGED
@@ -47,9 +47,9 @@ final class FV_Player_EndActionsTest extends FV_Player_UnitTestCase {
47
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="email-1"]' );
48
 
49
  $sample = <<< HTML
50
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
51
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
52
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
53
  </div>
54
  HTML;
55
 
@@ -71,9 +71,9 @@ HTML;
71
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" loop="true"]' );
72
 
73
  $sample = <<< HTML
74
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_loop="1">
75
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
76
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
77
  </div>
78
  HTML;
79
 
@@ -85,9 +85,9 @@ HTML;
85
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" popup="1" share="no" embed="false"]' );
86
 
87
  $sample = <<< HTML
88
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
89
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
90
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
91
  </div>
92
  HTML;
93
 
@@ -109,9 +109,9 @@ HTML;
109
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="'.addslashes('<a href="https://foliovision.com/2018/07/panamax"><img src="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg" class="alignleft post-image entry-image lazyloaded " alt="PanamaX" itemprop="image" sizes="(max-width: 400px) 100vw, 400px" srcset="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg 400w, https://cdn.foliovision.com/images/2018/07/PanamaX-5.jpg 1128w" width="400" height="239"></a>').'"]' );
110
 
111
  $sample = <<< HTML
112
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
113
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
114
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
115
  </div>
116
  HTML;
117
 
@@ -133,9 +133,9 @@ HTML;
133
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" redirect="https://foliovision.com"]' );
134
 
135
  $sample = <<< HTML
136
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_redirect="https://foliovision.com">
137
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
138
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
139
  </div>
140
  HTML;
141
 
@@ -147,9 +147,9 @@ HTML;
147
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" splash="https://cdn.site.com/video.jpg" share="no" embed="false" splashend="show"]' );
148
 
149
  $sample = <<< HTML
150
- <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video.jpg);" data-ratio="0.5625">
151
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
152
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
153
  <div id="wpfp_ebf1dd081f973cd9a2b19499445705f2_custom_background" class="wpfp_custom_background" style="position: absolute; background: url('https://cdn.site.com/video.jpg') no-repeat center center; background-size: contain; width: 100%; height: 100%; z-index: 1;"></div>
154
  </div>
155
  HTML;
47
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="email-1"]' );
48
 
49
  $sample = <<< HTML
50
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
51
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
52
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
53
  </div>
54
  HTML;
55
 
71
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" loop="true"]' );
72
 
73
  $sample = <<< HTML
74
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_loop="1">
75
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
76
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
77
  </div>
78
  HTML;
79
 
85
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" popup="1" share="no" embed="false"]' );
86
 
87
  $sample = <<< HTML
88
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
89
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
90
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
91
  </div>
92
  HTML;
93
 
109
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="'.addslashes('<a href="https://foliovision.com/2018/07/panamax"><img src="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg" class="alignleft post-image entry-image lazyloaded " alt="PanamaX" itemprop="image" sizes="(max-width: 400px) 100vw, 400px" srcset="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg 400w, https://cdn.foliovision.com/images/2018/07/PanamaX-5.jpg 1128w" width="400" height="239"></a>').'"]' );
110
 
111
  $sample = <<< HTML
112
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
113
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
114
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
115
  </div>
116
  HTML;
117
 
133
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" redirect="https://foliovision.com"]' );
134
 
135
  $sample = <<< HTML
136
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_redirect="https://foliovision.com">
137
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
138
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
139
  </div>
140
  HTML;
141
 
147
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" splash="https://cdn.site.com/video.jpg" share="no" embed="false" splashend="show"]' );
148
 
149
  $sample = <<< HTML
150
+ <div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video.jpg);" data-ratio="0.5625">
151
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
152
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
153
  <div id="wpfp_ebf1dd081f973cd9a2b19499445705f2_custom_background" class="wpfp_custom_background" style="position: absolute; background: url('https://cdn.site.com/video.jpg') no-repeat center center; background-size: contain; width: 100%; height: 100%; z-index: 1;"></div>
154
  </div>
155
  HTML;
test/integration/frontend/player-data-youtube.json ADDED
@@ -0,0 +1 @@
 
1
+ {"ab":"","ad":"","ad_height":"","ad_width":"","ad_skip":"","align":"","autoplay":"","controlbar":"","copy_text":"","embed":"","end_actions":"","end_action_value":"","height":"","hflip":"","lightbox":"","lightbox_caption":"","lightbox_height":"","lightbox_width":"","player_name":"YouTube Test Playlist","player_slug":"","playlist":"","playlist_advance":"","qsel":"","share":"no","share_title":"","share_url":"","speed":"","sticky":"","video_ads":"","video_ads_post":"","width":"","videos":[{"caption":"The Best of Chopin","end":"","mobile":"","rtmp":"","rtmp_path":"","splash":"https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg","splash_text":"","src":"https://www.youtube.com/watch?v=wygy721nzRc","src1":"","src2":"","start":"","meta":[]}]}
test/integration/frontend/shortcodesLightboxTest.php CHANGED
@@ -15,11 +15,11 @@ final class FV_Player_ShortcodeLightboxTestCase extends FV_Player_UnitTestCase {
15
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true" share="no" embed="false"]' );
16
 
17
  $sample = <<< HTML
18
- <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
19
  <div class='fv_player_lightbox_hidden' style='display: none'>
20
- <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
21
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
22
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
23
  </div>
24
  </div>
25
  HTML;
@@ -31,11 +31,11 @@ HTML;
31
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;Video 1" share="no" embed="false"]' );
32
 
33
  $sample = <<< HTML
34
- <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' title='Video 1' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
35
  <div class='fv_player_lightbox_hidden' style='display: none'>
36
- <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
37
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
38
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
39
  </div>
40
  </div>
41
  HTML;
@@ -46,11 +46,11 @@ HTML;
46
  public function testCaptionAndDimensions() {
47
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;320;240;Video 1" share="no" embed="false"]' );
48
  $sample = <<< HTML
49
- <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_f1f51bb87ed9702bd91ac63990cee57b_lightbox_starter' title='Video 1' href='#wpfp_f1f51bb87ed9702bd91ac63990cee57b' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 320px; max-height: 240px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.75"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 75%"></div></div>
50
  <div class='fv_player_lightbox_hidden' style='display: none'>
51
- <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
52
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
53
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
54
  </div>
55
  </div>
56
  HTML;
@@ -72,9 +72,9 @@ HTML;
72
 
73
  $sample = <<< HTML
74
  <div style='display: none'>
75
- <div id="wpfp_11361d379334c11f2eaa75f6aacd8386" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
76
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
77
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
78
 
79
  </div>
80
  <p class='fp-caption'>Video 1</p></div>
@@ -92,23 +92,23 @@ HTML;
92
  $output = apply_filters( 'the_content', '[fvplayer '.$this->shortcode_body.' lightbox="true"]' );
93
 
94
  $sample = <<< HTML
95
- <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
96
  <div class='fv_player_lightbox_hidden' style='display: none'>
97
- <div id="wpfp_5d2ac904592b20b5bf87a2a85df7ace7" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
98
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
99
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
100
 
101
  </div>
102
  <p class='fp-caption'>Video 1</p></div><div class='fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions'><a id='fv_flowplayer_lightbox_placeholder' href='#' onclick='document.getElementById("fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter").click(); return false'><div style="background-image: url('https://cdn.site.com/video1.jpg')"></div><h4><span>Video 1</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video2.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_e802b17ebbace952275cd50709bf549b'><div style="background-image: url('https://cdn.site.com/video2.jpg')"></div><h4><span>Video 2</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video3.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_2ffbd4e84c1ecf2e00db5edf98996de3'><div style="background-image: url('https://cdn.site.com/video3.jpg')"></div><h4><span>Video 3</span></h4></a></div><div class='fv_player_lightbox_hidden' style='display: none'>
103
- <div id="wpfp_e802b17ebbace952275cd50709bf549b" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
104
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
105
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
106
 
107
  </div>
108
  <p class='fp-caption'>Video 2</p></div><div class='fv_player_lightbox_hidden' style='display: none'>
109
- <div id="wpfp_2ffbd4e84c1ecf2e00db5edf98996de3" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
110
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
111
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
112
 
113
  </div>
114
  <p class='fp-caption'>Video 3</p></div>
@@ -136,23 +136,23 @@ HTML;
136
 
137
  $sample = <<< HTML
138
  <div style='display: none'>
139
- <div id="wpfp_41dd59eae18defa2521bb63946885f69" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
140
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
141
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
142
 
143
  </div>
144
  <p class='fp-caption'>Video 1</p></div>
145
  <div style='display: none'>
146
- <div id="wpfp_c189727d02321b2388ebc844c1fdc0c7" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
147
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
148
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
149
 
150
  </div>
151
  <p class='fp-caption'>Video 2</p></div>
152
  <div style='display: none'>
153
- <div id="wpfp_51771d567d4dd88882f65b4b89fc81d6" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
154
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
155
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
156
 
157
  </div>
158
  <p class='fp-caption'>Video 3</p></div>
15
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true" share="no" embed="false"]' );
16
 
17
  $sample = <<< HTML
18
+ <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
19
  <div class='fv_player_lightbox_hidden' style='display: none'>
20
+ <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
21
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
22
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
23
  </div>
24
  </div>
25
  HTML;
31
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;Video 1" share="no" embed="false"]' );
32
 
33
  $sample = <<< HTML
34
+ <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' title='Video 1' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
35
  <div class='fv_player_lightbox_hidden' style='display: none'>
36
+ <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
37
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
38
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
39
  </div>
40
  </div>
41
  HTML;
46
  public function testCaptionAndDimensions() {
47
  $output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;320;240;Video 1" share="no" embed="false"]' );
48
  $sample = <<< HTML
49
+ <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_f1f51bb87ed9702bd91ac63990cee57b_lightbox_starter' title='Video 1' href='#wpfp_f1f51bb87ed9702bd91ac63990cee57b' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 320px; max-height: 240px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.75"><div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div><div class="fp-ratio" style="padding-top: 75%"></div></div>
50
  <div class='fv_player_lightbox_hidden' style='display: none'>
51
+ <div id="some-test-hash" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
52
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
53
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
54
  </div>
55
  </div>
56
  HTML;
72
 
73
  $sample = <<< HTML
74
  <div style='display: none'>
75
+ <div id="wpfp_11361d379334c11f2eaa75f6aacd8386" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
76
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
77
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
78
 
79
  </div>
80
  <p class='fp-caption'>Video 1</p></div>
92
  $output = apply_filters( 'the_content', '[fvplayer '.$this->shortcode_body.' lightbox="true"]' );
93
 
94
  $sample = <<< HTML
95
+ <div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
96
  <div class='fv_player_lightbox_hidden' style='display: none'>
97
+ <div id="wpfp_5d2ac904592b20b5bf87a2a85df7ace7" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
98
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
99
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
100
 
101
  </div>
102
  <p class='fp-caption'>Video 1</p></div><div class='fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions'><a id='fv_flowplayer_lightbox_placeholder' href='#' onclick='document.getElementById("fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter").click(); return false'><div style="background-image: url('https://cdn.site.com/video1.jpg')"></div><h4><span>Video 1</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video2.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_e802b17ebbace952275cd50709bf549b'><div style="background-image: url('https://cdn.site.com/video2.jpg')"></div><h4><span>Video 2</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video3.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_2ffbd4e84c1ecf2e00db5edf98996de3'><div style="background-image: url('https://cdn.site.com/video3.jpg')"></div><h4><span>Video 3</span></h4></a></div><div class='fv_player_lightbox_hidden' style='display: none'>
103
+ <div id="wpfp_e802b17ebbace952275cd50709bf549b" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
104
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
105
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
106
 
107
  </div>
108
  <p class='fp-caption'>Video 2</p></div><div class='fv_player_lightbox_hidden' style='display: none'>
109
+ <div id="wpfp_2ffbd4e84c1ecf2e00db5edf98996de3" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
110
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
111
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
112
 
113
  </div>
114
  <p class='fp-caption'>Video 3</p></div>
136
 
137
  $sample = <<< HTML
138
  <div style='display: none'>
139
+ <div id="wpfp_41dd59eae18defa2521bb63946885f69" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
140
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
141
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
142
 
143
  </div>
144
  <p class='fp-caption'>Video 1</p></div>
145
  <div style='display: none'>
146
+ <div id="wpfp_c189727d02321b2388ebc844c1fdc0c7" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
147
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
148
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
149
 
150
  </div>
151
  <p class='fp-caption'>Video 2</p></div>
152
  <div style='display: none'>
153
+ <div id="wpfp_51771d567d4dd88882f65b4b89fc81d6" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
154
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
155
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
156
 
157
  </div>
158
  <p class='fp-caption'>Video 3</p></div>
test/integration/frontend/shortcodesPlaylistTest.php CHANGED
@@ -43,9 +43,9 @@ final class FV_Player_ShortcodePlaylistTestCase extends FV_Player_UnitTestCase {
43
  $output = apply_filters( 'the_content', $post->post_content );
44
 
45
  $sample = <<< HTML
46
- <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
47
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
48
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
49
  </div>
50
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
51
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
@@ -61,9 +61,9 @@ HTML;
61
  $output = apply_filters( 'the_content', $post->post_content );
62
 
63
  $sample = <<< HTML
64
- <div class="fp-playlist-vertical-wrapper"><div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
65
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
66
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
67
  </div>
68
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-vertical fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
69
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
@@ -80,9 +80,9 @@ HTML;
80
  $output = apply_filters( 'the_content', $post->post_content );
81
 
82
  $sample = <<< HTML
83
- <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
84
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
85
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
86
  <a class="fp-prev" title="prev"></a><a class="fp-next" title="next"></a></div>
87
  <div style="display: none" class="fp-playlist-external fv-playlist-design-2017 fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
88
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
@@ -98,9 +98,9 @@ HTML;
98
  $output = apply_filters( 'the_content', $post->post_content );
99
 
100
  $sample = <<< HTML
101
- <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
102
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
103
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
104
  </div>
105
  <div class='fv-playlist-slider-wrapper'><div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916" style="width: 750px">
106
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
@@ -120,19 +120,19 @@ HTML;
120
  $output = apply_filters( 'the_content', $post->post_content );
121
 
122
  $sample = <<< HTML
123
- <script>document.body.className += " fv_flowplayer_tabs_hide";</script><div class="fv_flowplayer_tabs tabs woocommerce-tabs" style="max-width: 640px"><div id="tabs-10-1" class="fv_flowplayer_tabs_content"><ul><li><a href="#tabs-10-1-0">Video 1</a></li><li><a href="#tabs-10-1-1">Video 2</a></li><li><a href="#tabs-10-1-2"> Video 3</a></li></ul><div class="fv_flowplayer_tabs_cl"></div><div id="tabs-10-1-0" class="fv_flowplayer_tabs_first"><div id="wpfp_5d697f461a6a69e41882ec0212d63d1f" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
124
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
125
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
126
 
127
  </div>
128
- </div><div id="tabs-10-1-1"><div id="wpfp_f31738e686c3bdae67dfd7e57dec3d8c" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
129
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
130
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
131
 
132
  </div>
133
- </div><div id="tabs-10-1-2"><div id="wpfp_0dfbb08c099beb557be57907b1c01eb2" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
134
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
135
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
136
 
137
  </div>
138
  </div><div class="fv_flowplayer_tabs_cl"></div><div class="fv_flowplayer_tabs_cr"></div></div></div>
43
  $output = apply_filters( 'the_content', $post->post_content );
44
 
45
  $sample = <<< HTML
46
+ <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
47
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
48
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
49
  </div>
50
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
51
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
61
  $output = apply_filters( 'the_content', $post->post_content );
62
 
63
  $sample = <<< HTML
64
+ <div class="fp-playlist-vertical-wrapper"><div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
65
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
66
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
67
  </div>
68
  <div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-vertical fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
69
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
80
  $output = apply_filters( 'the_content', $post->post_content );
81
 
82
  $sample = <<< HTML
83
+ <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
84
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
85
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
86
  <a class="fp-prev" title="prev"></a><a class="fp-next" title="next"></a></div>
87
  <div style="display: none" class="fp-playlist-external fv-playlist-design-2017 fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
88
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
98
  $output = apply_filters( 'the_content', $post->post_content );
99
 
100
  $sample = <<< HTML
101
+ <div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
102
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
103
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
104
  </div>
105
  <div class='fv-playlist-slider-wrapper'><div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916" style="width: 750px">
106
  <a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
120
  $output = apply_filters( 'the_content', $post->post_content );
121
 
122
  $sample = <<< HTML
123
+ <script>document.body.className += " fv_flowplayer_tabs_hide";</script><div class="fv_flowplayer_tabs tabs woocommerce-tabs" style="max-width: 640px"><div id="tabs-10-1" class="fv_flowplayer_tabs_content"><ul><li><a href="#tabs-10-1-0">Video 1</a></li><li><a href="#tabs-10-1-1">Video 2</a></li><li><a href="#tabs-10-1-2"> Video 3</a></li></ul><div class="fv_flowplayer_tabs_cl"></div><div id="tabs-10-1-0" class="fv_flowplayer_tabs_first"><div id="wpfp_5d697f461a6a69e41882ec0212d63d1f" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video1.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
124
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
125
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
126
 
127
  </div>
128
+ </div><div id="tabs-10-1-1"><div id="wpfp_f31738e686c3bdae67dfd7e57dec3d8c" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video2.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
129
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
130
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
131
 
132
  </div>
133
+ </div><div id="tabs-10-1-2"><div id="wpfp_0dfbb08c099beb557be57907b1c01eb2" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video3.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
134
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
135
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
136
 
137
  </div>
138
  </div><div class="fv_flowplayer_tabs_cl"></div><div class="fv_flowplayer_tabs_cr"></div></div></div>
test/integration/frontend/testSimpleShortcode.html CHANGED
@@ -1,4 +1,5 @@
1
  <title>Test Blog</title>
 
2
  <link rel='stylesheet' id='fv_flowplayer-css' href='http://example.org/wp-content/plugins/fv-wordpress-flowplayer/css/flowplayer.css?ver=1.2.3' type='text/css' media='all' />
3
  <link rel='https://api.w.org/' href='http://example.org/index.php?rest_route=/' />
4
  <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.org/xmlrpc.php?rsd" />
@@ -60,13 +61,12 @@
60
  .flowplayer .fp-captions p { background-color: rgba(0,0,0,0.5) }
61
 
62
  </style>
63
- <div id="wpfp_1fd794010fde2df80985efba80286197" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
64
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
65
- <div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
66
  <div class='fvp-share-bar'><ul class="fvp-sharing">
67
  <li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
68
- <li><a class="sharing-twitter" href="https://twitter.com/home?status=Test+Blog+http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
69
- <li><a class="sharing-google" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
70
  <li><a class="sharing-email" href="mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li></ul><div><a class="sharing-link" href="http://example.org/?p=1234" target="_blank">Link</a></div><div><label><a class="embed-code-toggle" href="#"><strong>Embed</strong></a></label></div><div class="embed-code"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
71
  </div>
72
 
@@ -74,7 +74,7 @@
74
  <script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery-migrate.js?ver=1.4.1'></script>
75
  <script type='text/javascript'>
76
  /* <![CDATA[ */
77
- var fv_flowplayer_conf = {"fullscreen":"1","swf":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.swf?ver=1.2.3","swfHls":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayerhls.swf?ver=1.2.3","embed":{"library":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/fv-flowplayer.min.js","script":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/embed.min.js","skin":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/css\/flowplayer.css","swf":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.swf?ver=1.2.3","swfHls":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayerhls.swf?ver=1.2.3"},"speeds":[0.25,0.5,0.75,1,1.25,1.5,1.75,2],"video_hash_links":"1","safety_resize":"1","volume":"0.7","sticky_video":"","sticky_place":"right-bottom","sticky_width":"380","script_hls_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/hls.min.js?ver=1.2.3","script_dash_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.dashjs.min.js?ver=1.2.3","script_dash_js_version":"2.7","hlsjs":{"startLevel":-1,"fragLoadingMaxRetry":3,"levelLoadingMaxRetry":3,"capLevelToPlayerSize":true}};
78
  var fv_flowplayer_translations = {"0":"","1":"Video loading aborted","2":"Network error","3":"Video not properly encoded","4":"Video file not found","5":"Unsupported video","6":"Skin not found","7":"SWF file not found","8":"Subtitles not found","9":"Invalid RTMP URL","10":"Unsupported video format. Try installing Adobe Flash.","11":"Click to watch the video","12":"[This post contains video, click to play]","video_expired":"<h2>Video file expired.<br \/>Please reload the page and play it again.<\/h2>","unsupported_format":"<h2>Unsupported video format.<br \/>Please use a Flash compatible device.<\/h2>","mobile_browser_detected_1":"Mobile browser detected, serving low bandwidth video.","mobile_browser_detected_2":"Click here","mobile_browser_detected_3":"for full quality.","live_stream_failed":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","live_stream_failed_2":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","what_is_wrong":"Please tell us what is wrong :","full_sentence":"Please give us more information (a full sentence) so we can help you better","error_JSON":"Admin: Error parsing JSON","no_support_IE9":"Admin: Video checker doesn't support IE 9.","check_failed":"Admin: Check failed.","playlist_current":"Now Playing","video_issues":"Video Issues","video_reload":"Video loading has stalled, click to reload","link_copied":"Video Link Copied to Clipboard","embed_copied":"Embed Code Copied to Clipboard","subtitles_disabled":"Subtitles disabled","subtitles_switched":"Subtitles switched to ","warning_iphone_subs":"This video has subtitles, that are not supported on your device.","warning_unstable_android":"You are using an old Android device. If you experience issues with the video please use <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.mozilla.firefox\">Firefox<\/a>. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>","warning_samsungbrowser":"You are using the Samsung Browser which is an older and buggy version of Google Chrome. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser.","warning_old_safari":"You are using an old Safari browser. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>"};
79
  var fv_fp_ajaxurl = "http:\/\/example.org\/wp-admin\/admin-ajax.php";
80
  var fv_flowplayer_playlists = [];
1
  <title>Test Blog</title>
2
+ <link rel='stylesheet' id='wp-block-library-css' href='http://example.org/wp-includes/css/dist/block-library/style.css?ver=1.2.3-beta3-45183-src' type='text/css' media='all' />
3
  <link rel='stylesheet' id='fv_flowplayer-css' href='http://example.org/wp-content/plugins/fv-wordpress-flowplayer/css/flowplayer.css?ver=1.2.3' type='text/css' media='all' />
4
  <link rel='https://api.w.org/' href='http://example.org/index.php?rest_route=/' />
5
  <link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.org/xmlrpc.php?rsd" />
61
  .flowplayer .fp-captions p { background-color: rgba(0,0,0,0.5) }
62
 
63
  </style>
64
+ <div id="wpfp_1fd794010fde2df80985efba80286197" data-item="{&quot;sources&quot;:[{&quot;src&quot;:&quot;https:\/\/cdn.site.com\/video.mp4&quot;,&quot;type&quot;:&quot;video\/mp4&quot;}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-fv-embed="http://example.org/?p=1234&amp;fv_player_embed=1" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
65
  <div class="fp-ratio" style="padding-top: 56.25%"></div>
66
+ <div class="fp-ui"><noscript>Please enable JavaScript</noscript><div class="fp-preload"><b></b><b></b><b></b><b></b></div></div>
67
  <div class='fvp-share-bar'><ul class="fvp-sharing">
68
  <li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
69
+ <li><a class="sharing-twitter" href="https://twitter.com/home?status=Test+Blog+http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
 
70
  <li><a class="sharing-email" href="mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li></ul><div><a class="sharing-link" href="http://example.org/?p=1234" target="_blank">Link</a></div><div><label><a class="embed-code-toggle" href="#"><strong>Embed</strong></a></label></div><div class="embed-code"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
71
  </div>
72
 
74
  <script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery-migrate.js?ver=1.4.1'></script>
75
  <script type='text/javascript'>
76
  /* <![CDATA[ */
77
+ var fv_flowplayer_conf = {"fullscreen":"1","swf":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.swf?ver=1.2.3","swfHls":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayerhls.swf?ver=1.2.3","speeds":[0.25,0.5,0.75,1,1.25,1.5,1.75,2],"video_hash_links":"1","safety_resize":"1","volume":"0.7","sticky_video":"","sticky_place":"right-bottom","sticky_width":"380","script_hls_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/hls.min.js?ver=1.2.3","script_dash_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.dashjs.min.js?ver=1.2.3","script_dash_js_version":"2.7","hlsjs":{"startLevel":-1,"fragLoadingMaxRetry":3,"levelLoadingMaxRetry":3,"capLevelToPlayerSize":true}};
78
  var fv_flowplayer_translations = {"0":"","1":"Video loading aborted","2":"Network error","3":"Video not properly encoded","4":"Video file not found","5":"Unsupported video","6":"Skin not found","7":"SWF file not found","8":"Subtitles not found","9":"Invalid RTMP URL","10":"Unsupported video format. Try installing Adobe Flash.","11":"Click to watch the video","12":"[This post contains video, click to play]","video_expired":"<h2>Video file expired.<br \/>Please reload the page and play it again.<\/h2>","unsupported_format":"<h2>Unsupported video format.<br \/>Please use a Flash compatible device.<\/h2>","mobile_browser_detected_1":"Mobile browser detected, serving low bandwidth video.","mobile_browser_detected_2":"Click here","mobile_browser_detected_3":"for full quality.","live_stream_failed":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","live_stream_failed_2":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","what_is_wrong":"Please tell us what is wrong :","full_sentence":"Please give us more information (a full sentence) so we can help you better","error_JSON":"Admin: Error parsing JSON","no_support_IE9":"Admin: Video checker doesn't support IE 9.","check_failed":"Admin: Check failed.","playlist_current":"Now Playing","video_issues":"Video Issues","video_reload":"Video loading has stalled, click to reload","link_copied":"Video Link Copied to Clipboard","embed_copied":"Embed Code Copied to Clipboard","subtitles_disabled":"Subtitles disabled","subtitles_switched":"Subtitles switched to ","warning_iphone_subs":"This video has subtitles, that are not supported on your device.","warning_unstable_android":"You are using an old Android device. If you experience issues with the video please use <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.mozilla.firefox\">Firefox<\/a>. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>","warning_samsungbrowser":"You are using the Samsung Browser which is an older and buggy version of Google Chrome. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser.","warning_old_safari":"You are using an old Safari browser. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>"};
79
  var fv_fp_ajaxurl = "http:\/\/example.org\/wp-admin\/admin-ajax.php";
80
  var fv_flowplayer_playlists = [];
test/integration/frontend/video-sitemap.xml ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <?xml-stylesheet type="text/xsl" href="http://example.org/wp-content/plugins/fv-wordpress-flowplayer/css/sitemap-video.xsl?ver=7.3.12.727.2"?>
3
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
4
+ <url>
5
+ <loc>http://example.org/?p=4</loc>
6
+ <video:video>
7
+ <video:thumbnail_loc>http://example.org/wp-content/plugins/Users/martinv/github/fv-wordpress-flowplayer/css/img/play_white.png</video:thumbnail_loc>
8
+ <video:title>Video Sitemap Test</video:title>
9
+ <video:description>Post excerpt 18</video:description>
10
+ <video:category>Uncategorized</video:category>
11
+ <video:publication_date>2019-04-23T12:47:37+00:00</video:publication_date>
12
+ <video:content_loc>https://cdn.site.com/video.mp4</video:content_loc>
13
+ </video:video>
14
+ <video:video>
15
+ <video:thumbnail_loc>http://example.org/wp-content/plugins/Users/martinv/github/fv-wordpress-flowplayer/css/img/play_white.png</video:thumbnail_loc>
16
+ <video:title>Video Sitemap Test 2</video:title>
17
+ <video:description>Let's try a YouTube video:</video:description>
18
+ <video:category>Uncategorized</video:category>
19
+ <video:publication_date>2019-04-23T12:47:37+00:00</video:publication_date>
20
+ <video:player_loc>http://example.org/?p=4/fvp3</video:player_loc>
21
+ </video:video>
22
+ <video:video>
23
+ <video:thumbnail_loc>https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg</video:thumbnail_loc>
24
+ <video:title>Fire</video:title>
25
+ <video:description>Paragraph after first player</video:description>
26
+ <video:category>Uncategorized</video:category>
27
+ <video:publication_date>2019-04-23T12:47:37+00:00</video:publication_date>
28
+ <video:content_loc>https://foliovision.com/videos/dominika-960-31.mp4</video:content_loc>
29
+ </video:video>
30
+ <video:video>
31
+ <video:thumbnail_loc>http://example.org/wp-content/plugins/Users/martinv/github/fv-wordpress-flowplayer/css/img/play_white.png</video:thumbnail_loc>
32
+ <video:title>Video Sitemap Test 3</video:title>
33
+ <video:description>Paragraph after second player</video:description>
34
+ <video:category>Uncategorized</video:category>
35
+ <video:publication_date>2019-04-23T12:47:37+00:00</video:publication_date>
36
+ <video:content_loc>https://cdn.site.com/video-2.mp4</video:content_loc>
37
+ </video:video>
38
+ <video:video>
39
+ <video:thumbnail_loc>https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg</video:thumbnail_loc>
40
+ <video:title>The Best of Chopin</video:title>
41
+ <video:description>Paragraph after third player</video:description>
42
+ <video:category>Uncategorized</video:category>
43
+ <video:publication_date>2019-04-23T12:47:37+00:00</video:publication_date>
44
+ <video:player_loc>http://example.org/?p=4/fvp-2</video:player_loc>
45
+ </video:video>
46
+ </url>
47
+ </urlset>
48
+ <!-- XML Sitemap generated by FV Player -->
test/integration/frontend/videoPositionSavingTest.php CHANGED
@@ -68,13 +68,12 @@ final class FV_Player_videoPositionSavingTestCase extends FV_Player_Ajax_UnitTes
68
  $post = get_post( $this->postID );
69
  $output = apply_filters( 'the_content', $post->post_content );
70
 
71
- $expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
72
  <div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
73
- <div class=\"fp-ui\"><div class=\"fp-play fp-visible\"><a class=\"fp-icon fp-playbtn\"></a></div></div>
74
  <div class='fvp-share-bar'><ul class=\"fvp-sharing\">
75
  <li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
76
- <li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
77
- <li><a class=\"sharing-google\" href=\"https://plus.google.com/share?url=\" target=\"_blank\"></a></li>
78
  <li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
79
  </div>
80
  <div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
@@ -126,13 +125,12 @@ final class FV_Player_videoPositionSavingTestCase extends FV_Player_Ajax_UnitTes
126
  $post = get_post( $this->postID );
127
  $output = apply_filters( 'the_content', $post->post_content );
128
 
129
- $expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
130
  <div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
131
- <div class=\"fp-ui\"><div class=\"fp-play fp-visible\"><a class=\"fp-icon fp-playbtn\"></a></div></div>
132
  <div class='fvp-share-bar'><ul class=\"fvp-sharing\">
133
  <li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
134
- <li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
135
- <li><a class=\"sharing-google\" href=\"https://plus.google.com/share?url=\" target=\"_blank\"></a></li>
136
  <li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
137
  </div>
138
  <div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
68
  $post = get_post( $this->postID );
69
  $output = apply_filters( 'the_content', $post->post_content );
70
 
71
+ $expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" data-fv-embed=\"?fv_player_embed=1\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
72
  <div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
73
+ <div class=\"fp-ui\"><noscript>Please enable JavaScript</noscript><div class=\"fp-preload\"><b></b><b></b><b></b><b></b></div></div>
74
  <div class='fvp-share-bar'><ul class=\"fvp-sharing\">
75
  <li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
76
+ <li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
 
77
  <li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
78
  </div>
79
  <div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
125
  $post = get_post( $this->postID );
126
  $output = apply_filters( 'the_content', $post->post_content );
127
 
128
+ $expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" data-fv-embed=\"?fv_player_embed=1\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
129
  <div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
130
+ <div class=\"fp-ui\"><noscript>Please enable JavaScript</noscript><div class=\"fp-preload\"><b></b><b></b><b></b><b></b></div></div>
131
  <div class='fvp-share-bar'><ul class=\"fvp-sharing\">
132
  <li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
133
+ <li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
 
134
  <li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
135
  </div>
136
  <div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
test/integration/frontend/videoSitemapTest.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
4
+
5
+ /**
6
+ * Tests WordPress integration of playlists without any advertisements present
7
+ * in the HTML markup.
8
+ */
9
+ final class FV_Player_Video_SitemapTest extends FV_Player_UnitTestCase {
10
+
11
+ var $import_ids = array();
12
+
13
+ public function setUp() {
14
+ parent::setUp();
15
+
16
+ global $FV_Player_Db;
17
+ $this->import_ids[] = $FV_Player_Db->import_player_data( false, false, json_decode( file_get_contents(dirname(__FILE__).'/player-data.json'), true) );
18
+ $this->import_ids[] = $FV_Player_Db->import_player_data( false, false, json_decode( file_get_contents(dirname(__FILE__).'/player-data-youtube.json'), true) );
19
+
20
+ // create a post with playlist shortcode
21
+ $this->post_id_testEndActions= $this->factory->post->create( array(
22
+ 'post_title' => 'Video Sitemap Test',
23
+ 'post_content' => <<< HTML
24
+ Here is the intro paragraph
25
+
26
+ [fvplayer src="https://cdn.site.com/video.mp4"]
27
+
28
+ Some video with embed disabled
29
+
30
+ [fvplayer src="https://cdn.site.com/video.mp4" embed="false"]
31
+
32
+ Let's try a YouTube video:
33
+
34
+ [fvplayer src="https://www.youtube.com/watch?v=Rb0UmrCXxVA"]
35
+
36
+ Paragraph after first player
37
+
38
+ [fvplayer id="1"]
39
+
40
+ Paragraph after second player
41
+
42
+ [fvplayer src="https://cdn.site.com/video-2.mp4"]
43
+
44
+ Paragraph after third player
45
+
46
+ [fvplayer id="2"]
47
+ HTML
48
+ ) );
49
+
50
+ }
51
+
52
+ public function testVideoSitemap() {
53
+
54
+ ob_start();
55
+ global $FV_Xml_Video_Sitemap;
56
+ $FV_Xml_Video_Sitemap->fv_generate_video_sitemap_do( date('Y'), date('m') );
57
+ $output = ob_get_clean();
58
+
59
+ $this->assertEquals( $this->fix_newlines( file_get_contents(dirname(__FILE__).'/video-sitemap.xml') ), $this->fix_newlines($output) );
60
+ }
61
+
62
+ public function tearDown() {
63
+ global $FV_Player_Db;
64
+
65
+ // when you delete a player loaded from cache it won't remove the player and player meta, so we do a hard cache purge here! The player ID is not passed in contructor when loading from cache.
66
+ $FV_Player_Db->setPlayersCache( array() );
67
+ $FV_Player_Db->setPlayerMetaCache( array() );
68
+ $FV_Player_Db->setVideosCache( array() );
69
+ $FV_Player_Db->setVideoMetaCache( array() );
70
+
71
+ foreach( $this->import_ids AS $id ) {
72
+ $player = new FV_Player_Db_Player( $id, array() );
73
+ $player->delete();
74
+ }
75
+ }
76
+
77
+ }
test/integration/fv-player-unittest-case.php CHANGED
@@ -45,6 +45,8 @@ abstract class FV_Player_UnitTestCase extends WP_UnitTestCase {
45
 
46
  $html = preg_replace( '~\?ver=[0-9\.]+~', '?ver=1.2.3', $html);
47
 
 
 
48
  return $html;
49
  }
50
 
45
 
46
  $html = preg_replace( '~\?ver=[0-9\.]+~', '?ver=1.2.3', $html);
47
 
48
+ $html = preg_replace( '~<video:publication_date>(.*?)</video:publication_date>~', '<video:publication_date>2019-04-23T09:44:33+00:00</video:publication_date>', $html);
49
+
50
  return $html;
51
  }
52
 
test/unit/controller/frontendTest.php CHANGED
@@ -109,15 +109,6 @@ Localizing flowplayer with fv_flowplayer_conf = Array
109
  [fullscreen] => 1
110
  [swf] => fv-wordpress-flowplayer/flowplayer/flowplayer.swf?ver=1.2.3.4
111
  [swfHls] => fv-wordpress-flowplayer/flowplayer/flowplayerhls.swf?ver=1.2.3.4
112
- [embed] => Array
113
- (
114
- [library] => fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js
115
- [script] => fv-wordpress-flowplayer/flowplayer/embed.min.js
116
- [skin] => fv-wordpress-flowplayer/css/flowplayer.css
117
- [swf] => fv-wordpress-flowplayer/flowplayer/flowplayer.swf?ver=1.2.3.4
118
- [swfHls] => fv-wordpress-flowplayer/flowplayer/flowplayerhls.swf?ver=1.2.3.4
119
- )
120
-
121
  [speeds] => Array
122
  (
123
  [0] => 0.25
109
  [fullscreen] => 1
110
  [swf] => fv-wordpress-flowplayer/flowplayer/flowplayer.swf?ver=1.2.3.4
111
  [swfHls] => fv-wordpress-flowplayer/flowplayer/flowplayerhls.swf?ver=1.2.3.4
 
 
 
 
 
 
 
 
 
112
  [speeds] => Array
113
  (
114
  [0] => 0.25
view/admin.php CHANGED
@@ -25,12 +25,13 @@ delete_option('fv_wordpress_flowplayer_deferred_notices');
25
 
26
  function fv_flowplayer_admin_ads() {
27
  global $fv_fp;
 
28
  ?>
29
  <table class="form-table2">
30
  <tr>
31
  <td colspan="2">
32
  <label for="ad"><?php _e('Default Ad Code', 'fv-wordpress-flowplayer'); ?>:</label><br />
33
- <textarea id="ad" name="ad" class="large-text code"><?php echo esc_textarea($fv_fp->_get_option('ad')); ?></textarea>
34
  </td>
35
  </tr>
36
  <tr>
@@ -632,9 +633,7 @@ function fv_flowplayer_admin_integrations() {
632
  <input type="hidden" name="integrations[optimizepress2]" value="false" />
633
  <input type="checkbox" name="integrations[optimizepress2]" id="optimizepress2" value="true" <?php if( $fv_fp->_get_option( array( 'integrations', 'optimizepress2' ) ) ) echo 'checked="checked"'; ?> />
634
  </td>
635
- </tr>-->
636
-
637
- <?php $fv_fp->_get_checkbox(__('Use iframe embedding', 'fv-wordpress-flowplayer'), array( 'integrations', 'embed_iframe' ), __('Beta version! New kind of embedding which supports all the features in embedded player.', 'fv-wordpress-flowplayer') ); ?>
638
 
639
  <?php do_action('fv_flowplayer_admin_integration_options_after'); ?>
640
  <tr>
@@ -1614,7 +1613,7 @@ function fv_flowplayer_admin_rollback() {
1614
  ?>
1615
  <p>Are you having issues with version <?php echo $fv_wp_flowplayer_ver; ?>?</p>
1616
  <p>You can go back to the last version without FV Player Database here:</p>
1617
- <p><a href="<?php echo wp_nonce_url( admin_url($base.'7.2.7.727'), 'fv-player-rollback' ); ?>" class="button">Reinstall version 7.2.7.727</a></p>
1618
  <p>You can reinstall the last FV Player 6 here:</p>
1619
  <p><a href="<?php echo wp_nonce_url( admin_url($base.'6.6.6'), 'fv-player-rollback' ); ?>" class="button">Reinstall version 6.6.6</a></p>
1620
  <?php
25
 
26
  function fv_flowplayer_admin_ads() {
27
  global $fv_fp;
28
+ $lines = substr_count( $fv_fp->_get_option('ad'), "\n" ) + 2;
29
  ?>
30
  <table class="form-table2">
31
  <tr>
32
  <td colspan="2">
33
  <label for="ad"><?php _e('Default Ad Code', 'fv-wordpress-flowplayer'); ?>:</label><br />
34
+ <textarea id="ad" name="ad" class="large-text code" rows="<?php echo $lines; ?>"><?php echo esc_textarea($fv_fp->_get_option('ad')); ?></textarea>
35
  </td>
36
  </tr>
37
  <tr>
633
  <input type="hidden" name="integrations[optimizepress2]" value="false" />
634
  <input type="checkbox" name="integrations[optimizepress2]" id="optimizepress2" value="true" <?php if( $fv_fp->_get_option( array( 'integrations', 'optimizepress2' ) ) ) echo 'checked="checked"'; ?> />
635
  </td>
636
+ </tr>-->
 
 
637
 
638
  <?php do_action('fv_flowplayer_admin_integration_options_after'); ?>
639
  <tr>
1613
  ?>
1614
  <p>Are you having issues with version <?php echo $fv_wp_flowplayer_ver; ?>?</p>
1615
  <p>You can go back to the last version without FV Player Database here:</p>
1616
+ <p><a href="<?php echo wp_nonce_url( admin_url($base.'7.2.8.727'), 'fv-player-rollback' ); ?>" class="button">Reinstall version 7.2.8.727</a></p>
1617
  <p>You can reinstall the last FV Player 6 here:</p>
1618
  <p><a href="<?php echo wp_nonce_url( admin_url($base.'6.6.6'), 'fv-player-rollback' ); ?>" class="button">Reinstall version 6.6.6</a></p>
1619
  <?php