PluginProbe
FV Player 8 / 8.1
FV Player 8 v8.1
trunk 8.0.18 8.0.19 8.0.20 8.0.21 8.0.25 8.0.27 8.1 8.1.3
fv-player / view / admin.php

admin.php in FV Player 8 8.1, at view/admin.php

2,585 lines 142.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /* FV Player - HTML5 video player
3 Copyright (C) 2013 Foliovision
4
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19 if ( ! defined( 'ABSPATH' ) ) {
20 exit;
21 }
22
23 // Set the FV Player wp-admin menu item to be open
24 ?>
25 <script>
26 var fv_player_menu_item = document.getElementById('toplevel_page_fv_player');
27 if( fv_player_menu_item && fv_player_menu_item.classList ) {
28 fv_player_menu_item.classList.add('wp-menu-open');
29 fv_player_menu_item.classList.add('wp-has-current-submenu');
30 fv_player_menu_item.classList.remove('wp-not-current-submenu');
31 }
32 </script>
33 <?php
34
35 /**
36 * Displays administrator backend.
37 */
38
39
40 delete_option('fv_wordpress_flowplayer_deferred_notices');
41
42 function fv_flowplayer_admin_overlay() {
43 global $fv_fp;
44 $lines = substr_count( $fv_fp->_get_option('overlay'), "\n" ) + 2;
45 ?>
46 <table class="form-table2">
47 <tr>
48 <td colspan="2">
49 <label for="overlay"><?php esc_html_e( 'Default Overlay Code', 'fv-player' ); ?>:</label><br />
50 <textarea id="overlay" name="overlay" class="large-text code" rows="<?php echo intval( $lines ); ?>"><?php echo esc_textarea($fv_fp->_get_option('overlay')); ?></textarea>
51 </td>
52 </tr>
53 <tr>
54 <td colspan="2"><label for="overlay_width"><?php esc_html_e( 'Default set size', 'fv-player' );?> [px]:</label>
55 <label for="overlay_width">W:</label>&nbsp; <input type="text" name="overlay_width" id="overlay_width" value="<?php echo intval( $fv_fp->_get_option('overlay_width') ); ?>" class="small" />
56 <label for="overlay_height">H:</label>&nbsp;<input type="text" name="overlay_height" id="overlay_height" value="<?php echo intval( $fv_fp->_get_option('overlay_height') ); ?>" class="small" />
57 <label for="overlayTextColor"><?php esc_html_e( 'Overlay text', 'fv-player' );?></label> <input class="color small" type="text" name="overlayTextColor" id="overlayTextColor" value="<?php echo esc_attr( $fv_fp->_get_option('overlayTextColor') ); ?>" />
58 <label for="overlayLinksColor"><?php esc_html_e( 'Overlay links', 'fv-player' );?></label> <input class="color small" type="text" name="overlayLinksColor" id="overlayLinksColor" value="<?php echo esc_attr( $fv_fp->_get_option('overlayLinksColor') ); ?>" />
59 </td>
60 </tr>
61 <tr>
62 <td>
63 <label for="overlay_show_after"><?php esc_html_e( 'Show After', 'fv-player' );?> [s]:</label>&nbsp; <input type="text" name="overlay_show_after" id="overlay_show_after" value="<?php echo intval( $fv_fp->_get_option('overlay_show_after') ); ?>" class="small" />
64 </td>
65 </tr>
66 <tr>
67 <td colspan="2">
68 <label for="overlay_css_select"><?php esc_html_e( 'Overlay CSS', 'fv-player' ); ?>:</label>
69 <a href="#" onclick="jQuery('.overlay_css_wrap').show(); jQuery(this).hide(); return false"><?php esc_html_e( 'Show styling options', 'fv-player' ); ?></a>
70 <div class="overlay_css_wrap" style="display: none; ">
71 <select id="overlay_css_select">
72 <option value=""><?php esc_html_e( 'Select your preset', 'fv-player' ); ?></option>
73 <option value="<?php echo esc_attr($fv_fp->overlay_css_default); ?>"<?php if( strcmp( preg_replace('~[^a-z0-9\.{}:;]~','',$fv_fp->overlay_css_default), preg_replace('~[^a-z0-9\.{}:;]~','',$fv_fp->_get_option('overlay_css') )) == 0 ) echo ' selected="selected"'; ?>><?php esc_html_e( 'Default (white, centered above the control bar)', 'fv-player' ); ?></option>
74 <option value="<?php echo esc_attr($fv_fp->overlay_css_bottom); ?>"<?php if( strcmp( preg_replace('~[^a-z0-9\.{}:;]~','',$fv_fp->overlay_css_bottom), preg_replace('~[^a-z0-9\.{}:;]~','',$fv_fp->_get_option('overlay_css') )) == 0 ) echo ' selected="selected"'; ?>><?php esc_html_e( 'White, centered at the bottom of the video', 'fv-player' ); ?></option>
75 </select>
76 <br />
77 <textarea rows="5" name="overlay_css" id="overlay_css" class="large-text code"><?php echo esc_textarea($fv_fp->_get_option('overlay_css')); ?></textarea>
78 <p class="description"><?php esc_html_e( '(Hint: put .wpfp_custom_ad_content before your own CSS selectors)', 'fv-player' ); ?></p>
79 <script type="text/javascript">
80 jQuery('#overlay_css_select').on('change', function() {
81 if( jQuery('#overlay_css_select option:selected').val().length > 0 && jQuery('#overlay_css_select option:selected').val() != jQuery('#overlay_css').val() && confirm('Are you sure you want to apply the preset?') ) {
82 jQuery('#overlay_css').val( jQuery('#overlay_css_select option:selected').val() );
83 }
84 } );
85 </script>
86 </div>
87 </td>
88 </tr>
89 <tr>
90 <td colspan="4">
91 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
92 </td>
93 </tr>
94 </table>
95 <?php
96 }
97
98
99 function fv_flowplayer_admin_amazon_options() {
100 global $fv_fp;
101
102 //$config = w3_instance('W3_Config');
103 //var_dump($config->get_boolean('pgcache.reject.logged') );
104
105 /*if( function_exists('w3_instance') && class_exists('W3_Config') ) {
106 $config = w3_instance('W3_Config');
107 }
108
109 $message = '';
110 if( is_plugin_active('w3-total-cache/w3-total-cache.php') && ( $config instanceof W3_Config ) && !$config->get_boolean('pgcache.reject.logged') ) {
111 $message = 'W3 Total Cache appears to be enabled, please turn on <code> Performance -> Page Cache -> "Don\'t cache pages for logged in users"</code>. ';
112 } else if( is_plugin_active('w3-total-cache/w3-total-cache.php') ) {
113 $message = 'W3 Total Cache appears to be enabled, please make sure that <code> Performance -> Page Cache -> "Don\'t cache pages for logged in users" </code> is on.';
114 } else if( is_plugin_active('wp-super-cache/wp-cache.php') ) {
115 $message = 'WP Super Cache';
116 }
117
118 $message .= ' Otherwise Amazon S3 protected content might be not loading for your members.';
119
120 var_dump($message);*/
121 ?>
122 <table class="form-table2">
123 <tr>
124 <td colspan="2">
125 <p><?php esc_html_e( 'Secured Amazon S3 URLs are recommended for member-only sections of the site. We check the video length and make sure the link expiration time is big enough for the video to buffer properly.', 'fv-player' ); ?></p>
126 <p><?php esc_html_e( 'If you use a cache plugin (such as Hyper Cache, WP Super Cache or W3 Total Cache), we recommend that you set the "Default Expiration Time" to twice as much as your cache timeout and check "Force the default expiration time". That way the video length won\'t be accounted and the video source URLs in your cached pages won\'t expire. Read more in the', 'fv-player' ); ?> <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/secure-amazon-s3-guide#wp-cache" target="_blank"><?php esc_html_e( 'Using Amazon S3 secure content in FV Player guide', 'fv-player' ); ?></a>.</p>
127 </td>
128 </tr>
129 <tr>
130 <td class="first"><label for="amazon_expire"><?php esc_html_e( 'Default Expiration Time [minutes]', 'fv-player' ); ?> (<abbr title="<?php esc_html_e( 'Each video duration is stored on post save and then used as the expire time. If the duration is not available, this value is used.', 'fv-player' ); ?>">?</abbr>):</label></td>
131 <td>
132 <input type="text" size="40" name="amazon_expire" id="amazon_expire" value="<?php echo intval( $fv_fp->_get_option('amazon_expire') ); ?>" />
133 </td>
134 </tr>
135
136 <?php $fv_fp->_get_checkbox(__( 'Force the default expiration time', 'fv-player' ), 'amazon_expire_force'); ?>
137 <?php
138 $can_use_aws_sdk = version_compare(phpversion(),'7.4') != -1;
139
140 $fv_fp->_get_checkbox( array(
141 'name' => __( 'Amazon S3 Browser', 'fv-player' ).' (beta)',
142 'key' => 's3_browser',
143 'help' => !$can_use_aws_sdk ?
144 __( 'This function requires PHP >= 7.4, please contact your web host support.' , 'fv-player' )
145 : __( 'Show Amazon S3 Browser in the "Add Video" dialog.' , 'fv-player' ),
146 'disabled' => !$can_use_aws_sdk
147 ) ); ?>
148
149 <?php do_action('fv_player_admin_amazon_options'); ?>
150 <?php
151 $count = 0;
152 foreach( $fv_fp->_get_option('amazon_bucket') AS $key => $item ) :
153 $count++;
154 $sRegion = $fv_fp->_get_option( array( 'amazon_region', $key ) );
155 ?>
156 <tr class="amazon-s3-<?php echo intval( $count ); ?>">
157 <td><label for="amazon_bucket[]"><?php esc_html_e( 'Amazon Bucket', 'fv-player' ); ?> (<abbr title="<?php esc_html_e( 'We recommend that you simply put all of your protected video into a single bucket and enter its name here. All matching videos will use the protected URLs.', 'fv-player' ); ?>">?</abbr>):</label></td>
158 <td><input id="amazon_bucket[]" name="amazon_bucket[]" type="text" value="<?php echo esc_attr($item); ?>" /></td>
159 </tr>
160 <tr class="amazon-s3-<?php echo intval( $count ); ?>">
161 <td><label for="amazon_region[]"><?php esc_html_e( 'Region', 'fv-player' ); ?></td>
162 <td>
163 <select id="amazon_region[]" name="amazon_region[]">
164 <option value=""><?php esc_html_e( 'Select the region', 'fv-player' ); ?></option><?php
165
166 foreach (fv_player_get_aws_regions() as $aws_region_id => $aws_region_name) {
167 ?>
168 <option value="<?php echo esc_attr( $aws_region_id ); ?>"<?php if( $sRegion == $aws_region_id ) echo " selected"; ?>><?php echo esc_html( $aws_region_name .' ('. $aws_region_id.')' ); ?></option>
169 <?php
170 }
171
172 ?>
173 </select>
174 </td>
175 </tr>
176 <tr class="amazon-s3-<?php echo intval( $count ); ?>">
177 <td><label for="amazon_key[]"><?php esc_html_e( 'Access Key ID', 'fv-player' ); ?>:</label></td>
178 <td><input id="amazon_key[]" name="amazon_key[]" type="text" value="<?php echo esc_attr( $fv_fp->_get_option( array( 'amazon_key', $key ) ) ); ?>" /></td>
179 </tr>
180 <tr class="amazon-s3-<?php echo intval( $count ); ?>">
181 <?php
182 $secret = !function_exists('FV_Player_Pro') ||
183 ( function_exists('FV_Player_Pro') && version_compare( str_replace( '.beta','',FV_Player_Pro()->version ),'7.5.25.728', '>=') );
184
185 $secret_key = "_is_secret_amazon_secret[]";
186 $val = $fv_fp->_get_option( array( 'amazon_secret', $key ) ) ;
187
188 if( $secret ) {
189 $censored_val = $fv_fp->_get_censored_val( $val );
190 $val = '';
191 }
192
193 ?>
194 <td><label for="amazon_secret[]"><?php esc_html_e( 'Secret Access Key', 'fv-player' ); ?>:</label></td>
195 <td><input <?php if($secret && !empty($censored_val)) echo 'style="display: none;"' ?> id="amazon_secret[]" name="amazon_secret[]" type="text" value="<?php echo esc_attr( $val ); ?>" />
196 <?php if( $secret ): ?>
197 <input name="<?php echo esc_attr($secret_key); ?>" value="<?php if(empty($censored_val)) {echo '0';} else {echo '1';} ?>" type="hidden" />
198 <?php if(!empty($censored_val)): ?>
199 <code class="secret-preview"><?php echo esc_attr( $censored_val ); ?></code>
200 <a href="#" data-is-empty="0" data-setting-change="<?php echo esc_attr($secret_key.'-index-'.$key); ?>" >Change</a>
201 <?php endif; ?>
202 <?php endif; ?>
203 </td>
204 </tr>
205 <tr class="amazon-s3-<?php echo intval( $count ); ?>">
206 <td colspan="2">
207 <div class="alignright fv_fp_amazon_remove">
208 <a href="#" onclick="fv_fp_amazon_s3_remove(this); return false"><?php esc_html_e( 'remove', 'fv-player' ); ?></a>
209 </div>
210 <div class="clear"></div>
211 <hr style="border: 0; border-top: 1px solid #ccc;" />
212 </td>
213 </tr>
214 <?php
215 endforeach;
216 ?>
217 <tr class="amazon-s3-last"><td colspan="2"></td></tr>
218 <tr>
219 <td colspan="4">
220 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
221 <input type="button" id="amazon-s3-add" class="button" value="<?php esc_attr_e( 'Add more Amazon S3 secure buckets', 'fv-player' ); ?>" />
222 <a class="button fv-help-link" href="https://foliovision.com/player/video-hosting/amazon-s3-guide" target="_blank">Help</a>
223 </td>
224 </tr>
225 </table>
226 <?php
227 }
228
229
230 function fv_flowplayer_admin_default_options() {
231 global $fv_fp;
232 ?>
233 <style>
234 p.description { font-style: normal; }
235 </style>
236 <table class="form-table2">
237 <tr>
238 <td><label for="width"><?php esc_html_e( 'Default Video Size', 'fv-player' ); ?>:</label></td>
239 <td>
240 <p class="description">
241 <label for="width"><?php esc_html_e( 'Width', 'fv-player' ); ?>:</label>&nbsp;<input type="text" class="small" name="width" id="width" value="<?php echo esc_attr( $fv_fp->_get_option('width') ); ?>" />
242 <label for="height"><?php esc_html_e( 'Height', 'fv-player' ); ?>:</label>&nbsp;<input type="text" class="small" name="height" id="height" value="<?php echo esc_attr( $fv_fp->_get_option('height') ); ?>" />
243 <?php esc_html_e( 'Enter values in pixels or 100%.', 'fv-player' ); ?>
244 </p>
245 </td>
246 </tr>
247 <tr>
248 <td><label for="volume"><?php esc_html_e( 'Default Volume', 'fv-player' ); ?>:</label></td>
249 <td>
250 <p class="description">
251 <input id="volume" name="volume" type="range" min="0" max="1" step="0.1" value="<?php echo esc_attr( $fv_fp->_get_option('volume') ); ?>" class="medium" />
252 </p>
253 </td>
254 </tr>
255
256 <?php $fv_fp->_get_checkbox(__( 'Disable Admin Video Checker', 'fv-player' ), 'disable_videochecker', __( 'Checks your video encoding when you open a post with video as admin. Notifies you about possible playback issues.', 'fv-player' ) ); ?>
257 <?php $fv_fp->_get_checkbox(__( 'Disable Playlist Autoadvance', 'fv-player' ), 'playlist_advance', __( 'Playlist won\'t play the next video automatically.', 'fv-player' ) ); ?>
258
259
260 <?php if( $fv_fp->_get_option('rtmp') ) : ?>
261 <tr>
262 <td><label for="rtmp"><?php esc_html_e( 'Flash Streaming Server (deprecated)', 'fv-player' ); ?>:</label></td>
263 <td>
264 <p class="description">
265 <input type="text" name="rtmp" id="rtmp" value="<?php echo esc_attr( $fv_fp->_get_option('rtmp') ); ?>" placeholder="<?php esc_attr_e( 'Enter your default RTMP streaming server (Amazon CloudFront domain).', 'fv-player' ); ?>" />
266 </p>
267 </td>
268 </tr>
269 <?php endif; ?>
270
271 <?php $fv_fp->_get_checkbox(__( 'Force HD Streaming', 'fv-player' ), 'hd_streaming', __( 'Use HD quality for HLS/MPEG-DASH even on slow connections.', 'fv-player' ), __( 'User can still switch to lower quality by hand. Doesn\'t work on iPhones.', 'fv-player' ) ); ?>
272
273 <tr>
274 <td><label for="googleanalytics"><?php esc_html_e( 'Google Analytics ID', 'fv-player' ); ?>:</label></td>
275 <td>
276 <p class="description">
277 <input type="text" name="googleanalytics" id="googleanalytics" value="<?php echo esc_attr( $fv_fp->_get_option('googleanalytics') ); ?>" placeholder="<?php esc_attr_e( 'Will be automatically loaded when playing a video.', 'fv-player' ); ?>" />
278 </p>
279 </td>
280 </tr>
281
282 <tr>
283 <td><label for="matomo_domain"><?php esc_html_e( 'Matomo/Piwik Tracking', 'fv-player' ); ?>:</label></td>
284 <td>
285 <p class="description">
286 <input type="text" name="matomo_domain" id="matomo_domain" value="<?php echo esc_attr( $fv_fp->_get_option('matomo_domain') ); ?>" placeholder="<?php esc_attr_e( 'matomo.your-domain.com', 'fv-player' ); ?>" class="large" />
287 <input type="text" name="matomo_site_id" id="matomo_site_id" value="<?php echo esc_attr( $fv_fp->_get_option('matomo_site_id') ); ?>" placeholder="<?php esc_attr_e( 'Site ID', 'fv-player' ); ?>" class="small" />
288 </p>
289 </td>
290 </tr>
291
292 <?php $fv_fp->_get_checkbox(__( 'Multiple video playback', 'fv-player' ), 'multiple_playback', __( 'Allows multiple players to play at once. Only one player remains audible.', 'fv-player' ) ); ?>
293
294 <tr>
295 <td><label for="liststyle"><?php esc_html_e( 'Playlist style', 'fv-player' ); ?>:</label></td>
296 <td colspan="3">
297 <p class="description">
298 <?php
299 $value = $fv_fp->_get_option('liststyle');
300 ?>
301 <select id="liststyle" name="liststyle">
302 <?php
303 foreach(
304 array(
305 'horizontal' => __( 'Horizontal', 'fv-player' ),
306 'tabs' => __( 'Tabland', 'fv-player' ),
307 'prevnext' => __( 'Big arrows (deprecated)', 'fv-player' ),
308 'vertical' => __( 'Vertical', 'fv-player' ),
309 'slider' => __( 'Scrollslider', 'fv-player' ),
310 'season' => __( 'Episodes', 'fv-player' ),
311 'polaroid' => __( 'Polaroid', 'fv-player' ),
312 'text' => __( 'Text', 'fv-player' ),
313 'version-one' => __( 'Sliderland', 'fv-player' ),
314 'version-two' => __( 'Sliderbar', 'fv-player' ),
315 ) as $style => $name
316 ) {
317
318 // Do not offer "Big arrows" if it's not already saved.
319 if ( 'prevnext' === $style && strcmp( $value, $style ) !== 0 ) {
320 continue;
321 }
322 ?>
323 <option value="<?php echo esc_attr( $style ); ?>"<?php if( $value === $style ) echo ' selected="selected"'; ?>><?php echo esc_html( $name ); ?></option>
324 <?php
325 }
326 ?>
327 </select>
328 <?php esc_html_e( 'Enter your default playlist style here', 'fv-player' ); ?>
329 </p>
330 </td>
331 </tr>
332
333 <?php //$fv_fp->_get_checkbox(__( 'Popup Box', 'fv-player' ), 'popupbox', __( 'Shows a generic "Would you like to replay the video?" message at the end of each video.', 'fv-player' ) ); ?>
334
335 <tr>
336 <td><label for="sharing_text"><?php esc_html_e( 'Sharing Text', 'fv-player' ); ?>:</label></td>
337 <td>
338 <p class="description">
339 <input type="text" name="sharing_email_text" id="sharing_email_text" value="<?php echo esc_attr( $fv_fp->_get_option('sharing_email_text') ); ?>" placeholder="<?php esc_attr_e( 'Check out the amazing video here', 'fv-player' ); ?>" />
340 </p>
341 </td>
342 </tr>
343 <tr>
344 <td><label for="splash"><?php esc_html_e( 'Splash Image', 'fv-player' ); ?>:</label></td>
345 <td>
346 <input type="text" name="splash" id="splash" value="<?php echo esc_attr( $fv_fp->_get_option('splash') ); ?>" class="large" placeholder="<?php esc_attr_e( 'Default which will be used for any player without its own splash image.', 'fv-player' ); ?>" />
347 <input id="upload_image_button" class="upload_image_button button no-margin small" type="button" value="<?php esc_attr_e( 'Upload Image', 'fv-player' ); ?>" alt="Select default Splash Screen" /></td>
348 </tr>
349
350 <?php $fv_fp->_get_checkbox(__( 'Subtitles On By Default', 'fv-player' ), 'subtitleOn', __( 'Normally you have to hit a button in controlbar to turn on subtitles.', 'fv-player' ) ); ?>
351
352 <?php do_action('fv_flowplayer_admin_default_options_after'); ?>
353 </table>
354 <table class="form-table2">
355 <tr>
356 <td colspan="4">
357 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
358 <a class="button fv-help-link" href="https://foliovision.com/player/settings/sitewide-fv-player-defaults" target="_blank">Help</a>
359 <a href="#skin-tab-controls" class="settings-section-link">Looking for controls settings?</a>
360 </td>
361 </tr>
362 </table>
363 <script>
364 jQuery(document).ready(function($) {
365 var fv_flowplayer_uploader;
366 var fv_flowplayer_uploader_button;
367
368 $(document).on( 'click', '.upload_image_button', function(e) {
369 e.preventDefault();
370
371 fv_flowplayer_uploader_button = jQuery(this);
372 jQuery('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
373 fv_flowplayer_uploader_button.parents('tr').find('input[type=text]').addClass('fv_flowplayer_target' );
374
375 //If the uploader object has already been created, reopen the dialog
376 if (fv_flowplayer_uploader) {
377 fv_flowplayer_uploader.open();
378 return;
379 }
380
381 //Extend the wp.media object
382 fv_flowplayer_uploader = wp.media.frames.file_frame = wp.media({
383 title: 'Pick the image',
384 button: {
385 text: 'Choose'
386 },
387 multiple: false
388 });
389
390 fv_flowplayer_uploader.on('open', function() {
391 jQuery('.media-frame-title h1').text(fv_flowplayer_uploader_button.attr('alt'));
392 });
393
394 //When a file is selected, grab the URL and set it as the text field's value
395 fv_flowplayer_uploader.on('select', function() {
396 attachment = fv_flowplayer_uploader.state().get('selection').first().toJSON();
397
398 $('.fv_flowplayer_target').val( attachment.url ).trigger('change');
399 $('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
400 });
401
402 //Open the uploader dialog
403 fv_flowplayer_uploader.open();
404
405 });
406
407 // no sorting of settings boxes please
408 var fv_player_no_sortable = setInterval( function() {
409 try {
410 jQuery('#normal-sortables').sortable( "disable" )
411
412 clearInterval(fv_player_no_sortable);
413 } catch(e) {}
414 }, 10 );
415
416 });
417 </script>
418 <div class="clear"></div>
419 <?php
420 }
421
422 function fv_flowplayer_admin_autoplay_and_preloading() {
423 global $fv_fp;
424 $value = $fv_fp->_get_option('autoplay_preload');
425 ?>
426 <style>
427 #fv_flowplayer_autoplay_and_preloading .descriptions {
428 float: right;
429 position: relative;
430 width: 50%;
431 }
432 #fv_flowplayer_autoplay_and_preloading [data-describe] {
433 display: none;
434 position: absolute;
435 top: 0;
436 }
437 </style>
438 <table class="form-table2">
439 <tr>
440 <td class="first"></td>
441 <td>
442 <?php
443 $radio_butons = array();
444 $radio_butons_descriptions = array();
445
446 foreach( array(
447 'false' => array(
448 'label' => __( 'Off', 'fv-player' )
449 ),
450 'preload' => array(
451 'label' => __( 'Video Preload', 'fv-player' ),
452 'description' => __( 'First 3 videos on page will preload (or 1 if it\'s HLS). Then it will play instantly when clicked.', 'fv-player' )
453 ),
454 'viewport' => array(
455 'label' => __( 'Autoplay Video in Viewport', 'fv-player' ),
456 'description' => __( 'Video will autoplay when the player is visible on page load or when user scrolls down to it. It will pause when no longer in browser viewport. The next video will start preloading in the background.', 'fv-player' )
457 ),
458 'sticky' => array(
459 'label' => __( 'Sticky Autoplay', 'fv-player' ),
460 'description' => __( 'The video will autoplay and become sticky - following user\'s scroll position.', 'fv-player' )
461 )
462 ) AS $key => $field ) {
463 $id = 'autoplay_preload_'.esc_attr($key);
464
465 $radio_button = '<input id="'.$id.'" type="radio" name="autoplay_preload" value="'.esc_attr($key).'"';
466 if( $value === $key || wp_json_encode($value) == $key ) { // use wp_json_encode as value can be boolean
467 $radio_button .= ' checked="checked"';
468 }
469 $radio_button .= ' />';
470 $radio_button .= '<label for="'.$id.'">'.$field['label'].'</label><br />';
471
472 $radio_butons[] = $radio_button;
473
474 if( !empty($field['description']) ) {
475 $radio_butons_descriptions[$key] = $field['description'];
476 }
477 }
478
479 echo '<div class="descriptions">';
480 foreach( $radio_butons_descriptions AS $key => $description ) {
481 echo '<p class="description" data-describe="' . esc_attr( $key ) . '">' . esc_html( $description ) . '</p>';
482 }
483 echo '</div>';
484
485 echo implode( $radio_butons );
486 ?>
487 </td>
488 </td>
489 </tr>
490 <?php do_action('fv_flowplayer_autoplay_and_preloading_inputs_after'); ?>
491 <tr>
492 <td colspan="4">
493 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
494 </td>
495 </tr>
496 </table>
497 <div class="clear"></div>
498
499 <script>
500 jQuery( function($) {
501 show_description_autoplay();
502
503 $('[name=autoplay_preload]' ).on( 'change', show_description_autoplay );
504
505 function show_description_autoplay() {
506 $( '#fv_flowplayer_autoplay_and_preloading [data-describe]' ).hide();
507 $( '#fv_flowplayer_autoplay_and_preloading [data-describe='+$('[name=autoplay_preload]:checked').val()+']' ).show();
508 }
509 } );
510 </script>
511 <?php
512 }
513
514 /*
515 * Setup Tab Description
516 */
517 function fv_flowplayer_admin_description() {
518 ?>
519 <table class="form-table">
520 <tr>
521 <td colspan="4">
522 <p>
523 <?php esc_html_e( 'FV Player is a free, easy-to-use, and complete solution for embedding', 'fv-player' ); ?>
524 <strong>MP4</strong>, <strong>WEBM</strong>, <strong>OGV</strong>, <strong>MOV</strong>
525 <?php esc_html_e( 'and', 'fv-player' ); ?>
526 <strong>FLV</strong>
527 <?php esc_html_e( 'videos into your posts or pages. With MP4 videos, FV Player offers 98&#37; coverage even on mobile devices.', 'fv-player' ); ?>
528 </p>
529 </td>
530 </tr>
531 </table>
532 <?php
533 }
534
535 /*
536 * Skin Tab Description
537 */
538 function fv_flowplayer_admin_description_skin() {
539 ?>
540 <table class="form-table">
541 <tr>
542 <td colspan="4">
543 <p>
544 <?php esc_html_e( 'You can customize the colors of the player to match your website.', 'fv-player' ); ?>
545 </p>
546 </td>
547 </tr>
548 </table>
549 <?php
550 }
551
552 /*
553 * Hosting Tab Description
554 */
555 function fv_flowplayer_admin_description_hosting() {
556 ?>
557 <table class="form-table">
558 <tr>
559 <td colspan="4">
560 <p>
561 <?php esc_html_e( 'Here you can enable and configure advanced hosting options.', 'fv-player' ); ?>
562 </p>
563 </td>
564 </tr>
565 </table>
566 <?php
567 }
568
569 /*
570 * Actions Tab Description
571 */
572 function fv_flowplayer_admin_description_actions() {
573 ?>
574 <table class="form-table">
575 <tr>
576 <td colspan="4">
577 <p>
578 <?php esc_html_e( 'Here you can configure ads and banners that will be shown in the video.', 'fv-player' ); ?>
579 </p>
580 </td>
581 </tr>
582 </table>
583 <?php
584 }
585
586 /*
587 * Actions Tab Description
588 */
589 function fv_flowplayer_admin_description_tools() {
590 ?>
591 <table class="form-table">
592 <tr>
593 <td colspan="4">
594 <p>
595 <?php esc_html_e( 'Maintenance tools and debug info.', 'fv-player' ); ?>
596 </p>
597 <p>
598 Need help with replacing video paths after migrating video from one CDN to another? Try the <a href="<?php echo admin_url('admin.php?page=fv_player_migration'); ?>" class="button">Migration Wizard</a>
599 </p>
600 </td>
601 </tr>
602 </table>
603 <?php
604 }
605
606 /*
607 * Video Ads Tab Description
608 */
609 function fv_flowplayer_admin_description_video_ads() {
610 ?>
611 <table class="form-table">
612 <tr>
613 <td colspan="4">
614 <p>
615 <?php echo wp_kses( __( 'Purchase <a href="https://foliovision.com/player/download" target="_blank"><b>FV Player Licence</b></a>, and you will be able to configure multiple, clickable Video Ads, that can be played before or after Your videos.', 'fv-player' ), array( 'a' => array( 'href' => array() ) ) ); ?>
616 </p>
617 <p>
618 <?php esc_html_e( 'You can configure video ads globally, or on a per video basis.', 'fv-player' ); ?>
619 </p>
620 <p>
621 <?php echo wp_kses( __( 'If you are interested in VAST or VPAID ads, then check out <a href="https://foliovision.com/player/vast" target="_blank"><b>FV Player VAST</b></a>.', 'fv-player' ), array( 'a' => array( 'href' => array() ) ) ); ?>
622 </p>
623 </td>
624 </tr>
625 </table>
626 <?php
627 }
628
629 function fv_flowplayer_admin_integrations() {
630 global $fv_fp;
631 ?>
632 <p><?php esc_html_e( 'Following options are suitable for web developers and programmers.', 'fv-player' ); ?></p>
633 <table class="form-table2">
634 <?php $fv_fp->_get_checkbox(__( 'Debug', 'fv-player' ), 'debug_log', __( 'Print debug messages to browser console.', 'fv-player' ) ); ?>
635 <?php $fv_fp->_get_checkbox(__( 'Disable database conversion', 'fv-player' ), 'disable_convert_db_save', __( 'Stop converting [fvplayer src="..."] shortcodes, [video] shortcodes, Vimeo and YouTube links to database-driven FV Player when post is saved.', 'fv-player' ) ); ?>
636 <?php $fv_fp->_get_checkbox(__( 'Disable saving skin CSS to a static file', 'fv-player' ), 'css_disable', __( 'Normally the player CSS configuration is stored in wp-content/fv-flowplayer-custom/style-{blog_id}.css.', 'fv-player' ), __('We do this to avoid a big style tag in your site &lt;head&gt;. Don\'t edit this file though, as it will be overwritten by plugin update or saving its options!', 'fv-player' )); ?>
637
638 <tr>
639 <td><label for="css_disable"><?php esc_html_e( 'Enable profile videos', 'fv-player' ).' (beta)'; ?>:</label></td>
640 <td>
641 <div class="description">
642 <input type="hidden" name="profile_videos_enable_bio" value="false" />
643 <input type="checkbox" name="profile_videos_enable_bio" id="profile_videos_enable_bio" value="true" <?php if( $fv_fp->_get_option('profile_videos_enable_bio') ) echo 'checked="checked"'; ?> />
644 <?php esc_html_e( 'Check your site carefully after enabling. Videos attached to the user profile will be showing as a part of the user bio.', 'fv-player' ); ?> <a href="#" class="show-more">(&hellip;)</a>
645 <div class="more">
646 <p><?php esc_html_e('This feature is designed for YouTube and Vimeo videos and works best for our licensed users who get these videos playing without YouTube or Vimeo branding.', 'fv-player'); ?></p>
647 <p><?php echo wp_kses( __('Some themes show author bio on the author post archive automatically (Genesis framework and others). Or you can also just put this code into your theme archive.php template, right before <code>while ( have_posts() )</code> is called:', 'fv-player'), array( 'code' => array() ) ); ?></p>
648 <blockquote>
649 <pre>
650 &lt;?php if ( is_author() &amp;&amp; get_the_author_meta( 'description' ) ) : ?&gt;
651 &lt;div class=&quot;author-info&quot;&gt;
652 &lt;div class=&quot;author-avatar&quot;&gt;
653 &lt;?php echo get_avatar( get_the_author_meta( 'user_email' ) ); ?&gt;
654 &lt;/div&gt;
655
656 &lt;div class=&quot;author-description&quot;&gt;
657 &lt;?php the_author_meta( 'description' ); ?&gt;
658 &lt;/div&gt;
659 &lt;/div&gt;
660 &lt;?php endif; ?&gt;
661 </pre>
662 </blockquote>
663 <p><?php esc_html_e('We will be adding integration for it for popular user profile plugins.', 'fv-player'); ?></p>
664
665 </div>
666 </div>
667 </td>
668 </tr>
669
670 <?php $fv_fp->_get_checkbox(__( 'Handle WordPress audio/video', 'fv-player' ), array( 'integrations', 'wp_core_video' ), 'Make sure shortcodes <code><small>[video]</small></code>, <code><small>[audio]</small></code> and <code><small>[playlist]</small></code>, the Gutenberg video block and the YouTube links use FV Player.', '' ); ?>
671 <?php $fv_fp->_get_checkbox(__( 'Load JavaScript everywhere', 'fv-player' ), 'js-everywhere', __( 'If you use some special JavaScript integration you might prefer this option.', 'fv-player' ), __( 'Otherwise our JavaScript only loads if the shortcode is found in any of the posts being currently displayed. Required if you load content using Ajax, like in various LMS systems.', 'fv-player' ) ); ?>
672 <?php $fv_fp->_get_checkbox(
673 array(
674 'name' => __( 'Optimize JavaScript loading', 'fv-player' ),
675 'key' => 'js-optimize',
676 'help' =>
677 flowplayer::is_wp_rocket_setting( 'delay_js' ) ?
678 sprintf( __( 'WP Rocket setting to <a href="%s" target="_blank">Delay JavaScript execution</a> is enabled, cannot use this setting.', 'fv-player' ), admin_url( 'options-general.php?page=wprocket#file_optimization' ) ) :
679 __( 'Helps with Google PageSpeed scores.', 'fv-player' ),
680 'more' => __( 'FV Player JavaScript will be only loaded once the user user start to use the page or on video tap.', 'fv-player' ),
681 'disabled' => flowplayer::is_wp_rocket_setting( 'delay_js' ),
682 )
683 ); ?>
684 <?php if( $fv_fp->_get_option('parse_commas') ) $fv_fp->_get_checkbox(__( 'Parse old shortcodes with commas', 'fv-player' ), 'parse_commas', __( 'Older versions of this plugin used commas to sepparate shortcode parameters.', 'fv-player' ), __( 'This option will make sure it works with current version. Turn this off if you have some problems with display or other plugins which use shortcodes.', 'fv-player' ) ); ?>
685 <?php $fv_fp->_get_checkbox(__( 'Parse Vimeo and YouTube links', 'fv-player' ), 'parse_comments', __( 'Affects comments, bbPress and BuddyPress. These links will be displayed as videos.', 'fv-player' ), __( 'This option makes most sense together with FV Player Pro as it embeds these videos using FV Player. Enables use of shortcodes in comments and bbPress.', 'fv-player' ) ); ?>
686 <?php if( $fv_fp->_get_option('postthumbnail') ) $fv_fp->_get_checkbox(__( 'Post Thumbnail', 'fv-player' ), 'postthumbnail', __( 'Setting a video splash screen from the media library will automatically make it the splash image if there is none.', 'fv-player' ) ); ?>
687 <?php if( $fv_fp->_get_option('engine') ) $fv_fp->_get_checkbox(__( 'Prefer Flash player by default', 'fv-player' ), 'engine', __( 'Provides greater compatibility.', 'fv-player' ), __( 'We use Flash for MP4 files in IE9-10 and M4V files in Firefox regardless of this setting.', 'fv-player' ) ); ?>
688 <?php if( $fv_fp->_get_option('rtmp-live-buffer') ) $fv_fp->_get_checkbox(__( 'RTMP bufferTime tweak (deprecated)', 'fv-player' ), 'rtmp-live-buffer', __( 'Use if your live streams are not smooth.', 'fv-player' ), __( 'Adobe <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#bufferTime">recommends</a> to set bufferTime to 0 for live streams, but if your stream is not smooth, you can use this setting.', 'fv-player' ) ); ?>
689
690 <!--<tr>
691 <td style="width: 350px"><label for="optimizepress2">Handle OptimizePress 2 videos (<abbr title="Following attributes are not currently supported: margin, border">?</abbr>):</label></td>
692 <td>
693 <input type="hidden" name="integrations[optimizepress2]" value="false" />
694 <input type="checkbox" name="integrations[optimizepress2]" id="optimizepress2" value="true" <?php if( $fv_fp->_get_option( array( 'integrations', 'optimizepress2' ) ) ) echo 'checked="checked"'; ?> />
695 </td>
696 </tr>-->
697
698 <?php do_action('fv_flowplayer_admin_integration_options_after'); ?>
699 <tr>
700 <td colspan="4">
701 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
702 <a class="button fv-help-link" href="https://foliovision.com/player/settings/integrations-compatibility-options" target="_blank">Help</a>
703 </td>
704 </tr>
705 </table>
706 <?php
707 }
708
709
710 function fv_flowplayer_admin_mobile() {
711 global $fv_fp;
712 ?>
713 <table class="form-table2">
714 <?php $fv_fp->_get_checkbox(__( 'Use native fullscreen on mobile', 'fv-player' ), 'mobile_native_fullscreen', __( 'Stops popups, ads or subtitles from working, but provides faster interface. We set this for Android < 4.4 and iOS < 7 automatically.', 'fv-player' ) ); ?>
715 <?php $fv_fp->_get_checkbox(__( 'Force fullscreen on mobile', 'fv-player' ), 'mobile_force_fullscreen', __( 'Video playback will start in fullscreen. iPhone with iOS < 10 always forces fullscreen for video playback.', 'fv-player' ) ); ?>
716 <?php
717 $fv_fp->_get_checkbox(__( 'Alternative iPhone fullscreen mode', 'fv-player' ), 'mobile_alternative_fullscreen', __( "Use if you see site elements such as floating header bar ovelaying the player when in fullscreen.", 'fv-player' ) );
718 ?>
719 <tr>
720 <td colspan="4">
721 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
722 <a class="button fv-help-link" href="https://foliovision.com/player/settings/mobile-settings-behaviors" target="_blank">Help</a>
723 </td>
724 </tr>
725 </table>
726 <?php
727 }
728
729
730 function fv_flowplayer_admin_privacy() {
731 global $fv_fp;
732 ?>
733 <table class="form-table2">
734 <?php $fv_fp->_get_checkbox(__( 'Disable local storage', 'fv-player' ), 'disable_localstorage', __( 'Remember video position will not work for non logged users. Video volume, mute status and subtitles selection will also not be stored.', 'fv-player' ) ); ?>
735 <tr>
736 <td colspan="4">
737 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
738 <a class="button fv-help-link" href="https://foliovision.com/2021/12/private-video-no-cookies" target="_blank">Help</a>
739 </td>
740 </tr>
741 </table>
742 <?php
743 }
744
745
746 function fv_flowplayer_admin_seo() {
747 global $fv_fp;
748 ?>
749 <table class="form-table2">
750 <?php $fv_fp->_get_checkbox(__( 'Use Schema.org markup', 'fv-player' ), array( 'integrations', 'schema_org' ), __( ' Adds the video meta data information for search engines.', 'fv-player' ) ); ?>
751 <?php do_action( 'fv_flowplayer_admin_seo_after'); ?>
752 <tr>
753 <td colspan="4">
754 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
755 <a class="button fv-help-link" href="https://foliovision.com/player/settings/video-seo-schema-xml" target="_blank">Help</a>
756 </td>
757 </tr>
758 </table>
759 <?php
760 }
761
762
763 function fv_flowplayer_admin_select_popups($aArgs){
764
765 $aPopupData = apply_filters('fv_player_admin_popups_defaults', get_option('fv_player_popups'));
766
767
768 $sId = (isset($aArgs['id'])?$aArgs['id']:'popups_default');
769 $aArgs = wp_parse_args( $aArgs, array( 'id'=>$sId, 'cva_id'=>'', 'show_default' => false ) );
770 ?>
771 <select id="<?php echo esc_attr( $aArgs['id'] ); ?>" name="<?php echo esc_attr( $aArgs['id'] ); ?>">
772 <?php if( $aArgs['show_default'] ) : ?>
773 <option>Use site default</option>
774 <?php endif; ?>
775 <option <?php if( $aArgs['item_id'] == 'no' ) echo 'selected '; ?>value="no"><?php esc_html_e( 'None', 'fv-player' ); ?></option>
776 <option <?php if( $aArgs['item_id'] == 'random' ) echo 'selected '; ?>value="random"><?php esc_html_e( 'Random', 'fv-player' ); ?></option>
777 <?php
778 if( isset($aPopupData) && is_array($aPopupData) && count($aPopupData) > 0 ) {
779 foreach( $aPopupData AS $key => $aPopupAd ) {
780 ?><option <?php if( $aArgs['item_id'] == $key ) echo 'selected'; ?> value="<?php echo esc_attr( $key ); ?>"><?php
781 echo esc_html( $key );
782 if( !empty($aPopupAd['title']) ) echo ' - ' . esc_html( $aPopupAd['title'] );
783 if( !empty($aPopupAd['name']) ) echo ' - ' . esc_html( $aPopupAd['name'] );
784 if( !empty($aPopupAd['disabled']) && $aPopupAd['disabled'] == 1 ) echo ' (currently disabled)';
785 ?></option><?php
786 }
787 } ?>
788 </select>
789 <?php
790 }
791
792
793 function fv_flowplayer_admin_end_of_video(){
794 global $fv_fp;
795 ?>
796 <table class="form-table2" style="margin: 5px; ">
797 <tr>
798 <td style="width:150px;vertical-align:top;line-height:2.4em;"><label for="popups_default"><?php esc_html_e( 'Default Popup', 'fv-player' ); ?>:</label></td>
799 <td>
800 <?php $cva_id = $fv_fp->_get_option('popups_default'); ?>
801 <p class="description"><?php fv_flowplayer_admin_select_popups( array('item_id'=>$cva_id,'id'=>'popups_default') ); ?> <?php esc_html_e( 'You can set a default popup here and then skip it for individual videos.', 'fv-player' ); ?></p>
802 </td>
803 </tr>
804 <tr>
805 <td colspan="4">
806 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
807 </td>
808 </tr>
809 </table>
810 <?php
811 }
812
813
814 function fv_flowplayer_admin_popups(){
815 global $fv_fp;
816 ?>
817 <p><?php esc_html_e( 'Add any popups here which you would like to use with multiple videos.', 'fv-player' ); ?></p>
818 <table class="form-table2" style="margin: 5px; ">
819 <tr>
820 <td>
821 <table id="fv-player-popups-settings">
822 <thead>
823 <tr>
824 <td>ID</td>
825 <td></td>
826 <td><?php esc_html_e( 'Status', 'fv-player' ); ?></td>
827 </tr>
828 </thead>
829 <tbody>
830 <?php
831 $aPopupData = get_option('fv_player_popups');
832 if( empty($aPopupData) ) {
833 $aPopupData = array( 1 => array() );
834 } else {
835 $aPopupData = array( '#fv_popup_dummy_key#' => array() ) + $aPopupData ;
836 }
837
838 foreach ($aPopupData AS $key => $aPopup) {
839 $value = ! empty( $aPopup['html'] ) ? $aPopup['html'] : '';
840 $lines = ! empty( $aPopup['html'] ) ? substr_count( $aPopup['html'], "\n" ) + 2 : 2;
841 ?>
842 <tr class='data' id="fv-player-popup-item-<?php echo esc_html( $key ); ?>"<?php echo $key === '#fv_popup_dummy_key#' ? 'style="display:none"' : ''; ?>>
843 <td class='id'><?php echo esc_html( $key ); ?></td>
844 <td>
845 <table class='fv-player-popup-formats'>
846 <tr>
847 <td><label><?php esc_html_e( 'Name', 'fv-player' ); ?>:</label></td>
848 <td><input type='text' maxlength="40" name='popups[<?php echo esc_attr( $key ); ?>][name]' value='<?php echo ( !empty($aPopup['name']) ? esc_attr($aPopup['name']) : '' ); ?>' placeholder='' /></td>
849 </tr>
850 <tr>
851 <td><label>HTML:</label></td>
852 <td><textarea class="large-text code" type='text' name='popups[<?php echo esc_attr( $key ); ?>][html]' placeholder='' rows='<?php echo intval( $lines ); ?>'><?php echo esc_textarea( $value ); ?></textarea></td>
853 </tr>
854 <tr>
855 <td><label><?php echo wp_kses( __( 'Custom<br />CSS', 'fv-player' ), array( 'br' => array() ) ); ?>:</label></td>
856 <td><textarea class="large-text code" type='text' name='popups[<?php echo esc_attr( $key ); ?>][css]'><?php echo ( !empty($aPopup['css']) ? esc_textarea($aPopup['css']) : '.wpfp_custom_popup .fv_player_popup-' . $key . ' { }' ); ?></textarea></td>
857 </tr>
858 </table>
859 </td>
860 <td>
861 <input type='hidden' name='popups[<?php echo esc_attr( $key ); ?>][disabled]' value='0' />
862 <input id='PopupAdPause-<?php echo esc_html( $key ); ?>' type='checkbox' name='popups[<?php echo esc_attr( $key ); ?>][pause]' value='1' <?php echo (isset($aPopup['pause']) && $aPopup['pause'] ? 'checked="checked"' : ''); ?> />
863 <label for='PopupAdPause-<?php echo esc_html( $key ); ?>'><?php esc_html_e( 'Show on pause', 'fv-player' ); ?></label><br />
864 <input id='PopupAdDisabled-<?php echo esc_html( $key ); ?>' type='checkbox' name='popups[<?php echo esc_attr( $key ); ?>][disabled]' value='1' <?php echo (isset($aPopup['disabled']) && $aPopup['disabled'] ? 'checked="checked"' : ''); ?> />
865 <label for='PopupAdDisabled-<?php echo esc_html( $key ); ?>'><?php esc_html_e( 'Disable', 'fv-player' ); ?></label><br />
866 <a class='fv-player-popup-remove' href=''><?php esc_html_e( 'Remove', 'fv-player' ); ?></a></td>
867 </tr>
868 <?php
869 }
870 ?>
871 </tbody>
872 </table>
873 </td>
874 </tr>
875 <tr>
876 <td>
877 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
878 <input type="button" value="<?php esc_attr_e( 'Add more Popups', 'fv-player' ); ?>" class="button" id="fv-player-popups-add" />
879 </td>
880 </tr>
881 </table>
882
883 <script>
884
885 jQuery('#fv-player-popups-add').on('click', function() {
886 var fv_player_popup_index = (parseInt( jQuery('#fv-player-popups-settings tr.data:last .id').html() ) || 0 ) + 1;
887 jQuery('#fv-player-popups-settings').append(jQuery('#fv-player-popups-settings tr.data:first').prop('outerHTML').replace(/#fv_popup_dummy_key#/gi,fv_player_popup_index + ""));
888 jQuery('#fv-player-popup-item-'+fv_player_popup_index).show();
889 return false;
890 } );
891
892 jQuery(document).on('click','.fv-player-popup-remove', false, function() {
893 if( confirm('Are you sure you want to remove the popup ad?') ){
894 jQuery(this).parents('.data').remove();
895 if(jQuery('#fv-player-popups-settings .data').length === 1) {
896 jQuery('#fv-player-popups-add').trigger('click');
897 }
898 }
899 return false;
900 } );
901 </script>
902 <?php
903 }
904
905
906 function fv_flowplayer_admin_interface_options() {
907 global $fv_fp;
908 ?>
909 <p><?php esc_html_e( 'Which features should be available in shortcode editor?', 'fv-player' ); ?></p>
910 <table class="form-table2">
911 <?php $fv_fp->_get_checkbox(__( 'Autoplay', 'fv-player' ), array('interface', 'autoplay') ); ?>
912 <?php $fv_fp->_get_checkbox(__( 'Controlbar', 'fv-player' ), array('interface', 'controlbar') ); ?>
913 <?php $fv_fp->_get_checkbox(__( 'Embed', 'fv-player' ), array('interface', 'embed') ); ?>
914 <?php $fv_fp->_get_checkbox(__( 'LMS | Teaching', 'fv-player' ), array('interface', 'lms_teaching') ); ?>
915 <?php $fv_fp->_get_checkbox(__( 'Mobile Video', 'fv-player' ), array('interface', 'mobile') ); ?>
916 <?php $fv_fp->_get_checkbox(__( 'Playlist Auto Advance', 'fv-player' ), array('interface', 'playlist_advance') ); ?>
917 <?php $fv_fp->_get_checkbox(__( 'Playlist Style', 'fv-player' ), array('interface', 'playlist') ); ?>
918 <?php $fv_fp->_get_checkbox(__( 'Playlist Item Titles', 'fv-player' ), array('interface', 'playlist_titles') ); ?>
919 <?php $fv_fp->_get_checkbox(__( 'Sharing Buttons', 'fv-player' ), array('interface', 'share') ); ?>
920 <?php $fv_fp->_get_checkbox(__( 'Speed Buttons', 'fv-player' ), array('interface', 'speed') ); ?>
921 <?php $fv_fp->_get_checkbox(__( 'Splash Text', 'fv-player' ), array('interface', 'splash_text') ); ?>
922 <?php $fv_fp->_get_checkbox(__( 'Sticky', 'fv-player' ), array('interface', 'sticky') ); ?>
923 <?php $fv_fp->_get_checkbox(__( 'Synopsis', 'fv-player' ), array('interface', 'synopsis') ); ?>
924
925 <?php do_action('fv_flowplayer_admin_interface_options_after'); ?>
926
927 <tr>
928 <td colspan="4">
929 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
930 <a class="button fv-help-link" href="https://foliovision.com/player/settings/post-interface-settings" target="_blank">Help</a>
931 </td>
932 </tr>
933 </table>
934 <?php
935 }
936
937
938 function fv_flowplayer_admin_pro() {
939 global $fv_fp;
940
941 if( flowplayer::is_licensed() ) {
942 $aCheck = get_transient( 'fv-player-pro_license' );
943 }
944
945 if( isset($aCheck->valid) && $aCheck->valid ) : ?>
946 <p><?php esc_html_e( 'Valid license found, click the button at the top of the screen to install FV Player Pro!', 'fv-player' ); ?></p>
947 <?php else : ?>
948 <p><a href="https://foliovision.com/player/download"><?php esc_html_e( 'Purchase FV Player license', 'fv-player' ); ?></a> <?php esc_html_e( 'to enable Pro features!', 'fv-player' ); ?></p>
949 <?php endif; ?>
950 <table class="form-table2">
951 <tr>
952 <td class="first"><label><?php esc_html_e( 'Advanced Vimeo embeding', 'fv-player' ); ?>:</label></td>
953 <td>
954 <p class="description">
955 <input type="checkbox" checked="checked" disabled="true" />
956 <?php esc_html_e( 'Use Vimeo as your video host and use all of FV Player features.', 'fv-player' ); ?>
957 </p>
958 </td>
959 </tr>
960 <tr>
961 <td><label><?php esc_html_e( 'Advanced YouTube embeding', 'fv-player' ); ?>:</label></td>
962 <td>
963 <p class="description">
964 <input type="checkbox" checked="checked" disabled="true" />
965 <?php esc_html_e( 'Use YouTube as your video host and use all of FV Player features.', 'fv-player' ); ?>
966 </p>
967 </td>
968 </tr>
969 <tr>
970 <td><label><?php esc_html_e( 'Enable user defined AB loop', 'fv-player' ); ?>:</label></td>
971 <td>
972 <p class="description">
973 <input type="checkbox" checked="checked" disabled="true" />
974 <?php esc_html_e( 'Let your users repeat the parts of the video which they like!', 'fv-player' ); ?>
975 </p>
976 </td>
977 </tr>
978 <tr>
979 <td><label><?php esc_html_e( 'Enable video lightbox', 'fv-player' ); ?>:</label></td>
980 <td>
981 <p class="description">
982 <input type="checkbox" checked="checked" disabled="true" />
983 <?php esc_html_e( 'Enables Lightbox video gallery to show videos in a lightbox popup!', 'fv-player' ); ?>
984 </p>
985 </td>
986 </tr>
987 <tr>
988 <td><label><?php esc_html_e( 'Enable quality switching', 'fv-player' ); ?>:</label></td>
989 <td>
990 <p class="description">
991 <input type="checkbox" checked="checked" disabled="true" />
992 <?php esc_html_e( 'Upload your videos in multiple quality for best user experience with YouTube-like quality switching!', 'fv-player' ); ?>
993 </p>
994 </td>
995 </tr>
996 <tr>
997 <td><label><?php esc_html_e( 'Amazon CloudFront protected content', 'fv-player' ); ?>:</label></td>
998 <td>
999 <p class="description">
1000 <input type="checkbox" checked="checked" disabled="true" />
1001 <?php esc_html_e( 'Protect your Amazon CDN hosted videos', 'fv-player' ); ?>.
1002 </p>
1003 </td>
1004 </tr>
1005 <tr>
1006 <td><label><?php esc_html_e( 'Autoplay just once', 'fv-player' ); ?>:</label></td>
1007 <td>
1008 <p class="description">
1009 <input type="checkbox" disabled="true" />
1010 <?php esc_html_e( 'Makes sure each video autoplays only once for each visitor.', 'fv-player' ); ?>
1011 </p>
1012 </td>
1013 </tr>
1014 <tr>
1015 <td><label><?php esc_html_e( 'Enable video ads', 'fv-player' ); ?>:</label></td>
1016 <td>
1017 <p class="description">
1018 <input type="checkbox" disabled="true" />
1019 <?php esc_html_e( 'Define your own videos ads to play in together with your videos - postroll or prerool', 'fv-player' ); ?>
1020 </p>
1021 </td>
1022 </tr>
1023 </table>
1024 <p><strong><?php esc_html_e( 'Upcoming pro features', 'fv-player' ); ?></strong>:</p>
1025 <table class="form-table2">
1026 <tr>
1027 <td class="first"><label><?php esc_html_e( 'Enable PayWall', 'fv-player' ); ?>:</label></td>
1028 <td>
1029 <p class="description">
1030 <input type="checkbox" checked="checked" disabled="true" />
1031 <?php esc_html_e( 'Monetize the video content on your membership site.', 'fv-player' ); ?>
1032 </p>
1033 </td>
1034 </tr>
1035 </table>
1036 <?php
1037 }
1038
1039 function fv_flowplayer_settings_box_conversion() {
1040 ?>
1041 <p><?php esc_html_e( 'This section allows you to convert videos posted using other plugins to FV Player shortcodes.', 'fv-player' ); ?></p>
1042 <table class="form-table2" style="margin: 5px; ">
1043 <?php do_action('fv_player_conversion_buttons'); ?>
1044 </table>
1045 <?php
1046 }
1047
1048 /*
1049 * Pro Video Ads Dummy box
1050 */
1051 function fv_flowplayer_admin_video_ads(){
1052 ?>
1053 <style>
1054 #fv-player-pro_video-ads-settings tr.data:nth-child(even) { background-color: #eee; }
1055 .fv-player-pro_video-ad-remove { visibility: hidden; }
1056 table.fv-player-pro_video-ad-formats td:first-child { width: 132px }
1057 </style>
1058 <table class="form-table2" style="margin: 5px; ">
1059 <tbody><tr>
1060 <td style="width:180px"><label for="pro[video_ads_default]"><?php esc_html_e( 'Default pre-roll ad:', 'fv-player' ); ?></label></td>
1061 <td>
1062 <p class="description">
1063 <select disabled="true" id="pro[video_ads_default]" >
1064 <option selected="" value="no">No ad</option>
1065 <option value="random">Random</option>
1066 <option value="1">1</option>
1067 </select>
1068 <?php esc_html_e( 'Set which ad should be played before videos.', 'fv-player' ); ?>
1069 </p>
1070 </td>
1071 </tr>
1072 <tr>
1073 <td style="width:180px"><label for="pro[video_ads_postroll_default]"><?php esc_html_e( 'Default post-roll ad:', 'fv-player' ); ?></label></td>
1074 <td>
1075 <p class="description">
1076 <select disabled="true" id="pro[video_ads_postroll_default]" >
1077 <option selected="" value="no">No ad</option>
1078 <option value="random">Random</option>
1079 <option value="1">1</option>
1080 </select>
1081 <?php esc_html_e( 'Set which ad should be played after videos.', 'fv-player' ); ?>
1082 </p>
1083 </td>
1084 </tr>
1085 <tr>
1086 <td style="width:180px"><label for="pro[video_ads_skip]"><?php esc_html_e( 'Default ad skip time', 'fv-player' ); ?>:</label></td>
1087 <td>
1088 <p class="description">
1089 <input disabled="true" class="small" id="pro[video_ads_skip]" title="<?php esc_attr_e( 'Enter value in seconds', 'fv-player' ); ?>" type="text" value="5">
1090 Enter the number of seconds after which an ad can be skipped.
1091 </p>
1092 </td>
1093 </tr>
1094 </tbody></table>
1095 <table class="form-table2" style="margin: 5px; ">
1096 <tbody><tr>
1097 <td>
1098 <table id="fv-player-pro_video-ads-settings">
1099 <thead><tr><td>ID</td><td></td><td>Status</td></tr></thead>
1100 <tbody>
1101 <tr class="data">
1102 <td class="id">1</td>
1103 <td>
1104 <table class="fv-player-pro_video-ad-formats">
1105 <tbody><tr><td><label><?php esc_html_e( 'Name', 'fv-player' ); ?>:</label></td><td colspan="2"><input disabled="true" type="text" value="" placeholder="<?php esc_attr_e( 'Ad name', 'fv-player' ); ?>"></td></tr>
1106 <tr><td><label><?php esc_html_e( 'Click URL', 'fv-player' ); ?>:</label></td><td colspan="2"><input disabled="true" type="text" value="" placeholder="<?php esc_attr_e( 'Clicking the video ad will open the URL in new window', 'fv-player' ); ?>"></td></tr>
1107 <tr><td><label><?php esc_html_e( 'Video', 'fv-player' ); ?>:</label></td><td colspan="2"><input disabled="true" type="text" value="" placeholder="<?php esc_attr_e( 'Enter the video URL here', 'fv-player' ); ?>"></td></tr>
1108 </tbody></table>
1109 </td>
1110 <td>
1111 <input disabled="true" id="VideoAdDisabled-0" type="checkbox" value="1"> <label for="VideoAdDisabled-0">Disable</label><br>
1112 </tr>
1113 </tbody>
1114 </table>
1115 </td>
1116 </tr>
1117 <tr>
1118 <td>
1119 <input disabled="true" type="button" value="<?php esc_attr_e( 'Add more video ads', 'fv-player' ); ?>" class="button" id="fv-player-pro_video-ads-add">
1120 </td>
1121 </tr>
1122 </tbody></table>
1123
1124
1125 <?php
1126 }
1127
1128
1129
1130 function fv_flowplayer_admin_skin_get_table($options) {
1131 global $fv_fp;
1132
1133 $selected_skin = $fv_fp->_get_option( 'skin' );
1134 ?>
1135 <table class="form-table2 flowplayer-settings fv-player-interface-form-group" id="skin-<?php echo esc_html( $options['skin_name'] ); ?>-settings"<?php if (($selected_skin && $selected_skin != $options['skin_radio_button_value']) || (!$selected_skin && $options['default'] !== true)) { echo ' style="display: none"'; } ?>>
1136 <?php
1137 $options = apply_filters( 'fv_player_skin_settings', $options );
1138
1139 foreach ($options['items'] as $item) {
1140 $setup = wp_parse_args( $item, array( 'name' => false, 'data' => false, 'optoins' => false, 'attributes' => false, 'class' => false, 'default' => false ) );
1141
1142 switch ($item['type']) {
1143 case 'checkbox':
1144 $fv_fp->_get_checkbox($setup);
1145 break;
1146 case 'input_text':
1147 $fv_fp->_get_input_text($setup);
1148 break;
1149 case 'input_hidden':
1150 $fv_fp->_get_input_hidden($setup);
1151 break;
1152 case 'select':
1153 $fv_fp->_get_select($setup);
1154 break;
1155
1156 }
1157 }
1158 ?>
1159 <tr>
1160 <td></td>
1161 <td>
1162 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1163 </td>
1164 </tr>
1165 </table>
1166 <?php
1167 }
1168
1169
1170
1171 function fv_flowplayer_admin_skin() {
1172 global $fv_fp;
1173 ?>
1174 <style id="fv-style-preview"></style>
1175 <div class="flowplayer-wrapper">
1176 <?php
1177 global $fv_fp_admin_preview_player;
1178 $fv_fp_admin_preview_player = flowplayer_content_handle( array(
1179 'src' => 'https://player.vimeo.com/external/196881410.hd.mp4?s=24645ecff21ff60079fc5b7715a97c00f90c6a18&profile_id=174&oauth2_token_id=3501005',
1180 'splash' => 'https://i.vimeocdn.com/video/609485450-6fc3febe7ce2c2fda919a99c27a9cb904c645dcb944bc53ac7f3a228685305d8-d?mw=1280&mh=720',
1181 'autoplay' => 'false',
1182 'preroll' => 'no',
1183 'postroll' => 'no',
1184 'subtitles' => plugins_url('images/test-subtitles.vtt',dirname(__FILE__)),
1185 'caption' => "Foliovision Video;Lapinthrope Extras - Roy Thompson Hall Dance;Romeo and Juliet Ballet Schloss Kittsee",
1186 'playlist' => 'https://player.vimeo.com/external/224781088.sd.mp4?s=face4dbb990b462826c8e1e43a9c66c6a9bb5585&profile_id=165&oauth2_token_id=3501005,https://i.vimeocdn.com/video/643908843-984e68e66846a7a4b42bf5e854b65937217ed1b71759afa16afd4f81963900a6-d?mw=230&mh=130;https://player.vimeo.com/external/45864857.hd.mp4?s=94fddee594da3258c9e10355f5bad8173c4aee7b&profile_id=113&oauth2_token_id=3501005,https://i.vimeocdn.com/video/319116053-4745c7d678ba90ebabeadf58a65439b780c2ef26176176acc03eabbe87c8afda-d?mw=230&mh=130',
1187 'liststyle' => 'horizontal',
1188 'vast' => 'skip',
1189 'checker' => 'no'
1190 ) );
1191 $fv_fp_admin_preview_player = explode( '<div class="fp-playlist-external', $fv_fp_admin_preview_player );
1192
1193 // Video checker uses <noscript> and style="display: none" so we need to keep that
1194 add_filter( 'wp_kses_allowed_html', 'fv_flowplayer_admin_skin_safe_tags', 10, 2 );
1195 add_filter( 'safe_style_css', 'fv_flowplayer_admin_skin_safe_styles' );
1196 echo wp_kses_post( $fv_fp_admin_preview_player[0] );
1197 remove_filter( 'wp_kses_allowed_html', 'fv_flowplayer_admin_skin_safe_tags', 10, 2 );
1198 remove_filter( 'safe_style_css', 'fv_flowplayer_admin_skin_safe_styles' );
1199 ?>
1200 <?php esc_html_e( 'Hint: play the video to see live preview of the Skin, Logo and Controls settings', 'fv-player' ) ?>
1201 </div>
1202
1203 <div id="fv_flowplayer_admin_skin_tabs">
1204 <h2 class="fv-nav-tab-wrapper nav-tab-wrapper">
1205 <a href="#skin-tab-skin" class="nav-tab nav-tab-active" style="outline: 0px;">Skin</a>
1206 <a href="#skin-tab-logo" class="nav-tab" style="outline: 0px;">Logo</a>
1207 <a href="#skin-tab-controls" class="nav-tab" style="outline: 0px;">Controls</a>
1208 </h2>
1209 </div>
1210
1211 <div id="skin-tab-skin" class="skin-tab-content">
1212 <table class="form-table2 flowplayer-settings fv-player-interface-form-group" id="skin-Skin-settings">
1213 <?php
1214 // skin change radios
1215 $fv_fp->_get_radio(array(
1216 'key' => 'skin',
1217 'name' => __( 'Skin', 'fv-player' ),
1218 'style' => 'columns',
1219 'values' => array(
1220 'slim' => 'Slim',
1221 'youtuby' => 'YouTuby',
1222 'custom' => 'Custom'
1223 ),
1224 'default' => 'custom',
1225 'data' => array(
1226 'fv-skin' => ''
1227 )
1228 ));
1229 ?>
1230 </table>
1231
1232 <?php
1233
1234 $aPreview = array(
1235 'hasBorder' => '.flowplayer{border:%val%px solid !important;}',
1236 'borderColor' => '.flowplayer{border-color:#%val% !important;}',
1237 'backgroundColor' => '.flowplayer .fv-ab-loop .noUi-handle { color:#%val% !important; }
1238 .fv_player_popup { background: #%val% !important;}
1239 .fvfp_admin_error_content { background: #%val% !important; }
1240 .flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { background-color: #%val% !important; }',
1241 'font-face' => '#content .flowplayer, .flowplayer { font-family: %val%; }',
1242 'progressColor' => '.flowplayer .fp-volumelevel { background-color: #%val% !important; }
1243 .flowplayer .fp-progress, .flowplayer .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #%val% !important; }
1244 .flowplayer .fp-menu a.fp-selected { background-color: #%val% !important }
1245 .flowplayer .fp-color { background-color: #%val% !important }',
1246 'durationColor' => '.flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { color:#%val% !important; }
1247 .flowplayer .fp-controls > .fv-fp-prevbtn:before, .flowplayer .fp-controls > .fv-fp-nextbtn:before { border-color:#%val% !important; }
1248 .flowplayer svg.fvp-icon { fill: #%val% !important; }
1249 .flowplayer .fp-elapsed, .flowplayer .fp-duration { color: #%val% !important; }
1250 .freedomplayer .fp-controls svg { fill: #%val% !important; stroke: #%val% !important }
1251 .fv-player-video-checker { color: #%val% !important; }',
1252 'design-timeline' => '',
1253 'design-icons' => '',
1254 );
1255
1256 // slim skin settings
1257 $aSettings = array(
1258 array(
1259 'type' => 'input_text',
1260 'key' => array('skin-slim', 'progressColor'),
1261 'name' => __( 'Color', 'fv-player' ),
1262 'class' => 'color',
1263 'default' => 'BB0000',
1264 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1265 )
1266 );
1267
1268 foreach( $fv_fp->aDefaultSkins['skin-slim'] AS $k => $v ) {
1269 $aSettings[] = array(
1270 'type' => 'input_hidden',
1271 'key' => array('skin-slim', $k),
1272 'default' => $v,
1273 'data' => array( 'fv-preview' => $aPreview[$k] )
1274 );
1275 }
1276
1277 fv_flowplayer_admin_skin_get_table( array(
1278 'skin_name' => 'Slim',
1279 'skin_radio_button_value' => 'slim',
1280 'default' => true,
1281 'items' => $aSettings
1282 ) );
1283
1284 // YouTuby skin settings
1285 $aSettings = array(
1286 array(
1287 'type' => 'input_text',
1288 'key' => array('skin-youtuby', 'progressColor'),
1289 'name' => __( 'Color', 'fv-player' ),
1290 'class' => 'color',
1291 'default' => 'BB0000',
1292 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1293 )
1294 );
1295
1296 foreach( $fv_fp->aDefaultSkins['skin-youtuby'] AS $k => $v ) {
1297 $aSettings[] = array(
1298 'type' => 'input_hidden',
1299 'key' => array('skin-youtuby', $k),
1300 'default' => $v,
1301 'data' => array( 'fv-preview' => $aPreview[$k] ),
1302 'attributes' => array( 'readonly' => 'true' )
1303 );
1304 }
1305
1306 fv_flowplayer_admin_skin_get_table( array(
1307 'skin_name' => 'YouTuby',
1308 'skin_radio_button_value' => 'youtuby',
1309 'default' => false,
1310 'items' => $aSettings
1311 ) );
1312
1313
1314
1315 // custom skin settings
1316 fv_flowplayer_admin_skin_get_table( array(
1317 'skin_name' => 'Custom',
1318 'skin_radio_button_value' => 'custom',
1319 'default' => false,
1320 'items' => array(
1321
1322 array(
1323 'type' => 'checkbox',
1324 'key' => array('skin-custom', 'hasBorder'),
1325 'name' => __( 'Border', 'fv-player' ),
1326 'data' => array( 'fv-preview' => $aPreview['hasBorder'] )
1327 ),
1328
1329 array(
1330 'type' => 'input_text',
1331 'key' => array('skin-custom', 'borderColor'),
1332 'name' => __( 'Border color', 'fv-player' ),
1333 'class' => 'color',
1334 'default' => '666666',
1335 'data' => array( 'fv-preview' => $aPreview['borderColor'] )
1336 ),
1337
1338 array(
1339 'type' => 'input_text',
1340 'key' => array('skin-custom', 'backgroundColor'),
1341 'name' => __( 'Controlbar', 'fv-player' ),
1342 'class' => 'color-opacity',
1343 'default' => '333333',
1344 'data' => array( 'fv-preview' => $aPreview['backgroundColor'] )
1345 ),
1346
1347 array(
1348 'type' => 'select',
1349 'key' => array('skin-custom', 'font-face'),
1350 'name' => __( 'Font Face', 'fv-player' ),
1351 'options' => array(
1352 'inherit' => __( '(inherit from template)', 'fv-player' ),
1353 '&quot;Courier New&quot;, Courier, monospace' => 'Courier New',
1354 'Helvetica, sans-serif' => 'Helvetica',
1355 'Tahoma, Geneva, sans-serif' => 'Tahoma, Geneva'
1356 ),
1357 'default' => 'Tahoma, Geneva, sans-serif',
1358 'data' => array( 'fv-preview' => $aPreview['font-face'] )
1359 ),
1360
1361 array(
1362 'type' => 'input_text',
1363 'key' => array('skin-custom', 'progressColor'),
1364 'name' => __( 'Progress', 'fv-player' ),
1365 'class' => 'color',
1366 'default' => 'BB0000',
1367 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1368 ),
1369
1370 array(
1371 'type' => 'input_text',
1372 'key' => array('skin-custom', 'durationColor'),
1373 'name' => __( 'Buttons', 'fv-player' ),
1374 'class' => 'color',
1375 'default' => 'EEEEEE',
1376 'data' => array( 'fv-preview' => $aPreview['durationColor'] )
1377 ),
1378
1379 array(
1380 'type' => 'select',
1381 'key' => array('skin-custom', 'design-timeline'),
1382 'first_td_class' => 'second-column',
1383 'name' => __( 'Timeline', 'fv-player' ),
1384 'default' => ' ',
1385 'options' => array(
1386 ' ' => __( 'Default', 'fv-player' ),
1387 'fp-slim' => __( 'Slim', 'fv-player' ),
1388 'fp-full' => __( 'Full', 'fv-player' ),
1389 'fp-fat' => __( 'Fat', 'fv-player' ),
1390 'fp-minimal' => __( 'Minimal', 'fv-player' ),
1391 )
1392 ),
1393
1394 array(
1395 'type' => 'select',
1396 'key' => array('skin-custom', 'design-icons'),
1397 'first_td_class' => 'second-column',
1398 'name' => __( 'Icons', 'fv-player' ),
1399 'default' => ' ',
1400 'options' => array(
1401 ' ' => __( 'Default', 'fv-player' ),
1402 'fp-edgy' => __( 'Edgy', 'fv-player' ),
1403 'fp-outlined' => __( 'Outlined', 'fv-player' ),
1404 'fp-playful' => __( 'Playful', 'fv-player' )
1405 )
1406 ),
1407
1408 )
1409 ) );
1410 ?>
1411 </div>
1412
1413 <div id="skin-tab-logo" class="skin-tab-content">
1414 <table class="form-table2">
1415 <tr>
1416 <td class="aligntop-input"><label for="logo">Logo:</label></td>
1417 <td>
1418
1419 <input type="text" name="logo" id="logo" value="<?php echo esc_attr( $fv_fp->_get_option('logo') ); ?>" class="large" placeholder="<?php esc_attr_e( 'Paste link or upload an image.', 'fv-player' ); ?>" data-fv-preview />
1420 <input id="upload_image_button" class="upload_image_button button no-margin small" type="button" value="<?php esc_attr_e( 'Upload Image', 'fv-player' ); ?>" alt="Select Logo" />
1421 </td>
1422 </tr>
1423 <tr>
1424 <td><label for="logoPosition">Position:</label></td>
1425 <td>
1426 <?php
1427 $value = $fv_fp->_get_option('logoPosition');
1428 ?>
1429 <select name="logoPosition" class="small" style="width: 9em !important" data-fv-preview>
1430 <option <?php if( $value == 'bottom-left' ) echo "selected"; ?> value="bottom-left"><?php esc_html_e( 'Bottom-left', 'fv-player' ); ?></option>
1431 <option <?php if( $value == 'bottom-right' ) echo "selected"; ?> value="bottom-right"><?php esc_html_e( 'Bottom-right', 'fv-player' ); ?></option>
1432 <option <?php if( $value == 'top-left' ) echo "selected"; ?> value="top-left"><?php esc_html_e( 'Top-left', 'fv-player' ); ?></option>
1433 <option <?php if( $value == 'top-right' ) echo "selected"; ?> value="top-right"><?php esc_html_e( 'Top-right', 'fv-player' ); ?></option>
1434 </select>
1435 </td>
1436 </tr>
1437 <?php $fv_fp->_get_checkbox(
1438 array(
1439 'name' => __( 'Align to video', 'fv-player' ),
1440 'key' => 'logo_over_video',
1441 'help' => __( 'Logo stays on top of video if aspect ratio does not match.', 'fv-player' ),
1442 'first_td_class' => 'aligntop',
1443 'data' => array(
1444 'fv-preview' => ''
1445 )
1446 )
1447 ); ?>
1448 <tr>
1449 <td></td>
1450 <td>
1451 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1452 </td>
1453 </tr>
1454 </table>
1455 </div>
1456
1457 <div id="skin-tab-controls" class="skin-tab-content">
1458 <table class="form-table2">
1459 <?php $fv_fp->_get_checkbox(__( 'Always Visible', 'fv-player' ), 'show_controlbar', __( 'Control bar will show below player and not just on hover.') ); ?>
1460 <?php $fv_fp->_get_checkbox(__( 'Airplay', 'fv-player' ), 'ui_airplay', __( 'Adds support for Airplay.', 'fv-player' ) ); ?>
1461 <?php $fv_fp->_get_checkbox(__( 'Embed', 'fv-player' ), 'ui_embed', __( 'Embed link in top bar (no preview).', 'fv-player' ) ); ?>
1462 <?php $fv_fp->_get_checkbox(__( 'Chromecast', 'fv-player' ), 'chromecast', __( 'Adds support for Google Chromecast.', 'fv-player' ) ); ?>
1463 <?php $fv_fp->_get_checkbox(__( 'Fullscreen', 'fv-player' ), 'allowfullscreen', __( 'Adds a fullscreen button.', 'fv-player' ) ); ?>
1464 <?php $fv_fp->_get_checkbox(__( 'No Picture', 'fv-player' ), 'ui_no_picture_button', __( 'Adds a button to turn the video picture on and off.', 'fv-player' ) ); ?>
1465 <?php $fv_fp->_get_checkbox(__( 'Repeat', 'fv-player' ), 'ui_repeat_button', __( 'Adds a button to set playlist/track repeat and shuffle.', 'fv-player' ) ); ?>
1466 <?php $fv_fp->_get_checkbox(__( 'Rewind/Forward', 'fv-player' ), 'ui_rewind_button', __( 'Adds a button to go 10 seconds back/forth.', 'fv-player' ) ); ?>
1467 <?php $fv_fp->_get_checkbox(__( 'Sharing', 'fv-player' ), 'ui_sharing', __( 'Sharing buttons in top bar (no preview).', 'fv-player' ) ); ?>
1468 <?php $fv_fp->_get_checkbox(__( 'Speed', 'fv-player' ), 'ui_speed', __( 'Speed buttons control playback speed.', 'fv-player' ) ); ?>
1469 <tr>
1470 <td><label for="ui_speed_increment"><?php esc_html_e( 'Speed Step', 'fv-player' ); ?>:</label></td>
1471 <td colspan="3">
1472 <p class="description">
1473 <?php
1474 $value = $fv_fp->_get_option('ui_speed_increment');
1475 ?>
1476 <select id="ui_speed_increment" name="ui_speed_increment" style="width: 5em">
1477 <option value="0.1" <?php if( $value == 0.1 ) echo ' selected="selected"'; ?> >0.1</option>
1478 <option value="0.25" <?php if( $value == 0.25 ) echo ' selected="selected"'; ?> >0.25</option>
1479 <option value="0.5" <?php if ( $value == 0.5 ) echo ' selected="selected"'; ?> >0.5</option>
1480 </select>
1481 <?php esc_html_e( 'Accuracy of the Speed button.', 'fv-player' ); ?>
1482 </p>
1483 </td>
1484 </tr>
1485 <?php $fv_fp->_get_checkbox(__( 'Video Links', 'fv-player' ), 'ui_video_links', __( '"Link" item in top bar (no preview).', 'fv-player' ), __( "Clicking the video Link gives your visitors a link to the exact place in the video they are watching. If the post access is restricted, it won't make the video open to public.", 'fv-player' ) ); ?>
1486 <tr>
1487 <td></td>
1488 <td>
1489 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1490 </td>
1491 </tr>
1492 </table>
1493 </div>
1494
1495 <div style="clear: both"></div>
1496 <?php
1497 do_action('fv_player_extensions_admin_load_assets');
1498 }
1499
1500 function fv_flowplayer_admin_skin_safe_styles( $styles ) {
1501 $styles[] = 'display';
1502 return $styles;
1503 }
1504
1505 function fv_flowplayer_admin_skin_safe_tags( $tags, $context ) {
1506 if ( 'post' === $context ) {
1507 $tags['noscript'] = array();
1508 }
1509 return $tags;
1510 }
1511
1512 function fv_flowplayer_admin_skin_playlist() {
1513 global $fv_fp;
1514 ?>
1515 <div class="flowplayer-wrapper">
1516 <?php
1517 global $fv_fp_admin_preview_player;
1518 if ( isset( $fv_fp_admin_preview_player[1] ) ) {
1519 echo '<div class="fp-playlist-external'.str_replace( 'https://i.vimeocdn.com/video/609485450_1280.jpg', 'https://i.vimeocdn.com/video/608654918_295x166.jpg', $fv_fp_admin_preview_player[1] );
1520 esc_html_e( 'Hint: you can click the thumbnails to switch videos in the above player. This preview uses the horizontal playlist style.', 'fv-player' );
1521 }
1522 ?>
1523 </div>
1524 <table class="form-table2 flowplayer-settings fv-player-interface-form-group">
1525 <?php
1526 $fv_fp->_get_select(
1527 __( 'Playlist Design', 'fv-player' ),
1528 'playlist-design',
1529 false,
1530 false,
1531 array(
1532 '2017' => __( '2017' , 'fv-player' ),
1533 '2017 visible-captions' => __( '2017 with captions' , 'fv-player' ),
1534 '2014' => __( '2014' , 'fv-player' )
1535 )
1536 ); ?>
1537 <tr>
1538 <td><label for="playlistBgColor"><?php esc_html_e( 'Background Color', 'fv-player' ); ?></label></td>
1539 <td><input class="color" id="playlistBgColor" name="playlistBgColor" type="text" value="<?php echo esc_attr( $fv_fp->_get_option('playlistBgColor') ); ?>"
1540 data-fv-preview=".fp-playlist-external > a > span { background-color:#%val%; }"/></td>
1541 </tr>
1542 <tr>
1543 <td><label for="playlistSelectedColor"><?php esc_html_e( 'Active Item', 'fv-player' ); ?></label></td>
1544 <td><input class="color" id="playlistSelectedColor" name="playlistSelectedColor" type="text" value="<?php echo esc_attr( $fv_fp->_get_option('playlistSelectedColor') ); ?>"
1545 data-fv-preview=".fp-playlist-external.fv-playlist-design-2014 a.is-active, .fp-playlist-external.fv-playlist-design-2014 a.is-active h4, .fp-playlist-external.fv-playlist-design-2014 a.is-active h4 span, .fp-playlist-external.fp-playlist-only-captions a.is-active, .fp-playlist-external.fp-playlist-only-captions a.is-active h4 span { color:#%val% !important; }"/></td>
1546 </tr>
1547 <tr>
1548 <td><label for="playlistFontColor-proxy"><?php esc_html_e( 'Font Color', 'fv-player' ); ?></label></td>
1549 <?php $bShowPlaylistFontColor = ( $fv_fp->_get_option('playlistFontColor') && $fv_fp->_get_option('playlistFontColor') !== '#' ); ?>
1550 <td>
1551 <input class="color" id="playlistFontColor-proxy" name="playlistFontColor-proxy" data-previous="" <?php echo $bShowPlaylistFontColor ? '' : 'style="display:none;"'; ?> type="text" value="<?php echo esc_attr( $fv_fp->_get_option('playlistFontColor') ); ?>" data-fv-preview=".fp-playlist-external a h4 span { color:#%val% !important; }, .fp-playlist-external > a { color:#%val% !important; }, #dashboard-widgets .flowplayer-wrapper .fp-playlist-external h4{color: #%val% !important;}" />
1552 <input id="playlistFontColor" name="playlistFontColor" type="hidden" value="<?php echo esc_attr( $fv_fp->_get_option('playlistFontColor') ); ?>" />
1553 <a class="playlistFontColor-show" <?php echo $bShowPlaylistFontColor ? 'style="display:none;"' : ''; ?>><?php esc_html_e( 'Use custom color', 'fv-player' ); ?><?php esc_html_e( '', 'fv-player' ); ?></a>
1554 <a class="playlistFontColor-hide" <?php echo $bShowPlaylistFontColor ? '' : 'style="display:none;"'; ?>><?php esc_html_e( 'Inherit from theme', 'fv-player' ); ?><?php esc_html_e( '', 'fv-player' ); ?></a>
1555 </td>
1556 </tr>
1557 <tr>
1558 <td></td>
1559 <td>
1560 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1561 </td>
1562 </tr>
1563 </table>
1564 <div style="clear: both"></div>
1565 <?php
1566 }
1567
1568 function fv_flowplayer_admin_custom_css() {
1569 global $fv_fp;
1570 $customCSS = $fv_fp->_get_option('customCSS');
1571 ?>
1572 <style>
1573 .CodeMirror {
1574 border: 1px solid #ddd;
1575 }
1576 </style>
1577 <p><?php echo wp_kses(
1578 sprintf( __( 'Check our <a href="%s" target="_blank">CSS Tips and Fixes</a> guide for usefull appearance tweaks for FV Player.', 'fv-wordpres-flowplayer'), 'https://foliovision.com/player/advanced/css-tips-and-fixes' ),
1579 array( 'a' => array( 'href' => array(), 'target' => array() ) )
1580 ); ?></p>
1581 <table class="form-table2">
1582 <tr>
1583 <td colspan="2">
1584 <textarea id="customCSS" name="customCSS"><?php echo esc_textarea($customCSS); ?></textarea>
1585 </td>
1586 </tr>
1587
1588 <tr>
1589 <td colspan="2">
1590 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1591 </td>
1592 </tr>
1593 </table>
1594 <div style="clear: both"></div>
1595 <?php
1596 }
1597
1598
1599 function fv_flowplayer_admin_skin_subtitles() {
1600 global $fv_fp;
1601 $subtitleBgColor = $fv_fp->_get_option('subtitleBgColor');
1602 if( $subtitleBgColor[0] == '#' && $opacity = $fv_fp->_get_option('subtitleBgAlpha') ) {
1603 $rgb = array_map('hexdec', array($subtitleBgColor[1].$subtitleBgColor[2], $subtitleBgColor[3].$subtitleBgColor[4], $subtitleBgColor[5].$subtitleBgColor[6]) );
1604 $subtitleBgColor = 'rgba('.implode(",",$rgb).','.$opacity.')';
1605 }
1606 ?>
1607 <div id="fp-preview-wrapper">
1608 <div class="flowplayer skin-<?php echo esc_html( $fv_fp->_get_option('skin') ); ?>" id="preview">
1609 <div class="fp-captions fp-shown">
1610 <p><?php esc_html_e( 'The quick brown fox jumps over the lazy dog.', 'fv-player' ); ?></p>
1611 <p><?php esc_html_e( 'Second line.', 'fv-player' ); ?></p>
1612 </div>
1613 </div>
1614 </div>
1615 <table class="form-table2 flowplayer-settings fv-player-interface-form-group">
1616 <tr>
1617 <td><label for="subtitle-font-face"><?php esc_html_e( 'Font Face', 'fv-player' ); ?></label></td>
1618 <td>
1619 <select id="subtitle-font-face" name="subtitleFontFace" data-fv-preview=".flowplayer .fp-captions { font-family: %val% !important; }">
1620 <option value="inherit"<?php if( $fv_fp->_get_option('subtitleFontFace') == 'inherit' ) echo ' selected="selected"'; ?>><?php esc_html_e( '(inherit from player)', 'fv-player' ); ?></option>
1621 <option value="&quot;Courier New&quot;, Courier, monospace"<?php if( $fv_fp->_get_option('subtitleFontFace') == "\"Courier New\", Courier, monospace" ) echo ' selected="selected"'; ?>>Courier New</option>
1622 <option value="Helvetica, sans-serif"<?php if( $fv_fp->_get_option('subtitleFontFace') == "Helvetica, sans-serif" ) echo ' selected="selected"'; ?>>Helvetica</option>
1623 <option value="Tahoma, Geneva, sans-serif"<?php if( $fv_fp->_get_option('subtitleFontFace') == "Tahoma, Geneva, sans-serif" ) echo ' selected="selected"'; ?>>Tahoma, Geneva</option>
1624 </select>
1625 </td>
1626 </tr>
1627 <tr>
1628 <td><label for="subtitleSize"><?php esc_html_e( 'Font Size', 'fv-player' ); ?></label></td>
1629 <td><input id="subtitleSize" name="subtitleSize" title="<?php esc_attr_e( 'Enter value in pixels', 'fv-player' ); ?>" type="text" value="<?php echo ( $fv_fp->_get_option('subtitleSize') ); ?>"
1630 data-fv-preview=".flowplayer .fp-player .fp-captions p { font-size: %val%px !important; }"/></td>
1631 </tr>
1632 <tr>
1633 <td><label for="subtitleBgColor"><?php esc_html_e( 'Background Color', 'fv-player' ); ?></label></td>
1634 <td><input class="color-opacity" id="subtitleBgColor" name="subtitleBgColor" type="text" value="<?php echo esc_attr($subtitleBgColor); ?>"
1635 data-fv-preview=".flowplayer .fp-player .fp-captions p { background-color: %val% !important; }"/></td>
1636 </tr>
1637 <tr>
1638 <td></td>
1639 <td>
1640 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1641 </td>
1642 </tr>
1643 </table>
1644 <div style="clear: both"></div>
1645 <?php
1646 }
1647 function fv_flowplayer_admin_skin_sticky() {
1648 global $fv_fp;
1649 ?>
1650 <p><?php esc_html_e('This feature lets your viewers continue watching the video as they scroll past it. For desktop computers we consider a display with minimal width of 1020 pixels.', 'fv-wordpres-flowplayer'); ?></p>
1651 <table class="thirds">
1652 <tr>
1653 <?php
1654 $fv_fp->_get_radio( array(
1655 'key' => 'sticky_video',
1656 'name' => __( '', 'fv-player' ),
1657 'style' => 'columns',
1658 'values' => array(
1659 'off' => 'Off',
1660 'desktop' => 'Desktop',
1661 'all' => 'Desktop and Mobile'
1662 ),
1663 ) );
1664 ?>
1665 </tr>
1666 </table>
1667 <table class="form-table2">
1668 <tr>
1669 <td class="first"><label for="sticky_place"><?php esc_html_e( 'Placement', 'fv-player' ); ?></label></td>
1670 <td>
1671 <select id="sticky_place" name="sticky_place">
1672 <option value="right-bottom"<?php if( $fv_fp->_get_option('sticky_place') == "right-bottom" ) echo ' selected="selected"'; ?>>Right, Bottom</option>
1673 <option value="left-bottom"<?php if( $fv_fp->_get_option('sticky_place') == "left-bottom" ) echo ' selected="selected"'; ?>>Left, Bottom</option>
1674 <option value="left-top"<?php if( $fv_fp->_get_option('sticky_place') == "left-top" ) echo ' selected="selected"'; ?>>Left, Top</option>
1675 <option value="right-top"<?php if( $fv_fp->_get_option('sticky_place') == "right-top" ) echo ' selected="selected"'; ?>>Right, Top</option>
1676 </select>
1677 </td>
1678 </tr>
1679 <tr>
1680 <td><label for="sticky_width"><?php esc_html_e( 'Desktop Player Width [px]', 'fv-player' ); ?></label></td>
1681 <td>
1682 <input id="sticky_width" name="sticky_width" title="<?php esc_attr_e( 'Enter value in pixels', 'fv-player' ); ?>" type="text" value="<?php echo ( $fv_fp->_get_option('sticky_width') ); ?>"/>
1683 <?php esc_html_e( 'Used on desktop and (if enabled) also on mobile in landscape orientation and tablets.', 'fv-player' ); ?>
1684 </td>
1685 </tr>
1686 <?php
1687 $fv_fp->_get_select(
1688 __( 'Mobile Player Width', 'fv-player' ),
1689 'sticky_width_mobile',
1690 __( 'Used on mobile (device width lower than 480 pixels).', 'fv-player' ),
1691 false,
1692 array(
1693 '100' => '100%',
1694 '75' => '75%',
1695 '50' => '50%'
1696 )
1697 ); ?>
1698 <tr>
1699 <td></td>
1700 <td>
1701 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1702 </td>
1703 </tr>
1704 </table>
1705 <div style="clear: both"></div>
1706 <?php
1707 }
1708
1709 function fv_flowplayer_admin_usage() {
1710 ?>
1711 <table class="form-table">
1712 <tr>
1713 <td colspan="4">
1714 <div class="usage-section">
1715 <h3><a target="_blank" href="https://foliovision.com/player/why"><?php esc_html_e( 'Why FV Player?', 'fv-player' ); ?></a></h3>
1716 <ul>
1717 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/integrations" title="FV Player Integrations">FV Player Integrations</a></li>
1718 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/player-pro-features" title="FV Player Features - Free vs Pro ">FV Player Features – Free vs Pro</a></li>
1719 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/comparison-table" title="WordPress Video Plugins Comparison">WordPress Video Plugins Comparison</a></li>
1720 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/fv-player-presto-comparison" title="FV Player vs. Presto Player – Feature Comparison List">FV Player vs. Presto Player – Feature Comparison List</a></li>
1721 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/sub-domains-and-multi-domains" title="Using FV Player with Sub-domains and Multi-Domains ">Sub-domains and Multi-Domains</a></li>
1722 </ul>
1723 </div>
1724 <div class="usage-section">
1725 <h3><a target="_blank" href="https://foliovision.com/player/why"><?php esc_html_e( 'Getting Started', 'fv-player' ); ?></a></h3>
1726 <ul>
1727 <li class="page_item page_item_has_children"><a target="_blank" href="https://foliovision.com/player/getting-started/installation" title="FV Player Installation">Installation</a>
1728 <ul>
1729 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/installation/pro-extension" title="Installation - Pro extension">Installation – Pro extension</a></li>
1730 </ul>
1731 </li>
1732 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/start-up-guide" title="Start up guide for explanation and basic settings">Start-up Guide</a></li>
1733 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/customizing-fv-player-skin" title="Customizing FV Player skin">Customizing FV Player Skin</a></li>
1734 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/media-video-library-browser" title="How to use the built-in Library Browser">Built-in Library Browser</a></li>
1735 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/fv-player-elementor-support" title="Using FV Player With Elementor Page Builder">Using FV Player With Elementor Page Builder</a></li>
1736 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/lms-player" title="Make Any LMS Work With FV Player">Make Any LMS Work With FV Player</a></li>
1737 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/page-builder-player" title="Make Any Page Builder Work With FV Player">Make Any Page Builder Work With FV Player</a></li>
1738 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/getting-started/how-player-widget" title="How to use FV Player Widget">FV Player Widget</a></li>
1739 </ul>
1740 </div>
1741 <div class="usage-section">
1742 <h3><a target="_blank" href="https://foliovision.com/player/playlists"><?php esc_html_e( 'Creating and Managing Playlists', 'fv-player' ); ?></a></h3>
1743 <ul>
1744 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/playlists/creating-playlists" title="Creating Playlists with FV Player">Creating Playlists</a></li>
1745 </ul>
1746 </div>
1747 <div class="usage-section">
1748 <h3><a target="_blank" href="https://foliovision.com/player/faq"><?php esc_html_e( 'FAQ', 'fv-player' ); ?></a></h3>
1749 <ul>
1750 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/faq/css-tips-and-fixes" title="CSS Tips and Fixes">CSS Tips and Fixes</a></li>
1751 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/faq/version-1" title="FV WordPress Flowplayer 1.x FAQ">FV WordPress Flowplayer 1.x FAQ</a></li>
1752 </ul>
1753 </div>
1754 <div class="usage-section">
1755 <h3><a target="_blank" href="https://foliovision.com/player/settings"><?php esc_html_e( 'Setting Screens', 'fv-player' ); ?></a></h3>
1756 <ul>
1757 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/post-interface-settings" title="FV Player Post Interface Options">Post Interface Options</a></li>
1758 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/sitewide-fv-player-defaults" title="Sitewide FV Player Defaults">Sitewide FV Player Defaults</a></li>
1759 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/integrations-compatibility-options" title="Integrations/Compatibility Options">Integrations/Compatibility Options</a></li>
1760 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/mobile-settings-behaviors" title="Mobile Settings, Behaviors, and Limitations">Mobile Settings, Behaviors, and Limitations</a></li>
1761 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/end-of-video-actions" title="End of Video Actions">End of Video Actions</a></li>
1762 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/video-seo-schema-xml" title="Using Video SEO With FV Player Videos">Using Video SEO</a></li>
1763 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/settings/optimize-javascript-loading" title="Optimizing FV Player Loading">Optimizing FV Player Loading</a></li>
1764 </ul>
1765 </div>
1766 <div class="usage-section">
1767 <h3><a target="_blank" href="https://foliovision.com/player/video-hosting"><?php esc_html_e( 'Video Hosting', 'fv-player' ); ?></a></h3>
1768 <ul>
1769 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/youtube-with-fv-player" title="Using YouTube with FV Player">YouTube</a></li>
1770 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/how-to-use-vimeo" title="How to Use Vimeo with WordPress">Vimeo</a></li>
1771 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/bunny-stream-player-integration" title="Using Bunny Stream With FV Player">Bunny Stream</a></li>
1772 <li class="page_item page_item_has_children"><a target="_blank" href="https://foliovision.com/player/video-hosting/amazon-s3-guide" title="Serving Private Videos with Amazon S3 and WordPress">Amazon Web Services S3</a>
1773 <ul>
1774 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/amazon-s3-guide/fix-amazon-mime-type" title="How to set correct MIME type on videos in Amazon S3">Amazon S3 MIME Settings</a></li>
1775 </ul>
1776 </li>
1777 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/how-to-enable-cors-headers" title="How to enable CORS headers for video hosting">How to enable CORS</a></li>
1778 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/fallback-video-hosting" title="How To Set Up Fallback Video Hosting">Fallback Video Hosting</a></li>
1779 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/rtmp-streams" title="How to use RTMP streams with Flash - Deprecated">RTMP Streams with Flash - Deprecated</a></li>
1780 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-hosting/video-hosting-google" title="Video Hosting on Google Drive - Deprecated">Google Drive - Deprecated</a></li>
1781 </ul>
1782 </div>
1783 <div class="usage-section">
1784 <h3><a target="_blank" href="https://foliovision.com/player/features"><?php esc_html_e( 'Advanced features', 'fv-player' ); ?></a></h3>
1785 <ul>
1786 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback" title="Playback Features">Playback Features</a></li>
1787 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/ab-loop-function" title="AB Loop Function">AB Loop Function</a></li>
1788 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/autoplay" title="Autoplay">Autoplay</a></li>
1789 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/using-lightbox" title="Using the Video Lightbox Effect">Video Lightbox Effect</a></li>
1790 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/speed-buttons" title="How to Use the Speed Buttons">Speed Buttons</a></li>
1791 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/custom-start-end-time" title="How to Use Custom Start/End Time">Custom Start/End Time</a></li>
1792 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/quality-switching" title="Setting Up Video Quality Switching">Video Quality Switching</a></li>
1793 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/are-still-watching-prompt" title="Are You Still Watching Prompt">Are You Still Watching Prompt</a></li>
1794 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/video-position-saving" title="How To Use Video Position Saving">Video Position Saving</a></li>
1795 </ul>
1796 </div>
1797 <div class="usage-section">
1798 <h3><a target="_blank" href="https://foliovision.com/player/features/accessibility"><?php esc_html_e( 'Accessibility Features', 'fv-player' ); ?></a></h3>
1799 <ul>
1800 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/subtitles" title="How to Use Subtitles">Subtitles</a></li>
1801 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/interactive-video-transcript" title="Interactive Video Transcript">Interactive Video Transcript</a></li>
1802 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/timeline-previews" title="Timeline Previews">Timeline Previews</a></li>
1803 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/vtt-chapters" title="Using VTT Chapters with FV Player">VTT Chapters</a></li>
1804 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/sticky-video" title="Sticky Video">Sticky Video</a></li>
1805 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/adding-title-and-splash-text" title="Adding Item Titles and Splash Text">Item Titles and Splash Text</a></li>
1806 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/alignment-settings" title="Alignment Settings">Alignment Settings</a></li>
1807 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/profile-videos" title="FV Player Profile Videos">FV Player Profile Videos</a></li>
1808 </ul>
1809 </div>
1810 <div class="usage-section">
1811 <h3><a target="_blank" href="https://foliovision.com/player/features/sharing"><?php esc_html_e( 'Sharing Options', 'fv-player' ); ?></a></h3>
1812 <ul>
1813 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/managing-sharing-buttons" title="Managing Social Sharing Buttons">Social Media Buttons</a></li>
1814 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/video-downloading-with-simple-history" title="Video Downloading With Simple History Support">Video Downloading With Simple History Support</a></li>
1815 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/creating-video-links" title="Creating Video Links in FV Player">Creating Video Links</a></li>
1816 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/email-subscription-form-popups" title="Email Subscription Form Pop-ups">Email Subscription Form Pop-ups</a></li>
1817 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/customing-email-sharing" title="Customizing the Email Sharing Text">Email Sharing</a></li>
1818 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/sharing/using-iframe-embedding" title="Using the Iframe Embedding">Iframe Embedding</a></li>
1819 </ul>
1820 </div>
1821 <div class="usage-section">
1822 <h3><a target="_blank" href="https://foliovision.com/player/video-security"><?php esc_html_e( 'Video Security', 'fv-player' ); ?></a></h3>
1823 <ul>
1824 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/video-protection-methods" title="Video Protection Methods">Video Protection Methods</a></li>
1825 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/video-protection-methods/protecting-video-from-downloading" title="How to Protect Your Videos from Being Downloaded">Protect Videos From Downloading</a></li>
1826 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/video-protection-methods/signed-urls-hls-protection" title="How to Protect your HLS Streams with URL Tokens">Protect HLS Streams with URL Tokens</a></li>
1827 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/video-protection-methods/cookie-protection" title="Protecting HLS Videos with Cookies ">Protecting HLS Videos with Cookies</a></li>
1828 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/video-protection-methods/secure-videos-security" title="How to secure your videos with Vimeo Security">Vimeo Security Add-on</a></li>
1829 </ul>
1830 </div>
1831 <div class="usage-section">
1832 <h3><a target="_blank" href="https://foliovision.com/player/video-security/cdn"><?php esc_html_e( 'CDN Options', 'fv-player' ); ?></a></h3>
1833 <ul>
1834 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/cdn/using-bunnycdn-with-fvplayer-pro" title="Using BunnyCDN with FV Player">BunnyCDN</a></li>
1835 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/cdn/serving-private-cloudfront" title="Serving Private Videos via CloudFront in WordPress">CloudFront</a></li>
1836 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/cdn/using-keycdn-with-fvplayer" title="Using KeyCDN With FV Player">KeyCDN</a></li>
1837 </ul>
1838 </div>
1839 <div class="usage-section">
1840 <h3><a target="_blank" href="https://foliovision.com/player/video-security/drm-watermarking"><?php esc_html_e('DRM Watermarking'); ?></a></h3>
1841 <ul>
1842 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/drm-watermarking/protecting-videos-with-drm-text" title="Protecting Videos With DRM Text">Protecting Videos With DRM Text</a></li>
1843 </ul>
1844 </div>
1845 <div class="usage-section">
1846 <h3><a target="_blank" href="https://foliovision.com/player/video-security/encoding"><?php esc_html_e( 'Secure Video Encoding', 'fv-player' ); ?></a></h3>
1847 <ul>
1848 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/encrypted-hls-coconut" title="How to Set up Encrypted HLS with Coconut">Encrypted HLS with Coconut Setup</a></li>
1849 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/encrypt-encode-videos-wordpress" title="How to encrypt videos directly in WordPress with Coconut">Encrypted HLS with Coconut End User Guide</a></li>
1850 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/mediaconvert-encrypted-hls-guide" title="AWS MediaConvert Encrypted HLS Guide">AWS MediaConvert Encrypted HLS Guide</a></li>
1851 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/mediaconvert-end-user-guide" title="AWS MediaConvert End User guide">AWS MediaConvert End User guide</a></li>
1852 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/hls-stream" title="How to setup encrypted HLS stream with Amazon Elastic Transcoder - Deprecated">Amazon Elastic Transcoder Encrypted HLS Setup- Deprecated</a></li>
1853 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-security/encoding/aws-hls-end-user-guide" title="AWS Elastic Transcoder End User Guide - Deprecated">AWS Elastic Transcoder End User Guide – Deprecated</a></li>
1854 </ul>
1855 </div>
1856 <div class="usage-section">
1857 <h3><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning"><?php esc_html_e( 'Video Membership, Pay Per View and eLearning', 'fv-player' ); ?></a></h3>
1858 <ul>
1859 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/ppv" title="FV Player Pay Per View">FV Player Pay Per View</a></li>
1860 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/ppv/woocommerce" title="How to use FV Player Pay Per View for WooCommerce">FV Player Pay Per View for WooCommerce</a></li>
1861 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/ppv/how-to" title="How to use FV Player Pay Per View With Easy Digital Downloads">FV Player Pay Per View for Easy Digital Downloads</a></li>
1862 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/ppv/sell-video-subscriptions-wordpress" title="How To Sell Video Subscriptions With Restrict Content">Video Subscriptions With Restrict Content</a></li>
1863 </ul>
1864 </div>
1865 <div class="usage-section">
1866 <h3><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/membership"><?php esc_html_e( 'Membership Sites', 'fv-player' ); ?></a></h3>
1867 <ul>
1868 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/membership/rcp-integration" title="How to create membership site with RCP and FV Player">Membership Site with Restrict Content Pro</a></li>
1869 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/membership/membership-fv-player-compatible" title="Popular Membership Plugins Compatible with FV Player">Popular Membership Plugins Compatible with FV Player</a></li>
1870 </ul>
1871 </div>
1872 <div class="usage-section">
1873 <h3><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/elearning"><?php esc_html_e( 'WordPress eLearning', 'fv-player' ); ?></a></h3>
1874 <ul>
1875 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/elearning/learndash-progression-player" title="Using LearnDash And Video Progression with FV Player">LearnDash And Video Progression</a></li>
1876 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/elearning/tutor-lms-video-player" title="How To Use FV Player With Tutor LMS">Tutor LMS</a></li>
1877 </ul>
1878 </div>
1879 <div class="usage-section">
1880 <h3><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid"><?php esc_html_e( 'FV Player VAST/VPAID', 'fv-player' ); ?></a></h3>
1881 <ul>
1882 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/how-to-use-vast" title="How to use VAST / VPAID with video player FV Player VAST">How to Use FV Player VAST</a></li>
1883 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/using-fv-vast-outside-wordpress" title="Using FV Player VAST Outside of WordPress">FV Player VAST Outside of WordPress</a></li>
1884 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/using-exoclick-ads" title="Using ExoClick Ads With FV Player">ExoClick Ads</a></li>
1885 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/tracking-vast-with-analytics" title="Tracking VAST and VPAID Ads With Google Analytics">Tracking VAST and VPAID Ads With Google Analytics</a></li>
1886 <li class="page_item page_item_has_children"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/vast-vpaid-tools" title="VAST/VPAID Tools">VAST/VPAID Tools</a>
1887 <ul>
1888 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/vast-vpaid-tools/url-tags" title="FV Player VAST - How to use url tags with VAST and VPAID">Using URL Tags</a></li>
1889 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/vast-vpaid-tools/errors-causes-resolutions" title="VAST Errors - Causes &amp; Resolutions">VAST Errors – Causes &amp; Resolutions</a></li>
1890 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/fv-player-vast-vpaid/vast-vpaid-tools/tester" title="VAST Tester">VAST Tester</a></li>
1891 </ul>
1892 </li>
1893 </ul>
1894 <div class="clear"></div>
1895 </div>
1896 <div class="usage-section">
1897 <h3><a target="_blank" href="https://foliovision.com/player/tools"><?php esc_html_e( 'Tools', 'fv-player' ); ?></a></h3>
1898 <ul>
1899 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/tools/migration-wizard" title="How to Use FV Player Migration Wizard">FV Player Migration Wizard</a></li>
1900 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/tools/how-shortcode-conversion-tool" title="How To Use The Shortcode Conversion tool">Shortcode Conversion tool</a></li>
1901 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/tools/rollback-player-version" title="How To Rollback FV Player Version">Version Rollback For FV Player</a></li>
1902 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/tools/how-to-completely-remove-fv-player" title="How To Completely Remove FV Player">Complete Uninstall</a></li>
1903 </ul>
1904 </div>
1905 <div class="usage-section">
1906 <h3><a target="_blank" href="https://foliovision.com/player/live-streaming"><?php esc_html_e( 'Live Streaming', 'fv-player' ); ?></a></h3>
1907 <ul>
1908 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/live-streaming/live-streaming-youtube" title="Live Streaming With YouTube">Live Streaming With YouTube</a></li>
1909 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/live-streaming/stream-with-viloud" title="Live Streaming With Viloud">Live Streaming With Viloud</a></li>
1910 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/live-streaming/live-streaming-vimeo" title="Live Streaming With Vimeo">Live Streaming With Vimeo</a></li>
1911 </ul>
1912 </div>
1913 <div class="usage-section">
1914 <h3><a target="_blank" href="https://foliovision.com/player/video-ads"><?php esc_html_e( 'Video Advertising', 'fv-player' ); ?></a></h3>
1915 <ul>
1916 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/analytics/playback-stats" title="Playback Stats">Playback Stats</a></li>
1917 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/analytics/google-analytics-videos-4" title="Using Google Analytics 4 with FV Player">Google Analytics 4</a></li>
1918 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/analytics/google-analytics-fv-player" title="Using Google Universal Analytics with FV Player">Google Universal Analytics</a></li>
1919 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/analytics/matomo-analytics-fv-player" title="Using Matomo Analytics with FV Player">Matomo Analytics</a></li>
1920 </ul>
1921 </div>
1922 <div class="usage-section">
1923 <h3><a target="_blank" href="https://foliovision.com/player/analytics"><?php esc_html_e( 'Analytics', 'fv-player' ); ?></a></h3>
1924 <ul>
1925 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/advertising-with-fv-flowplayer" title="Advertising Options with FV Player">Advertising Options with FV Player</a></li>
1926 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/built-advertising-tools" title="Built-in Advertising Tools">Built-in Advertising Tools</a></li>
1927 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/built-advertising-tools/using-preroll-postroll-ads" title="Custom Video Ads in FV Player (pre-roll and post-roll)">Custom Video Ads in FV Player (pre-roll and post-roll)</a></li>
1928 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/built-advertising-tools/adding-popup-ads" title="Overlay Ads in FV Player">Overlay Ads in FV Player</a></li>
1929 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/built-advertising-tools/setting-up-html-popups" title="Video Actions: HTML Pop-ups">Video Actions: HTML Pop-ups</a></li>
1930 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/built-advertising-tools/setting-up-html-popup" title="Setting Up the HTML Pop-up Feature">Setting Up the HTML Pop-up Feature</a></li>
1931 </ul>
1932 </div>
1933 <div class="usage-section">
1934 <h3><a target="_blank" href="https://foliovision.com/player/video-ads/google-ads"><?php esc_html_e( 'Google Ads', 'fv-player' ); ?></a></h3>
1935 <ul>
1936 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/google-ads/google-advertising-options" title="Google Video Advertising Options">Google Video Advertising Options</a></li>
1937 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/video-ads/google-ads/incorporating-google-adsense" title="Incorporating Google Ads (AdSense)">Incorporating Google Ads (AdSense)</a></li>
1938 </ul>
1939 </div>
1940 <div class="usage-section">
1941 <h3><a target="_blank" href="https://foliovision.com/player/casting"><?php esc_html_e( 'Casting Options', 'fv-player' ); ?></a></h3>
1942 <ul>
1943 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/casting/chromecast" title="Using FV Player with Chromecast">Chromecast</a></li>
1944 </ul>
1945 </div>
1946 <div class="usage-section">
1947 <h3><a target="_blank" href="https://foliovision.com/player/audio"><?php esc_html_e( 'Audio Player', 'fv-player' ); ?></a></h3>
1948 <ul>
1949 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/audio/audio-tracks-player" title="How to Use Audio Tracks in FV Player">Audio Tracks in FV Player</a></li>
1950 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/audio/multiple-audio-tracks-player" title="How to Use Multiple Audio Tracks with FV Player">Multiple Audio Tracks</a></li>
1951 </ul>
1952 </div>
1953 <div class="usage-section">
1954 <h3><a target="_blank" href="https://foliovision.com/player/troubleshooting"><?php esc_html_e( 'Troubleshooting', 'fv-player' ); ?></a></h3>
1955 <ul>
1956 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/how-to-use-video-checker" title="How to Use the Built-in Video Checker">How to Use the Built-in Video Checker</a></li>
1957 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/switching-fv-player-pro-to-beta" title="Switching FV Player Pro to Beta">Switching FV Player Pro to Beta</a></li>
1958 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/compatibility" title="Flowplayer Compatibility - Incompatible Plugins">Incompatible Plugins and Scripts</a></li>
1959 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/troubleshooting-javascript-errors" title="Troubleshooting Javascript Errors">Troubleshooting Javascript Errors</a></li>
1960 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/encoding" title="Video Encoding for HTML 5">Video Encoding for HTML 5</a></li>
1961 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/troubleshooting/hls" title="Using HLS With FV Player">Using HLS With FV Player</a></li>
1962 </ul>
1963 </div>
1964 <div class="usage-section">
1965 <h3><a target="_blank" href="https://foliovision.com/player/developers"><?php esc_html_e( 'For Developers', 'fv-player' ); ?></a></h3>
1966 <ul>
1967 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/player-database" title="How to use FV Player Database">FV Player Database</a></li>
1968 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/shortcode-parameters" title="List of Shortcode Parameters">List of Shortcode Parameters</a></li>
1969 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/video-custom-fields" title="Setting up Video Custom Fields">Video Custom Fields</a></li>
1970 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/staging-sites-developers" title="Staging Sites For Developers">Staging Sites For Developers</a></li>
1971 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/using-fv-player-with-amp" title="Using FV Player With AMP">AMP</a></li>
1972 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/player-minify-plugins" title="Using FV Player with Minify Plugins">Minify Plugins</a></li>
1973 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/api-programming" title="Programmer's Guide">Programmer’s Guide</a></li>
1974 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/video-position-storing" title="Video Position Storing">Video Position Storing</a></li>
1975 </ul>
1976 </div>
1977 <div class="usage-section">
1978 <h3><a target="_blank" href="https://foliovision.com/player/developers/changelog"><?php esc_html_e( 'Changelog', 'fv-player' ); ?></a></h3>
1979 <ul>
1980 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/changelog/fv-player-pro" title="FV Player Pro Changelog">FV Player Pro Changelog</a></li>
1981 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/changelog/player-vast-changelog" title="FV Player VAST Changelog">FV Player VAST Changelog</a></li>
1982 </ul>
1983 </div>
1984 <div class="usage-section">
1985 <h3><a target="_blank" href="https://foliovision.com/player/legal"><?php esc_html_e( 'Legal', 'fv-player' ); ?></a></h3>
1986 <ul>
1987 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/legal/commercial-license" title="FV Player Pro Changelog">Commercial License</a></li>
1988 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/legal/downloading-legal-invoice" title="FV Player VAST Changelog">How to Download Your Legal Invoice</a></li>
1989 </ul>
1990 </div>
1991 </td>
1992 <td></td>
1993 </tr>
1994 </table>
1995 <?php
1996 }
1997
1998
1999 function fv_flowplayer_admin_database() {
2000 ?>
2001 <p>Here's the result of the last database upgrade check:</p>
2002 <?php
2003 global $FV_Player_Db;
2004 if( is_array($FV_Player_Db->getDatabaseUpgradeStatus()) ) {
2005 foreach( $FV_Player_Db->getDatabaseUpgradeStatus() AS $query ) {
2006 echo "<p><code>" . esc_html( $query[0] ) . "</code></p>";
2007 }
2008 }
2009 }
2010
2011 function fv_flowplayer_admin_embedded_on() {
2012 global $wpdb;
2013 $players_with_no_posts = $wpdb->get_var( "SELECT count(p.id) FROM {$wpdb->prefix}fv_player_players AS p LEFT JOIN {$wpdb->prefix}fv_player_playermeta AS m ON p.id = m.id_player AND m.meta_key = 'post_id' OR m.id IS NULL WHERE m.id IS NULL" );
2014
2015 $url = wp_nonce_url(
2016 add_query_arg(
2017 array(
2018 'page' => 'fvplayer',
2019 'action' => 'fv-player-embedded-on-fix',
2020 ),
2021 admin_url( 'options-general.php' )
2022 ),
2023 'fv-player-embedded-on-fix'
2024 );
2025
2026 if( $players_with_no_posts > 0 ) :
2027 ?>
2028 <p>It appears there are <?php echo intval( $players_with_no_posts ); ?> players which do not belong to any post.</p>
2029 <a href="<?php echo esc_url( $url ); ?>" class="button">Fix</a>
2030
2031 <?php else : ?>
2032 <p>All of your FV Players seem to have a post associated.</p>
2033 <?php endif;
2034 }
2035
2036
2037 function fv_flowplayer_admin_rollback() {
2038 global $fv_wp_flowplayer_ver;
2039 $base = 'admin.php?page=fvplayer&action=fv-player-rollback&version=';
2040 ?>
2041 <p>Are you having issues with version <?php echo esc_attr( $fv_wp_flowplayer_ver ); ?>?</p>
2042 <p>You can go back to the previous 7.5 version - without changes to Chromecast, WordPress audio/video handling, MPEG-DASH and YouTube:</p>
2043 </div>
2044 <div class="usage-section">
2045 <h3><a href="<?php echo wp_nonce_url( admin_url($base.'7.5.29.7210'), 'fv-player-rollback' ); ?>" class="button">Reinstall version 7.5.29.7210</a></h3>
2046 <?php
2047 }
2048
2049 function fv_flowplayer_admin_uninstall() {
2050 global $fv_fp;
2051
2052 ?>
2053 <p><?php echo wp_kses( __( 'Check this box if you would like FV Player to completely remove all of its data when the plugin is deleted. The <code>[fvplayer]</code> shortcodes will stop working.', 'fv-player' ), array( 'code' => array() ) ); ?></p>
2054 <table class="form-table2">
2055 <?php $fv_fp->_get_checkbox(__( 'Remove all data', 'fv-player' ), 'remove_all_data' , __( 'This action is irreversible, please backup your website if you are not absolutely sure.', 'fv-player' )); ?>
2056
2057 <tr>
2058 <td></td>
2059 <td>
2060 <?php
2061 // Verify that uninstall.php is there only if needed
2062 $remove_all_data = $fv_fp->_get_option( 'remove_all_data' );
2063
2064 if ( ! class_exists( 'WP_Filesystem_Direct' ) ) {
2065 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
2066 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
2067 }
2068
2069 $plugin_folder = basename( dirname( dirname( __FILE__ ) ) );
2070
2071 $wp_filesystem = new WP_Filesystem_Direct( '' );
2072 $uninstall_file_hint = 'wp-content/plugings/' . $plugin_folder . '/uninstall.php';
2073 $uninstall_file_real = $wp_filesystem->wp_plugins_dir() . $plugin_folder . '/uninstall.php';
2074
2075 if ( $remove_all_data && $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2076 <p style="font-weight: bold; color: #f00"><?php _e( 'Warning: If you deactivate and delete FV Player, all of its data will be removed!', 'fv-player'); ?>
2077 <?php elseif ( $remove_all_data && ! $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2078 <p>
2079 <?php printf( __( 'The <code>%s</code> file failed to create, full uninstall will not work.', 'fv-player' ), $uninstall_file_hint ); ?>
2080 </p>
2081 <?php elseif ( ! $remove_all_data && $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2082 <?php printf( __( 'The <code>%s</code> file is still present, please remove it by hand.', 'fv-player' ), $uninstall_file_hint ); ?>
2083 <?php endif; ?>
2084 </td>
2085 </tr>
2086 <tr>
2087 <td colspan="4">
2088 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
2089 </td>
2090 </tr>
2091 </table>
2092 <?php
2093 }
2094
2095 function fv_flowplayer_admin_checkbox( $name ) {
2096 global $fv_fp;
2097 ?>
2098 <input type="hidden" name="<?php echo esc_attr($name); ?>" value="false" />
2099 <input type="checkbox" name="<?php echo esc_attr($name); ?>" id="<?php echo esc_attr($name); ?>" value="true" <?php if( isset($fv_fp->conf[$name]) && $fv_fp->conf[$name] == 'true' ) echo 'checked="checked"'; ?> />
2100 <?php
2101 }
2102
2103 /* TABS */
2104 $fv_player_aSettingsTabs = array(
2105 array('id' => 'fv_flowplayer_settings', 'hash' => 'tab_basic', 'name' => __( 'Setup', 'fv-player' ) ),
2106 array('id' => 'fv_flowplayer_settings_skin', 'hash' => 'tab_skin', 'name' => __( 'Skin', 'fv-player' ) ),
2107 array('id' => 'fv_flowplayer_settings_hosting', 'hash' => 'tab_hosting', 'name' => __( 'Hosting', 'fv-player' ) ),
2108 array('id' => 'fv_flowplayer_settings_actions', 'hash' => 'tab_actions', 'name' => __( 'Actions', 'fv-player' ) ),
2109 array('id' => 'fv_flowplayer_settings_video_ads', 'hash' => 'tab_video_ads', 'name' => __( 'Video Ads', 'fv-player' ) ),
2110 array('id' => 'fv_flowplayer_settings_tools', 'hash' => 'tab_tools', 'name' => __( 'Tools', 'fv-player' ) ),
2111 array('id' => 'fv_flowplayer_settings_help', 'hash' => 'tab_help', 'name' => __( 'Help', 'fv-player' ) ),
2112 );
2113
2114
2115
2116 $fv_player_aSettingsTabs = apply_filters('fv_player_admin_settings_tabs',$fv_player_aSettingsTabs);
2117
2118 /* Setup tab */
2119 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description', 'fv_flowplayer_settings', 'normal', 'high' );
2120 add_meta_box( 'fv_flowplayer_interface_options', __( 'Post Interface Options', 'fv-player' ), 'fv_flowplayer_admin_interface_options', 'fv_flowplayer_settings', 'normal' );
2121 add_meta_box( 'fv_flowplayer_default_options', __( 'Sitewide FV Player Defaults', 'fv-player' ), 'fv_flowplayer_admin_default_options', 'fv_flowplayer_settings', 'normal' );
2122 add_meta_box( 'fv_flowplayer_autoplay_and_preloading', __( 'Autoplay and preloading', 'fv-player' ), 'fv_flowplayer_admin_autoplay_and_preloading', 'fv_flowplayer_settings', 'normal' );
2123 add_meta_box( 'fv_flowplayer_integrations', __( 'Integrations/Compatibility', 'fv-player' ), 'fv_flowplayer_admin_integrations', 'fv_flowplayer_settings', 'normal' );
2124 add_meta_box( 'fv_flowplayer_mobile', __( 'Mobile Settings', 'fv-player' ), 'fv_flowplayer_admin_mobile', 'fv_flowplayer_settings', 'normal' );
2125 add_meta_box( 'fv_flowplayer_seo', __( 'Video SEO', 'fv-player' ), 'fv_flowplayer_admin_seo', 'fv_flowplayer_settings', 'normal' );
2126 add_meta_box( 'fv_flowplayer_privacy', __( 'Privacy Settings', 'fv-player' ), 'fv_flowplayer_admin_privacy', 'fv_flowplayer_settings', 'normal' );
2127
2128 if( !class_exists('FV_Player_Pro') ) {
2129 add_meta_box( 'fv_player_pro', __( 'Pro Features', 'fv-player' ), 'fv_flowplayer_admin_pro', 'fv_flowplayer_settings', 'normal', 'low' );
2130 }
2131
2132 /* Skin Tab */
2133 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_skin', 'fv_flowplayer_settings_skin', 'normal', 'high' );
2134 add_meta_box( 'flowplayer-wrapper', __( 'Player Skin', 'fv-player' ), 'fv_flowplayer_admin_skin', 'fv_flowplayer_settings_skin', 'normal' );
2135 add_meta_box( 'fv_flowplayer_skin_playlist', __( 'Playlist', 'fv-player' ), 'fv_flowplayer_admin_skin_playlist', 'fv_flowplayer_settings_skin', 'normal' );
2136 add_meta_box( 'fv_flowplayer_skin_custom_css', __( 'Custom CSS', 'fv-player' ), 'fv_flowplayer_admin_custom_css', 'fv_flowplayer_settings_skin', 'normal' );
2137 add_meta_box( 'fv_flowplayer_skin_subtitles', __( 'Subtitles', 'fv-player' ), 'fv_flowplayer_admin_skin_subtitles', 'fv_flowplayer_settings_skin', 'normal' );
2138 add_meta_box( 'fv_flowplayer_skin_sticky', __( 'Sticky Video', 'fv-player' ), 'fv_flowplayer_admin_skin_sticky', 'fv_flowplayer_settings_skin', 'normal' );
2139
2140 /* Hosting Tab */
2141 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_hosting', 'fv_flowplayer_settings_hosting', 'normal', 'high' );
2142 add_meta_box( 'fv_flowplayer_amazon_options', __( 'Amazon S3 Protected Content', 'fv-player' ), 'fv_flowplayer_admin_amazon_options', 'fv_flowplayer_settings_hosting', 'normal' );
2143
2144 /* Actions Tab */
2145 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_actions', 'fv_flowplayer_settings_actions', 'normal', 'high' );
2146 add_meta_box( 'fv_flowplayer_end_of_video', __( 'End of Video', 'fv-player' ), 'fv_flowplayer_admin_end_of_video' , 'fv_flowplayer_settings_actions', 'normal', 'high' );
2147 add_meta_box( 'fv_flowplayer_popups', __( 'Custom Popups', 'fv-player' ), 'fv_flowplayer_admin_popups' , 'fv_flowplayer_settings_actions', 'normal', 'high' );
2148 add_meta_box( 'fv_flowplayer_ads', __( 'Overlay', 'fv-player' ), 'fv_flowplayer_admin_overlay', 'fv_flowplayer_settings_actions', 'normal' );
2149
2150 /* Video Ads Tab */
2151 if( !class_exists('FV_Player_Pro') ) {
2152 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_video_ads', 'fv_flowplayer_settings_video_ads', 'normal', 'high' );
2153 add_meta_box( 'fv_flowplayer_ads', __( 'Video Ads', 'fv-player' ), 'fv_flowplayer_admin_video_ads', 'fv_flowplayer_settings_video_ads', 'normal' );
2154 }
2155
2156 /* Tools tab */
2157 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_tools', 'fv_flowplayer_settings_tools', 'normal', 'high' );
2158 add_meta_box( 'fv_flowplayer_conversion', __( 'Conversion', 'fv-player' ), 'fv_flowplayer_settings_box_conversion', 'fv_flowplayer_settings_tools', 'normal' );
2159 add_meta_box( 'fv_flowplayer_database', __( 'Database', 'fv-player' ), 'fv_flowplayer_admin_database', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2160 add_meta_box( 'fv_flowplayer_embedded_on', __( 'Embeded Posts Information', 'fv-player' ), 'fv_flowplayer_admin_embedded_on', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2161 add_meta_box( 'fv_flowplayer_rollback', __( 'Rollback', 'fv-player' ), 'fv_flowplayer_admin_rollback', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2162 add_meta_box( 'fv_flowplayer_uninstall', __( 'Uninstall', 'fv-player' ), 'fv_flowplayer_admin_uninstall', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2163
2164 /* Help tab */
2165 add_meta_box( 'fv_flowplayer_usage', __( 'Usage', 'fv-player' ), 'fv_flowplayer_admin_usage', 'fv_flowplayer_settings_help', 'normal', 'high' );
2166
2167 ?>
2168
2169 <div class="wrap">
2170 <div style="position: absolute; margin-top: 10px; right: 10px;">
2171 <a href="https://foliovision.com/player" target="_blank" title="<?php esc_attr_e( 'Documentation', 'fv-player' ); ?>"><img alt="visit foliovision" src="<?php echo flowplayer::get_plugin_url().'/images/fv-logo.png' ?>" /></a>
2172 </div>
2173 <div>
2174 <div id="icon-options-general" class="icon32"></div>
2175 <h2>FV Player</h2>
2176 </div>
2177
2178 <?php
2179 global $fv_fp;
2180 do_action('fv_player_settings_pre');
2181 ?>
2182
2183 <form id="wpfp_options" method="post" action="">
2184
2185 <p id="fv_flowplayer_admin_buttons">
2186 <?php if( preg_match( '!^\$\d+!', $fv_fp->_get_option('key') ) ) : ?>
2187 <?php
2188 $fv_player_pro_path = FV_Wordpress_Flowplayer_Plugin_Private::get_plugin_path('fv-player-pro');
2189 if( is_plugin_inactive($fv_player_pro_path) && !is_wp_error(validate_plugin($fv_player_pro_path)) ) : ?>
2190 <input type="button" class='button fv-license-yellow fv_wp_flowplayer_activate_extension' data-plugin="<?php echo esc_attr( $fv_player_pro_path ); ?>" value="<?php esc_attr_e( 'Enable the Pro extension', 'fv-player' ); ?>" /> <img style="display: none; " src="<?php echo esc_attr( site_url() ); ?>/wp-includes/images/wpspin.gif" width="16" height="16" />
2191 <?php elseif( is_plugin_active($fv_player_pro_path) && !is_wp_error(validate_plugin($fv_player_pro_path)) ) : ?>
2192 <input type="button" class="button fv-license-active" onclick="window.location.href += '&fv_player_pro_installed=yes#fv_player_pro'" value="<?php esc_attr_e( 'Pro pack installed', 'fv-player' ); ?>" />
2193 <?php else : ?>
2194 <input type="submit" class="button fv-license-yellow" value="<?php esc_attr_e( 'Install Pro extension', 'fv-player' ); ?>" /><?php wp_nonce_field('fv_player_pro_install', 'nonce_fv_player_pro_install') ?>
2195 <?php endif; ?>
2196 <?php else : ?>
2197 <input type="button" class="button fv-license-inactive" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_license', '<?php echo wp_create_nonce( 'fv_wp_flowplayer_check_license' ); ?>'); return false" value="<?php esc_attr_e( 'Apply Pro upgrade', 'fv-player' ); ?>" />
2198 <?php endif; ?>
2199
2200 <input type="button" class="button" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_template', '<?php echo wp_create_nonce( 'fv_wp_flowplayer_check_template' ); ?>'); return false" value="<?php esc_attr_e( 'Check template', 'fv-player' ); ?>" />
2201 <!--<input type="button" class="button" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_files', '<?php echo wp_create_nonce( 'fv_wp_flowplayer_check_files' ); ?>')" value="<?php esc_attr_e( 'Check videos', 'fv-player' ); ?>" />-->
2202
2203 <?php if( !$fv_fp->_get_option('key') ) : ?>
2204 <a title="<?php esc_attr_e( 'Click here for license info', 'fv-player' ); ?>" target="_blank" href="https://foliovision.com/player/download"><span class="dashicons dashicons-editor-help"></span></a>
2205 <?php endif; ?>
2206 <img class="fv_wp_flowplayer_check_license-spin" style="display: none; " src="<?php echo esc_attr( site_url() ); ?>/wp-includes/images/wpspin.gif" width="16" height="16" />
2207 <img class="fv_wp_flowplayer_check_template-spin" style="display: none; " src="<?php echo esc_attr( site_url() ); ?>/wp-includes/images/wpspin.gif" width="16" height="16" />
2208 <img class="fv_wp_flowplayer_check_files-spin" style="display: none; " src="<?php echo esc_attr( site_url() ); ?>/wp-includes/images/wpspin.gif" width="16" height="16" />
2209 <?php do_action('fv_flowplayer_admin_buttons_after'); ?>
2210 </p>
2211 <div id="fv_flowplayer_admin_notices">
2212 </div>
2213
2214 <?php if( preg_match( '!^\$\d+!', $fv_fp->_get_option('key') ) || apply_filters('fv_player_skip_ads',false) ) : ?>
2215 <?php else : ?>
2216 <div id="fv_flowplayer_ad">
2217 <div class="text-part">
2218 <h2>FV <strong>Player</strong> Pro</h2>
2219 <span class="red-text"><?php esc_html_e( 'Host your videos anywhere', 'fv-player' ); ?></span>
2220 <ul>
2221 <li><?php esc_html_e( 'Pick your favorite CDN', 'fv-player' ); ?></li>
2222 <li><?php esc_html_e( 'Encrypt your videos to avoid downloading', 'fv-player' ); ?></li>
2223 <li><?php esc_html_e( 'Interactive transcript, AB loop&hellip;', 'fv-player' ); ?></li>
2224 </ul>
2225 <a href="https://foliovision.com/player/download" class="red-button"><strong><?php esc_html_e( 'Christmas sale!', 'fv-player' ); ?></strong><br /><?php esc_html_e( 'All Licenses 20% Off', 'fv-player' ); ?></a></p>
2226 </div>
2227 <div class="graphic-part">
2228 <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/buy">
2229 <img width="297" height="239" border="0" src="<?php echo flowplayer::get_plugin_url().'/images/fv-wp-flowplayer-led-monitor.png' ?>"> </a>
2230 </div>
2231 </div>
2232 <?php endif; ?>
2233
2234 <div id="fv_flowplayer_admin_tabs">
2235 <h2 class="fv-nav-tab-wrapper nav-tab-wrapper">
2236 <?php foreach($fv_player_aSettingsTabs as $key => $val):?>
2237 <a href="#postbox-container-<?php echo esc_attr( $val['hash'] ); ?>" class="nav-tab<?php if( $key == 0 ) : ?> nav-tab-active<?php endif; ?>" style="outline: 0px;"><?php echo wp_strip_all_tags( $val['name'] );?></a>
2238 <?php endforeach;?>
2239 <div id="fv_player_js_warning" style=" margin: 8px 40px; display: inline-block; color: darkgrey;" >There Is a Problem with JavaScript.</div>
2240 <style>
2241 #fv_player_js_warning {
2242 animation: cssAnimation 0s 5s forwards;
2243 visibility: hidden;
2244 }
2245 @keyframes cssAnimation {
2246 to { visibility: visible; }
2247 }
2248 </style>
2249 </h2>
2250 </div>
2251
2252 <div id="dashboard-widgets" class="metabox-holder fv-metabox-holder columns-1">
2253 <?php foreach($fv_player_aSettingsTabs as $key => $val):?>
2254 <div id='postbox-container-<?php echo esc_attr( $val['hash'] ); ?>' class='postbox-container'<?php if( $key > 0 ) : ?> style=""<?php endif; ?>>
2255 <?php do_meta_boxes($val['id'], 'normal', false ); ?>
2256 </div>
2257 <?php endforeach;?>
2258 <div style="clear: both"></div>
2259 </div>
2260 <?php
2261 wp_nonce_field( 'fv_flowplayer_settings_nonce', 'fv_flowplayer_settings_nonce' );
2262 wp_nonce_field( 'fv_flowplayer_settings_ajax_nonce', 'fv_flowplayer_settings_ajax_nonce', false );
2263 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
2264 wp_nonce_field( 'meta-box-order-nonce', 'meta-box-order-nonce', false );
2265 ?>
2266
2267 <input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes">
2268
2269 </form>
2270
2271 <div id="fv-player-settings-save-notice"></div>
2272
2273 </div>
2274 <script type="text/javascript" >
2275 function flowplayer_conversion_script() {
2276 jQuery('#fv-flowplayer-loader').show();
2277
2278 var data = {
2279 action: 'flowplayer_conversion_script',
2280 run: true
2281 };
2282
2283 jQuery.post(ajaxurl, data, function(response) {
2284 jQuery('#fv-flowplayer-loader').hide();
2285 jQuery('#conversion-results').html(response);
2286 jQuery('#fvwpflowplayer_conversion_notice').hide();
2287 });
2288 }
2289
2290 function fv_flowplayer_ajax_check( type, nonce ) {
2291 jQuery('.'+type+'-spin').show();
2292 var ajaxurl = '<?php echo esc_attr( site_url() ); ?>/wp-admin/admin-ajax.php';
2293 jQuery.post( ajaxurl, { action: type, nonce: nonce }, function( response ) {
2294 response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
2295 response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
2296 try {
2297 var obj = (jQuery.parseJSON( response ) );
2298 var css_class = '';
2299 jQuery('#fv_flowplayer_admin_notices').html('');
2300 if( obj.errors && obj.errors.length > 0 ) {
2301 jQuery('#fv_flowplayer_admin_notices').append( '<div class="error"><p>'+obj.errors.join('</p><p>')+'</p></div>' );
2302 } else {
2303 css_class = ' green';
2304 }
2305
2306 if( obj.ok && obj.ok.length > 0 ) {
2307 jQuery('#fv_flowplayer_admin_notices').append( '<div class="updated'+css_class+'"><p>'+obj.ok.join('</p><p>')+'</p></div>' );
2308 }
2309
2310 // Removed the FV Player Pro notice about expired license
2311 if(type == 'fv_wp_flowplayer_check_license') {
2312 jQuery('.fv-player-pro-admin_notice_license_error').remove();
2313 }
2314 } catch(err) {
2315 jQuery('#fv_flowplayer_admin_notices').append( jQuery('#wpbody', response ) );
2316
2317 }
2318
2319 jQuery('.'+type+'-spin').hide();
2320 } );
2321 }
2322
2323 var fv_flowplayer_amazon_s3_count = 0;
2324 jQuery('#amazon-s3-add').on('click', function() {
2325 var new_inputs = jQuery('tr.amazon-s3-1').clone();
2326 new_inputs.find("[name='amazon_key[]']").val('');
2327 new_inputs.find("[name='amazon_secret[]']").val('').show();
2328 new_inputs.find("[name='_is_secret_amazon_secret[]']").val(0); // set val to 0 - save new
2329 new_inputs.attr('class', new_inputs.attr('class') + '-' + fv_flowplayer_amazon_s3_count );
2330 new_inputs.find(':selected').prop('selected',false); // unselect
2331 new_inputs.find('.secret-preview').remove(); // remove secret preview
2332 new_inputs.find("[data-setting-change]").remove(); // remove change link
2333 new_inputs.insertBefore('.amazon-s3-last');
2334 fv_flowplayer_amazon_s3_count++;
2335 return false;
2336 });
2337
2338 function fv_fp_amazon_s3_remove(a) {
2339 jQuery( '.'+jQuery(a).parents('tr').attr('class') ).remove();
2340 }
2341 </script>
2342
2343
2344 <script type="text/javascript">
2345 console.log( 'FV Player Settings screen loading...');
2346 jQuery(window).one( 'load', function() {
2347 console.log( 'FV Player Settings screen initializing settings boxes...');
2348
2349 // close postboxes that should be closed
2350 jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
2351
2352 // postboxes setup
2353 setTimeout( function() {
2354 // check if not already initialized
2355 if( jQuery('.fv-metabox-holder #normal-sortables.ui-sortable').length == 0 ) {
2356 postboxes.add_postbox_toggles('fv_flowplayer_settings');
2357
2358 // Prevent other plugins from interferring
2359 postboxes.add_postbox_toggles = function() {
2360 console.log('FV Player Settings screen prevented duplciate add_postbox_toggles call!');
2361 }
2362 }
2363 }, 100 );
2364
2365 jQuery('.fv_wp_flowplayer_activate_extension').on('click', function() { // todo: block multiple clicks
2366 var button = jQuery(this);
2367 button.siblings('img').eq(0).show();
2368
2369 jQuery.post( ajaxurl, { action: 'fv_wp_flowplayer_activate_extension', nonce: '<?php echo wp_create_nonce( 'fv_wp_flowplayer_activate_extension' ); ?>', plugin: jQuery(this).attr("data-plugin") }, function( response ) {
2370 button.siblings('img').eq(0).hide();
2371
2372 var obj;
2373 try {
2374 response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
2375 response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
2376 obj = jQuery.parseJSON( response );
2377
2378 button.removeClass('fv_wp_flowplayer_activate_extension');
2379 button.attr('value',obj.message);
2380
2381 if( typeof(obj.error) == "undefined" ) {
2382 //window.location.hash = '#'+jQuery(button).attr("data-plugin");
2383 //window.location.reload(true);
2384 window.location.href = window.location.href;
2385 }
2386 } catch(e) { // todo: what if there is "<p>Plugin install failed.</p>"
2387 button.after('<p>Error parsing JSON</p>');
2388 return;
2389 }
2390
2391 } ).error(function() {
2392 button.siblings('img').eq(0).hide();
2393 button.after('<p>Error!</p>');
2394 });
2395 } );
2396
2397 jQuery('.fv-flowplayer-admin-addon-installed').on('click', function() {
2398 jQuery('html, body').animate({
2399 scrollTop: jQuery("#"+jQuery(this).attr("data-plugin") ).offset().top
2400 }, 1000);
2401 } );
2402
2403 jQuery('.show-more').on('click', function(e) {
2404 e.preventDefault();
2405
2406 var more = jQuery('.more', jQuery(this).parents('tr') ).length ? jQuery('.more', jQuery(this).parents('tr') ) : jQuery(this).parent().siblings('.more');
2407
2408 more.toggle();
2409
2410 } );
2411
2412 jQuery('.show-info').on('click', function(e) {
2413 e.preventDefault();
2414 jQuery('.fv-player-admin-tooltip', jQuery(this).parents('tr') ).toggle();
2415 } );
2416
2417 /*
2418 * Color Picker Default
2419 */
2420 jQuery('.playlistFontColor-show').on('click', function(e){
2421 e.preventDefault();
2422 jQuery(e.target).hide();
2423 jQuery('.playlistFontColor-hide').show();
2424
2425 jQuery('#playlistFontColor-proxy').show().val(jQuery('#playlistFontColor-proxy').data('previous')).trigger('change');
2426 jQuery('#playlistFontColor').val(jQuery('#playlistFontColor-proxy').data('previous'));
2427 });
2428
2429 jQuery('.playlistFontColor-hide').on('click', function(e){
2430 e.preventDefault();
2431 jQuery(e.target).hide();
2432 jQuery('.playlistFontColor-show').show();
2433
2434 jQuery('#playlistFontColor-proxy').data('previous',jQuery('#playlistFontColor-proxy').hide().val()).val('').trigger('change');
2435 jQuery('#playlistFontColor').val('');
2436 });
2437
2438 jQuery('#playlistFontColor-proxy').on('change',function(e){
2439 jQuery('#playlistFontColor').val(jQuery(e.target).val());
2440 });
2441
2442 /*
2443 Ensure only one of "Load JavaScript everywhere" and "Optimize JavaScript loading" can be enabled
2444 */
2445 var cb_js_everywhere = jQuery('#js-everywhere'),
2446 cb_js_optimize = jQuery('#js-optimize');
2447
2448 function check_js_everywhere( was_clicked ) {
2449 if( was_clicked && cb_js_optimize.prop('checked') ) {
2450 alert('Cannot be used together with "Optimize JavaScript loading".');
2451 return false;
2452 }
2453
2454 cb_js_optimize.prop('readonly', cb_js_everywhere.prop('checked') );
2455 }
2456 cb_js_everywhere.on( 'click', check_js_everywhere );
2457 check_js_everywhere();
2458
2459 function check_js_optimize( was_clicked ) {
2460 if( was_clicked && cb_js_everywhere.prop('checked') ) {
2461 alert('Cannot be used together with "Load JavaScript everywhere".');
2462 return false;
2463 }
2464
2465 cb_js_everywhere.prop('readonly', cb_js_optimize.prop('checked') );
2466 }
2467 cb_js_optimize.on( 'click', check_js_optimize );
2468 check_js_optimize();
2469
2470 console.log( 'FV Player Settings screen initializing finished.');
2471 });
2472 </script>
2473
2474 <script>
2475 /* TABS */
2476 jQuery( function($) {
2477 function set_visible_tab() {
2478 $('#fv_player_js_warning').hide();
2479
2480 var anchor = window.location.hash.substring(1),
2481 skin_anchor = window.location.hash.substring(1);
2482
2483 if( !anchor || !anchor.match(/tab_/) ) {
2484 if ( skin_anchor.match( /skin-tab-/ ) ) {
2485 anchor = 'postbox-container-tab_skin';
2486 } else {
2487 anchor = 'postbox-container-tab_basic';
2488 }
2489 }
2490
2491 if ( ! skin_anchor || ! skin_anchor.match( /skin-tab-/ ) ) {
2492 skin_anchor = 'skin-tab-skin';
2493 }
2494
2495 $('#fv_flowplayer_admin_tabs .nav-tab, #fv_flowplayer_admin_skin_tabs .nav-tab').removeClass('nav-tab-active');
2496 $('[href=\\#'+anchor+']').addClass('nav-tab-active');
2497 $('#dashboard-widgets .postbox-container').hide();
2498 $('#' + anchor).show();
2499
2500 $( '[href=\\#' + skin_anchor + ']' ).addClass('nav-tab-active');
2501 $( '.skin-tab-content' ).hide();
2502 $( '#' + skin_anchor ).show();
2503
2504 // scroll to the top of skin_anchor
2505 var offset = $( '#' + skin_anchor ).offset().top - 120;
2506 window.scrollTo(0, offset);
2507 }
2508
2509 set_visible_tab();
2510
2511 $( '.settings-section-link' ).on('click', function(e) {
2512 location.hash = $(this).attr('href');
2513 set_visible_tab();
2514 return false;
2515 });
2516 });
2517
2518 jQuery('#fv_flowplayer_admin_tabs a').on('click',function(e){
2519 if ( history.pushState ) {
2520 history.pushState( null, null, e.target.hash );
2521 }
2522
2523 var anchor = jQuery(this).attr('href').substring(1);
2524 jQuery('#fv_flowplayer_admin_tabs .nav-tab').removeClass('nav-tab-active');
2525 jQuery('[href=\\#'+anchor+']').addClass('nav-tab-active');
2526 jQuery('#dashboard-widgets .postbox-container').hide();
2527 jQuery('#' + anchor).show();
2528
2529 return false;
2530 });
2531
2532 jQuery('#fv_flowplayer_admin_skin_tabs a').on('click',function(e){
2533 if ( history.pushState ) {
2534 history.pushState( null, null, e.target.hash );
2535 }
2536
2537 var anchor = jQuery(this).attr('href').substring(1);
2538 jQuery('#fv_flowplayer_admin_skin_tabs .nav-tab').removeClass('nav-tab-active');
2539 jQuery('[href=\\#'+anchor+']').addClass('nav-tab-active');
2540 jQuery( '.skin-tab-content' ).hide();
2541 jQuery('#' + anchor).show();
2542
2543 return false;
2544 });
2545
2546 jQuery('#normal-sortables .button-primary').on('click',function(e){
2547 if ('fv-wp-flowplayer-submit' == this.name) {
2548 // store windows scroll position, so we can return to the same spot after reload
2549 if (localStorage) {
2550 localStorage["fv_posStorage"] = jQuery(window).scrollTop();
2551 }
2552 }
2553
2554 return true;
2555 });
2556
2557 jQuery(window).on('load', function() {
2558 setTimeout(function() {
2559 if (localStorage) {
2560 var posReader = localStorage["fv_posStorage"];
2561 if (posReader) {
2562 jQuery(window).scrollTop(posReader);
2563 localStorage.removeItem("fv_posStorage");
2564 }
2565 }
2566 }, 100);
2567 });
2568
2569 jQuery('a.fv-settings-anchor').on('click',function(e){
2570 var id = jQuery(this).attr('href');
2571 if( id.match(/^#./) ){
2572 var el = jQuery(id);
2573 if(el.length){
2574 var tab = el.parents('.postbox-container').attr('id');
2575 jQuery('#fv_flowplayer_admin_tabs').find('a[href=\\#'+tab+']').click()
2576 }
2577 }
2578 });
2579
2580
2581
2582
2583
2584 </script>
2585