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();