PluginProbe
FV Player 8 / trunk
FV Player 8 vtrunk
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 trunk, at view/admin.php

2,617 lines 143.0 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 <table class="form-table2">
427 <tr>
428 <td class="first"></td>
429 <td>
430 <?php
431 $radio_butons = array();
432 $radio_butons_descriptions = array();
433
434 foreach( array(
435 'false' => array(
436 'label' => __( 'Off', 'fv-player' )
437 ),
438 'preload' => array(
439 'label' => __( 'Video Preload', 'fv-player' ),
440 'description' => __( 'First 3 videos on page will preload (or 1 if it\'s HLS). Then it will play instantly when clicked.', 'fv-player' )
441 ),
442 'viewport' => array(
443 'label' => __( 'Autoplay Video in Viewport', 'fv-player' ),
444 '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' )
445 ),
446 'sticky' => array(
447 'label' => __( 'Sticky Autoplay', 'fv-player' ),
448 'description' => __( 'The video will autoplay and become sticky - following user\'s scroll position.', 'fv-player' )
449 )
450 ) AS $key => $field ) {
451 $id = 'autoplay_preload_'.esc_attr($key);
452
453 $radio_button = '<input id="'.$id.'" type="radio" name="autoplay_preload" value="'.esc_attr($key).'"';
454 if( $value === $key || wp_json_encode($value) == $key ) { // use wp_json_encode as value can be boolean
455 $radio_button .= ' checked="checked"';
456 }
457 $radio_button .= ' />';
458 $radio_button .= '<label for="'.$id.'">'.$field['label'].'</label><br />';
459
460 $radio_butons[] = $radio_button;
461
462 if( !empty($field['description']) ) {
463 $radio_butons_descriptions[$key] = $field['description'];
464 }
465 }
466
467 echo '<div class="descriptions">';
468 foreach( $radio_butons_descriptions AS $key => $description ) {
469 echo '<p class="description" data-describe="' . esc_attr( $key ) . '">' . esc_html( $description ) . '</p>';
470 }
471 echo '</div>';
472
473 echo implode( $radio_butons );
474 ?>
475 </td>
476 </td>
477 </tr>
478 <?php do_action('fv_flowplayer_autoplay_and_preloading_inputs_after'); ?>
479 <tr>
480 <td colspan="4">
481 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
482 </td>
483 </tr>
484 </table>
485 <div class="clear"></div>
486
487 <script>
488 jQuery( function($) {
489 show_description_autoplay();
490
491 $('[name=autoplay_preload]' ).on( 'change', show_description_autoplay );
492
493 function show_description_autoplay() {
494 $( '#fv_flowplayer_autoplay_and_preloading [data-describe]' ).hide();
495 $( '#fv_flowplayer_autoplay_and_preloading [data-describe='+$('[name=autoplay_preload]:checked').val()+']' ).show();
496 }
497 } );
498 </script>
499 <?php
500 }
501
502 /*
503 * Setup Tab Description
504 */
505 function fv_flowplayer_admin_description() {
506 ?>
507 <table class="form-table">
508 <tr>
509 <td colspan="4">
510 <p>
511 <?php esc_html_e( 'FV Player is a free, easy-to-use, and complete solution for embedding', 'fv-player' ); ?>
512 <strong>MP4</strong>, <strong>WEBM</strong>, <strong>OGV</strong>, <strong>MOV</strong>
513 <?php esc_html_e( 'and', 'fv-player' ); ?>
514 <strong>FLV</strong>
515 <?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' ); ?>
516 </p>
517 </td>
518 </tr>
519 </table>
520 <?php
521 }
522
523 /*
524 * Skin Tab Description
525 */
526 function fv_flowplayer_admin_description_skin() {
527 ?>
528 <table class="form-table">
529 <tr>
530 <td colspan="4">
531 <p>
532 <?php esc_html_e( 'You can customize the colors of the player to match your website.', 'fv-player' ); ?>
533 </p>
534 </td>
535 </tr>
536 </table>
537 <?php
538 }
539
540 /*
541 * Hosting Tab Description
542 */
543 function fv_flowplayer_admin_description_hosting() {
544 ?>
545 <table class="form-table">
546 <tr>
547 <td colspan="4">
548 <p>
549 <?php esc_html_e( 'Here you can enable and configure advanced hosting options.', 'fv-player' ); ?>
550 </p>
551 </td>
552 </tr>
553 </table>
554 <?php
555 }
556
557 /*
558 * Actions Tab Description
559 */
560 function fv_flowplayer_admin_description_actions() {
561 ?>
562 <table class="form-table">
563 <tr>
564 <td colspan="4">
565 <p>
566 <?php esc_html_e( 'Here you can configure ads and banners that will be shown in the video.', 'fv-player' ); ?>
567 </p>
568 </td>
569 </tr>
570 </table>
571 <?php
572 }
573
574 /*
575 * Actions Tab Description
576 */
577 function fv_flowplayer_admin_description_tools() {
578 ?>
579 <table class="form-table">
580 <tr>
581 <td colspan="4">
582 <p>
583 <?php esc_html_e( 'Maintenance tools and debug info.', 'fv-player' ); ?>
584 </p>
585 <p>
586 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>
587 </p>
588 </td>
589 </tr>
590 </table>
591 <?php
592 }
593
594 /*
595 * Video Ads Tab Description
596 */
597 function fv_flowplayer_admin_description_video_ads() {
598 ?>
599 <table class="form-table">
600 <tr>
601 <td colspan="4">
602 <p>
603 <?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() ) ) ); ?>
604 </p>
605 <p>
606 <?php esc_html_e( 'You can configure video ads globally, or on a per video basis.', 'fv-player' ); ?>
607 </p>
608 <p>
609 <?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() ) ) ); ?>
610 </p>
611 </td>
612 </tr>
613 </table>
614 <?php
615 }
616
617 function fv_flowplayer_admin_integrations() {
618 global $fv_fp;
619 ?>
620 <p><?php esc_html_e( 'Following options are suitable for web developers and programmers.', 'fv-player' ); ?></p>
621 <table class="form-table2">
622 <?php $fv_fp->_get_checkbox(__( 'Debug Console', 'fv-player' ), 'debug_log', __( 'Print debug messages to browser console.', 'fv-player' ) ); ?>
623
624 <?php
625 $fv_fp->_get_checkbox( __( 'Debug Log', 'fv-player' ), 'debug_file', __( 'Log important events into log file.', 'fv-player' ) );
626
627 if ( ! empty( $fv_fp->_get_option('debug_file') ) ) : ?>
628 <tr>
629 <td></td>
630 <td>
631 <?php $fv_fp->log_file_settings_field(); ?>
632 </td>
633 </tr>
634 <?php endif; ?>
635
636 <?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' ) ); ?>
637 <?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' )); ?>
638
639 <tr>
640 <td><label for="css_disable"><?php esc_html_e( 'Enable profile videos', 'fv-player' ).' (beta)'; ?>:</label></td>
641 <td>
642 <div class="description">
643 <input type="hidden" name="profile_videos_enable_bio" value="false" />
644 <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"'; ?> />
645 <?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>
646 <div class="more">
647 <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>
648 <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>
649 <blockquote>
650 <pre>
651 &lt;?php if ( is_author() &amp;&amp; get_the_author_meta( 'description' ) ) : ?&gt;
652 &lt;div class=&quot;author-info&quot;&gt;
653 &lt;div class=&quot;author-avatar&quot;&gt;
654 &lt;?php echo get_avatar( get_the_author_meta( 'user_email' ) ); ?&gt;
655 &lt;/div&gt;
656
657 &lt;div class=&quot;author-description&quot;&gt;
658 &lt;?php the_author_meta( 'description' ); ?&gt;
659 &lt;/div&gt;
660 &lt;/div&gt;
661 &lt;?php endif; ?&gt;
662 </pre>
663 </blockquote>
664 <p><?php esc_html_e('We will be adding integration for it for popular user profile plugins.', 'fv-player'); ?></p>
665
666 </div>
667 </div>
668 </td>
669 </tr>
670
671 <?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.', '' ); ?>
672 <?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' ) ); ?>
673 <?php $fv_fp->_get_checkbox(
674 array(
675 'name' => __( 'Optimize JavaScript loading', 'fv-player' ),
676 'key' => 'js-optimize',
677 'help' =>
678 flowplayer::is_wp_rocket_setting( 'delay_js' ) ?
679 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' ) ) :
680 __( 'Helps with Google PageSpeed scores.', 'fv-player' ),
681 'more' => __( 'FV Player JavaScript will be only loaded once the user user start to use the page or on video tap.', 'fv-player' ),
682 'disabled' => flowplayer::is_wp_rocket_setting( 'delay_js' ),
683 )
684 ); ?>
685 <?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' ) ); ?>
686 <?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' ) ); ?>
687 <?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' ) ); ?>
688 <?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' ) ); ?>
689 <?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' ) ); ?>
690
691 <!--<tr>
692 <td style="width: 350px"><label for="optimizepress2">Handle OptimizePress 2 videos (<abbr title="Following attributes are not currently supported: margin, border">?</abbr>):</label></td>
693 <td>
694 <input type="hidden" name="integrations[optimizepress2]" value="false" />
695 <input type="checkbox" name="integrations[optimizepress2]" id="optimizepress2" value="true" <?php if( $fv_fp->_get_option( array( 'integrations', 'optimizepress2' ) ) ) echo 'checked="checked"'; ?> />
696 </td>
697 </tr>-->
698
699 <?php do_action('fv_flowplayer_admin_integration_options_after'); ?>
700 <tr>
701 <td colspan="4">
702 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
703 <a class="button fv-help-link" href="https://foliovision.com/player/settings/integrations-compatibility-options" target="_blank">Help</a>
704 </td>
705 </tr>
706 </table>
707 <?php
708 }
709
710
711 function fv_flowplayer_admin_mobile() {
712 global $fv_fp;
713 ?>
714 <table class="form-table2">
715 <?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' ) ); ?>
716 <?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' ) ); ?>
717 <?php
718 $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' ) );
719 ?>
720 <tr>
721 <td colspan="4">
722 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
723 <a class="button fv-help-link" href="https://foliovision.com/player/settings/mobile-settings-behaviors" target="_blank">Help</a>
724 </td>
725 </tr>
726 </table>
727 <?php
728 }
729
730
731 function fv_flowplayer_admin_privacy() {
732 global $fv_fp;
733 ?>
734 <table class="form-table2">
735 <?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' ) ); ?>
736 <tr>
737 <td colspan="4">
738 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
739 <a class="button fv-help-link" href="https://foliovision.com/2021/12/private-video-no-cookies" target="_blank">Help</a>
740 </td>
741 </tr>
742 </table>
743 <?php
744 }
745
746
747 function fv_flowplayer_admin_seo() {
748 global $fv_fp;
749 ?>
750 <table class="form-table2">
751 <?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' ) ); ?>
752 <?php do_action( 'fv_flowplayer_admin_seo_after'); ?>
753 <tr>
754 <td colspan="4">
755 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
756 <a class="button fv-help-link" href="https://foliovision.com/player/settings/video-seo-schema-xml" target="_blank">Help</a>
757 </td>
758 </tr>
759 </table>
760 <?php
761 }
762
763
764 function fv_flowplayer_admin_select_popups($aArgs){
765
766 $aPopupData = apply_filters( 'fv_player_admin_popups_defaults', get_option( 'fv_player_popups', array() ) );
767
768
769 $sId = (isset($aArgs['id'])?$aArgs['id']:'popups_default');
770 $aArgs = wp_parse_args( $aArgs, array( 'id'=>$sId, 'cva_id'=>'', 'show_default' => false ) );
771 ?>
772 <select id="<?php echo esc_attr( $aArgs['id'] ); ?>" name="<?php echo esc_attr( $aArgs['id'] ); ?>">
773 <?php if( $aArgs['show_default'] ) : ?>
774 <option>Use site default</option>
775 <?php endif; ?>
776 <option <?php if( $aArgs['item_id'] == 'no' ) echo 'selected '; ?>value="no"><?php esc_html_e( 'None', 'fv-player' ); ?></option>
777 <option <?php if( $aArgs['item_id'] == 'random' ) echo 'selected '; ?>value="random"><?php esc_html_e( 'Random', 'fv-player' ); ?></option>
778 <?php
779 if( isset($aPopupData) && is_array($aPopupData) && count($aPopupData) > 0 ) {
780 foreach( $aPopupData AS $key => $aPopupAd ) {
781 ?><option <?php if( $aArgs['item_id'] == $key ) echo 'selected'; ?> value="<?php echo esc_attr( $key ); ?>"><?php
782 echo esc_html( $key );
783 if( !empty($aPopupAd['title']) ) echo ' - ' . esc_html( $aPopupAd['title'] );
784 if( !empty($aPopupAd['name']) ) echo ' - ' . esc_html( $aPopupAd['name'] );
785 if( !empty($aPopupAd['disabled']) && $aPopupAd['disabled'] == 1 ) echo ' (currently disabled)';
786 ?></option><?php
787 }
788 } ?>
789 </select>
790 <?php
791 }
792
793
794 function fv_flowplayer_admin_end_of_video(){
795 global $fv_fp;
796 ?>
797 <table class="form-table2" style="margin: 5px; ">
798 <tr>
799 <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>
800 <td>
801 <?php $cva_id = $fv_fp->_get_option('popups_default'); ?>
802 <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>
803 </td>
804 </tr>
805 <tr>
806 <td colspan="4">
807 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
808 </td>
809 </tr>
810 </table>
811 <?php
812 }
813
814
815 function fv_flowplayer_admin_popups(){
816 global $fv_fp;
817 ?>
818 <p><?php esc_html_e( 'Add any popups here which you would like to use with multiple videos.', 'fv-player' ); ?></p>
819 <table class="form-table2" style="margin: 5px; ">
820 <tr>
821 <td>
822 <table id="fv-player-popups-settings">
823 <thead>
824 <tr>
825 <td>ID</td>
826 <td></td>
827 <td><?php esc_html_e( 'Status', 'fv-player' ); ?></td>
828 </tr>
829 </thead>
830 <tbody>
831 <?php
832 $aPopupData = get_option('fv_player_popups');
833 if( empty($aPopupData) ) {
834 $aPopupData = array( 1 => array() );
835 } else {
836 $aPopupData = array( '#fv_popup_dummy_key#' => array() ) + $aPopupData ;
837 }
838
839 foreach ($aPopupData AS $key => $aPopup) {
840 $value = ! empty( $aPopup['html'] ) ? $aPopup['html'] : '';
841 $lines = ! empty( $aPopup['html'] ) ? substr_count( $aPopup['html'], "\n" ) + 2 : 2;
842 ?>
843 <tr class='data' id="fv-player-popup-item-<?php echo esc_html( $key ); ?>"<?php echo $key === '#fv_popup_dummy_key#' ? 'style="display:none"' : ''; ?>>
844 <td class='id'><?php echo esc_html( $key ); ?></td>
845 <td>
846 <table class='fv-player-popup-formats'>
847 <tr>
848 <td><label><?php esc_html_e( 'Name', 'fv-player' ); ?>:</label></td>
849 <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>
850 </tr>
851 <tr>
852 <td><label>HTML:</label></td>
853 <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>
854 </tr>
855 <tr>
856 <td><label><?php echo wp_kses( __( 'Custom<br />CSS', 'fv-player' ), array( 'br' => array() ) ); ?>:</label></td>
857 <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>
858 </tr>
859 </table>
860 </td>
861 <td>
862 <input type='hidden' name='popups[<?php echo esc_attr( $key ); ?>][disabled]' value='0' />
863 <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"' : ''); ?> />
864 <label for='PopupAdPause-<?php echo esc_html( $key ); ?>'><?php esc_html_e( 'Show on pause', 'fv-player' ); ?></label><br />
865 <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"' : ''); ?> />
866 <label for='PopupAdDisabled-<?php echo esc_html( $key ); ?>'><?php esc_html_e( 'Disable', 'fv-player' ); ?></label><br />
867 <a class='fv-player-popup-remove' href=''><?php esc_html_e( 'Remove', 'fv-player' ); ?></a></td>
868 </tr>
869 <?php
870 }
871 ?>
872 </tbody>
873 </table>
874 </td>
875 </tr>
876 <tr>
877 <td>
878 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
879 <input type="button" value="<?php esc_attr_e( 'Add more Popups', 'fv-player' ); ?>" class="button" id="fv-player-popups-add" />
880 </td>
881 </tr>
882 </table>
883
884 <script>
885
886 jQuery('#fv-player-popups-add').on('click', function() {
887 var fv_player_popup_index = (parseInt( jQuery('#fv-player-popups-settings tr.data:last .id').html() ) || 0 ) + 1;
888 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 + ""));
889 jQuery('#fv-player-popup-item-'+fv_player_popup_index).show();
890 return false;
891 } );
892
893 jQuery(document).on('click','.fv-player-popup-remove', false, function() {
894 if( confirm('Are you sure you want to remove the popup ad?') ){
895 jQuery(this).parents('.data').remove();
896 if(jQuery('#fv-player-popups-settings .data').length === 1) {
897 jQuery('#fv-player-popups-add').trigger('click');
898 }
899 }
900 return false;
901 } );
902 </script>
903 <?php
904 }
905
906
907 function fv_flowplayer_admin_interface_options() {
908 global $fv_fp;
909 ?>
910 <p><?php esc_html_e( 'Which features should be available in shortcode editor?', 'fv-player' ); ?></p>
911 <table class="form-table2">
912 <?php $fv_fp->_get_checkbox(__( 'Autoplay', 'fv-player' ), array('interface', 'autoplay') ); ?>
913 <?php $fv_fp->_get_checkbox(__( 'Controlbar', 'fv-player' ), array('interface', 'controlbar') ); ?>
914 <?php $fv_fp->_get_checkbox(__( 'Embed', 'fv-player' ), array('interface', 'embed') ); ?>
915 <?php $fv_fp->_get_checkbox(__( 'LMS | Teaching', 'fv-player' ), array('interface', 'lms_teaching') ); ?>
916 <?php $fv_fp->_get_checkbox(__( 'Mobile Video', 'fv-player' ), array('interface', 'mobile') ); ?>
917 <?php $fv_fp->_get_checkbox(__( 'Playlist Auto Advance', 'fv-player' ), array('interface', 'playlist_advance') ); ?>
918 <?php $fv_fp->_get_checkbox(__( 'Playlist Style', 'fv-player' ), array('interface', 'playlist') ); ?>
919 <?php $fv_fp->_get_checkbox(__( 'Playlist Item Titles', 'fv-player' ), array('interface', 'playlist_titles') ); ?>
920 <?php $fv_fp->_get_checkbox(__( 'Sharing Buttons', 'fv-player' ), array('interface', 'share') ); ?>
921 <?php $fv_fp->_get_checkbox(__( 'Speed Buttons', 'fv-player' ), array('interface', 'speed') ); ?>
922 <?php $fv_fp->_get_checkbox(__( 'Splash Text', 'fv-player' ), array('interface', 'splash_text') ); ?>
923 <?php $fv_fp->_get_checkbox(__( 'Sticky', 'fv-player' ), array('interface', 'sticky') ); ?>
924 <?php $fv_fp->_get_checkbox(__( 'Synopsis', 'fv-player' ), array('interface', 'synopsis') ); ?>
925
926 <?php do_action('fv_flowplayer_admin_interface_options_after'); ?>
927
928 <tr>
929 <td colspan="4">
930 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
931 <a class="button fv-help-link" href="https://foliovision.com/player/settings/post-interface-settings" target="_blank">Help</a>
932 </td>
933 </tr>
934 </table>
935 <?php
936 }
937
938
939 function fv_flowplayer_admin_pro() {
940 global $fv_fp;
941
942 if( flowplayer::is_licensed() ) {
943 $aCheck = get_transient( 'fv-player-pro_license' );
944 }
945
946 if( isset($aCheck->valid) && $aCheck->valid ) : ?>
947 <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>
948 <?php else : ?>
949 <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>
950 <?php endif; ?>
951 <table class="form-table2">
952 <tr>
953 <td class="first"><label><?php esc_html_e( 'Advanced Vimeo embeding', 'fv-player' ); ?>:</label></td>
954 <td>
955 <p class="description">
956 <input type="checkbox" checked="checked" disabled="true" />
957 <?php esc_html_e( 'Use Vimeo as your video host and use all of FV Player features.', 'fv-player' ); ?>
958 </p>
959 </td>
960 </tr>
961 <tr>
962 <td><label><?php esc_html_e( 'Advanced YouTube embeding', 'fv-player' ); ?>:</label></td>
963 <td>
964 <p class="description">
965 <input type="checkbox" checked="checked" disabled="true" />
966 <?php esc_html_e( 'Use YouTube as your video host and use all of FV Player features.', 'fv-player' ); ?>
967 </p>
968 </td>
969 </tr>
970 <tr>
971 <td><label><?php esc_html_e( 'Enable user defined AB loop', 'fv-player' ); ?>:</label></td>
972 <td>
973 <p class="description">
974 <input type="checkbox" checked="checked" disabled="true" />
975 <?php esc_html_e( 'Let your users repeat the parts of the video which they like!', 'fv-player' ); ?>
976 </p>
977 </td>
978 </tr>
979 <tr>
980 <td><label><?php esc_html_e( 'Enable video lightbox', 'fv-player' ); ?>:</label></td>
981 <td>
982 <p class="description">
983 <input type="checkbox" checked="checked" disabled="true" />
984 <?php esc_html_e( 'Enables Lightbox video gallery to show videos in a lightbox popup!', 'fv-player' ); ?>
985 </p>
986 </td>
987 </tr>
988 <tr>
989 <td><label><?php esc_html_e( 'Enable quality switching', 'fv-player' ); ?>:</label></td>
990 <td>
991 <p class="description">
992 <input type="checkbox" checked="checked" disabled="true" />
993 <?php esc_html_e( 'Upload your videos in multiple quality for best user experience with YouTube-like quality switching!', 'fv-player' ); ?>
994 </p>
995 </td>
996 </tr>
997 <tr>
998 <td><label><?php esc_html_e( 'Amazon CloudFront protected content', 'fv-player' ); ?>:</label></td>
999 <td>
1000 <p class="description">
1001 <input type="checkbox" checked="checked" disabled="true" />
1002 <?php esc_html_e( 'Protect your Amazon CDN hosted videos', 'fv-player' ); ?>.
1003 </p>
1004 </td>
1005 </tr>
1006 <tr>
1007 <td><label><?php esc_html_e( 'Autoplay just once', 'fv-player' ); ?>:</label></td>
1008 <td>
1009 <p class="description">
1010 <input type="checkbox" disabled="true" />
1011 <?php esc_html_e( 'Makes sure each video autoplays only once for each visitor.', 'fv-player' ); ?>
1012 </p>
1013 </td>
1014 </tr>
1015 <tr>
1016 <td><label><?php esc_html_e( 'Enable video ads', 'fv-player' ); ?>:</label></td>
1017 <td>
1018 <p class="description">
1019 <input type="checkbox" disabled="true" />
1020 <?php esc_html_e( 'Define your own videos ads to play in together with your videos - postroll or prerool', 'fv-player' ); ?>
1021 </p>
1022 </td>
1023 </tr>
1024 </table>
1025 <p><strong><?php esc_html_e( 'Upcoming pro features', 'fv-player' ); ?></strong>:</p>
1026 <table class="form-table2">
1027 <tr>
1028 <td class="first"><label><?php esc_html_e( 'Enable PayWall', 'fv-player' ); ?>:</label></td>
1029 <td>
1030 <p class="description">
1031 <input type="checkbox" checked="checked" disabled="true" />
1032 <?php esc_html_e( 'Monetize the video content on your membership site.', 'fv-player' ); ?>
1033 </p>
1034 </td>
1035 </tr>
1036 </table>
1037 <?php
1038 }
1039
1040 function fv_flowplayer_settings_box_conversion() {
1041 ?>
1042 <p><?php esc_html_e( 'This section allows you to convert videos posted using other plugins to FV Player shortcodes.', 'fv-player' ); ?></p>
1043 <table class="form-table2" style="margin: 5px; ">
1044 <?php do_action('fv_player_conversion_buttons'); ?>
1045 </table>
1046 <?php
1047 }
1048
1049 /*
1050 * Pro Video Ads Dummy box
1051 */
1052 function fv_flowplayer_admin_video_ads(){
1053 ?>
1054 <style>
1055 #fv-player-pro_video-ads-settings tr.data:nth-child(even) { background-color: #eee; }
1056 .fv-player-pro_video-ad-remove { visibility: hidden; }
1057 table.fv-player-pro_video-ad-formats td:first-child { width: 132px }
1058 </style>
1059 <table class="form-table2" style="margin: 5px; ">
1060 <tbody><tr>
1061 <td style="width:180px"><label for="pro[video_ads_default]"><?php esc_html_e( 'Default pre-roll ad:', 'fv-player' ); ?></label></td>
1062 <td>
1063 <p class="description">
1064 <select disabled="true" id="pro[video_ads_default]" >
1065 <option selected="" value="no">No ad</option>
1066 <option value="random">Random</option>
1067 <option value="1">1</option>
1068 </select>
1069 <?php esc_html_e( 'Set which ad should be played before videos.', 'fv-player' ); ?>
1070 </p>
1071 </td>
1072 </tr>
1073 <tr>
1074 <td style="width:180px"><label for="pro[video_ads_postroll_default]"><?php esc_html_e( 'Default post-roll ad:', 'fv-player' ); ?></label></td>
1075 <td>
1076 <p class="description">
1077 <select disabled="true" id="pro[video_ads_postroll_default]" >
1078 <option selected="" value="no">No ad</option>
1079 <option value="random">Random</option>
1080 <option value="1">1</option>
1081 </select>
1082 <?php esc_html_e( 'Set which ad should be played after videos.', 'fv-player' ); ?>
1083 </p>
1084 </td>
1085 </tr>
1086 <tr>
1087 <td style="width:180px"><label for="pro[video_ads_skip]"><?php esc_html_e( 'Default ad skip time', 'fv-player' ); ?>:</label></td>
1088 <td>
1089 <p class="description">
1090 <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">
1091 Enter the number of seconds after which an ad can be skipped.
1092 </p>
1093 </td>
1094 </tr>
1095 </tbody></table>
1096 <table class="form-table2" style="margin: 5px; ">
1097 <tbody><tr>
1098 <td>
1099 <table id="fv-player-pro_video-ads-settings">
1100 <thead><tr><td>ID</td><td></td><td>Status</td></tr></thead>
1101 <tbody>
1102 <tr class="data">
1103 <td class="id">1</td>
1104 <td>
1105 <table class="fv-player-pro_video-ad-formats">
1106 <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>
1107 <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>
1108 <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>
1109 </tbody></table>
1110 </td>
1111 <td>
1112 <input disabled="true" id="VideoAdDisabled-0" type="checkbox" value="1"> <label for="VideoAdDisabled-0">Disable</label><br>
1113 </tr>
1114 </tbody>
1115 </table>
1116 </td>
1117 </tr>
1118 <tr>
1119 <td>
1120 <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">
1121 </td>
1122 </tr>
1123 </tbody></table>
1124
1125
1126 <?php
1127 }
1128
1129
1130
1131 function fv_flowplayer_admin_skin_get_table($options) {
1132 global $fv_fp;
1133
1134 $selected_skin = $fv_fp->_get_option( 'skin' );
1135 ?>
1136 <table class="form-table2 flowplayer-settings" 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"'; } ?>>
1137 <?php
1138 $options = apply_filters( 'fv_player_skin_settings', $options );
1139
1140 foreach ($options['items'] as $item) {
1141 $setup = wp_parse_args( $item, array( 'name' => false, 'data' => false, 'optoins' => false, 'attributes' => false, 'class' => false, 'default' => false ) );
1142
1143 switch ($item['type']) {
1144 case 'checkbox':
1145 $fv_fp->_get_checkbox($setup);
1146 break;
1147 case 'input_text':
1148 $setup['type'] = 'text';
1149 $fv_fp->_get_input_text($setup);
1150 break;
1151 case 'input_hidden':
1152 $fv_fp->_get_input_hidden($setup);
1153 break;
1154 case 'select':
1155 $fv_fp->_get_select($setup);
1156 break;
1157
1158 }
1159 }
1160 ?>
1161 <tr>
1162 <td></td>
1163 <td>
1164 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1165 </td>
1166 </tr>
1167 </table>
1168 <?php
1169 }
1170
1171
1172
1173 function fv_flowplayer_admin_skin() {
1174 global $fv_fp;
1175 ?>
1176 <style id="fv-style-preview"></style>
1177 <div class="column-right fv-player-settings-skin-preview">
1178 <?php
1179 global $fv_fp_admin_preview_player;
1180 $fv_fp_admin_preview_player = flowplayer_content_handle( array(
1181 'src' => 'https://cdn.foliovision.com/videos/fv-player/Foliovision%20Promo%20Video-720p.mp4',
1182 'splash' => 'https://cdn.foliovision.com/videos/fv-player/Foliovision%20Promo%20Video.jpg',
1183 'autoplay' => 'false',
1184 'preroll' => 'no',
1185 'postroll' => 'no',
1186 'subtitles' => plugins_url('images/test-subtitles.vtt',dirname(__FILE__)),
1187 'caption' => "Foliovision Video;Lapinthrope Extras - Roy Thompson Hall Dance;Romeo and Juliet Ballet Schloss Kittsee",
1188 'playlist' => 'https://cdn.foliovision.com/videos/fv-player/Lapinthrope%20Extras%20-%20Roy%20Thompson%20Hall%20Dance-536p.mp4,https://cdn.foliovision.com/videos/fv-player/Lapinthrope%20Extras%20-%20Roy%20Thompson%20Hall%20Dance.jpg;https://cdn.foliovision.com/videos/fv-player/Romeo%20and%20Juliet%20Ballet%20Schloss%20Kittsee-720p.mp4,https://cdn.foliovision.com/videos/fv-player/Romeo%20and%20Juliet%20Ballet%20Schloss%20Kittsee.jpg',
1189 'liststyle' => 'horizontal',
1190 'vast' => 'skip',
1191 'checker' => 'no'
1192 ) );
1193 $fv_fp_admin_preview_player = explode( '<div class="fp-playlist-external', $fv_fp_admin_preview_player );
1194
1195 // Video checker uses <noscript> and style="display: none" so we need to keep that
1196 add_filter( 'wp_kses_allowed_html', 'fv_flowplayer_admin_skin_safe_tags', 10, 2 );
1197 add_filter( 'safe_style_css', 'fv_flowplayer_admin_skin_safe_styles' );
1198 echo wp_kses_post( $fv_fp_admin_preview_player[0] );
1199 remove_filter( 'wp_kses_allowed_html', 'fv_flowplayer_admin_skin_safe_tags', 10, 2 );
1200 remove_filter( 'safe_style_css', 'fv_flowplayer_admin_skin_safe_styles' );
1201 ?>
1202 <?php esc_html_e( 'Hint: play the video to see live preview of the Skin, Logo and Controls settings', 'fv-player' ) ?>
1203 </div>
1204
1205 <div id="fv_flowplayer_admin_skin_tabs">
1206 <h2 class="fv-nav-tab-wrapper nav-tab-wrapper">
1207 <a href="#skin-tab-skin" class="nav-tab nav-tab-active" style="outline: 0px;">Skin</a>
1208 <a href="#skin-tab-logo" class="nav-tab" style="outline: 0px;">Logo</a>
1209 <a href="#skin-tab-controls" class="nav-tab" style="outline: 0px;">Controls</a>
1210 </h2>
1211 </div>
1212
1213 <div id="skin-tab-skin" class="skin-tab-content">
1214 <table class="form-table2 flowplayer-settings" id="skin-Skin-settings">
1215 <?php
1216 // skin change radios
1217 $fv_fp->_get_radio(array(
1218 'key' => 'skin',
1219 'name' => __( 'Skin', 'fv-player' ),
1220 'style' => 'columns',
1221 'values' => array(
1222 'slim' => 'Slim',
1223 'youtuby' => 'YouTuby',
1224 'custom' => 'Custom'
1225 ),
1226 'default' => 'custom',
1227 'data' => array(
1228 'fv-skin' => ''
1229 )
1230 ));
1231 ?>
1232 </table>
1233
1234 <?php
1235
1236 $aPreview = array(
1237 'hasBorder' => '.flowplayer{border:%val%px solid !important;}',
1238 'borderColor' => '.flowplayer{border-color:#%val% !important;}',
1239 'backgroundColor' => '.flowplayer .fv-ab-loop .noUi-handle { color:#%val% !important; }
1240 .fv_player_popup { background: #%val% !important;}
1241 .fvfp_admin_error_content { background: #%val% !important; }
1242 .flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { background-color: #%val% !important; }',
1243 'font-face' => '#content .flowplayer, .flowplayer { font-family: %val%; }',
1244 'progressColor' => '.flowplayer .fp-volumelevel { background-color: #%val% !important; }
1245 .flowplayer .fp-progress, .flowplayer .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #%val% !important; }
1246 .flowplayer .fp-menu a.fp-selected { background-color: #%val% !important }
1247 .flowplayer .fp-color { background-color: #%val% !important }',
1248 'durationColor' => '.flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { color:#%val% !important; }
1249 .flowplayer .fp-controls > .fv-fp-prevbtn:before, .flowplayer .fp-controls > .fv-fp-nextbtn:before { border-color:#%val% !important; }
1250 .flowplayer svg.fvp-icon { fill: #%val% !important; }
1251 .flowplayer .fp-elapsed, .flowplayer .fp-duration { color: #%val% !important; }
1252 .freedomplayer .fp-controls svg { fill: #%val% !important; stroke: #%val% !important }
1253 .fv-player-video-checker { color: #%val% !important; }',
1254 'design-timeline' => '',
1255 'design-icons' => '',
1256 );
1257
1258 // slim skin settings
1259 $aSettings = array(
1260 array(
1261 'type' => 'input_text',
1262 'key' => array('skin-slim', 'progressColor'),
1263 'name' => __( 'Color', 'fv-player' ),
1264 'class' => 'color',
1265 'default' => 'BB0000',
1266 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1267 )
1268 );
1269
1270 foreach( $fv_fp->aDefaultSkins['skin-slim'] AS $k => $v ) {
1271 $aSettings[] = array(
1272 'type' => 'input_hidden',
1273 'key' => array('skin-slim', $k),
1274 'default' => $v,
1275 'data' => array( 'fv-preview' => $aPreview[$k] )
1276 );
1277 }
1278
1279 fv_flowplayer_admin_skin_get_table( array(
1280 'skin_name' => 'Slim',
1281 'skin_radio_button_value' => 'slim',
1282 'default' => true,
1283 'items' => $aSettings
1284 ) );
1285
1286 // YouTuby skin settings
1287 $aSettings = array(
1288 array(
1289 'type' => 'input_text',
1290 'key' => array('skin-youtuby', 'progressColor'),
1291 'name' => __( 'Color', 'fv-player' ),
1292 'class' => 'color',
1293 'default' => 'BB0000',
1294 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1295 )
1296 );
1297
1298 foreach( $fv_fp->aDefaultSkins['skin-youtuby'] AS $k => $v ) {
1299 $aSettings[] = array(
1300 'type' => 'input_hidden',
1301 'key' => array('skin-youtuby', $k),
1302 'default' => $v,
1303 'data' => array( 'fv-preview' => $aPreview[$k] ),
1304 'attributes' => array( 'readonly' => 'true' )
1305 );
1306 }
1307
1308 fv_flowplayer_admin_skin_get_table( array(
1309 'skin_name' => 'YouTuby',
1310 'skin_radio_button_value' => 'youtuby',
1311 'default' => false,
1312 'items' => $aSettings
1313 ) );
1314
1315
1316
1317 // custom skin settings
1318 fv_flowplayer_admin_skin_get_table( array(
1319 'skin_name' => 'Custom',
1320 'skin_radio_button_value' => 'custom',
1321 'default' => false,
1322 'items' => array(
1323
1324 array(
1325 'type' => 'checkbox',
1326 'key' => array('skin-custom', 'hasBorder'),
1327 'name' => __( 'Border', 'fv-player' ),
1328 'data' => array( 'fv-preview' => $aPreview['hasBorder'] )
1329 ),
1330
1331 array(
1332 'type' => 'input_text',
1333 'key' => array('skin-custom', 'borderColor'),
1334 'name' => __( 'Border color', 'fv-player' ),
1335 'class' => 'color',
1336 'default' => '666666',
1337 'data' => array( 'fv-preview' => $aPreview['borderColor'] )
1338 ),
1339
1340 array(
1341 'type' => 'input_text',
1342 'key' => array('skin-custom', 'backgroundColor'),
1343 'name' => __( 'Controlbar', 'fv-player' ),
1344 'class' => 'color-opacity',
1345 'default' => '333333',
1346 'data' => array( 'fv-preview' => $aPreview['backgroundColor'] )
1347 ),
1348
1349 array(
1350 'type' => 'select',
1351 'key' => array('skin-custom', 'font-face'),
1352 'name' => __( 'Font Face', 'fv-player' ),
1353 'options' => array(
1354 'inherit' => __( '(inherit from template)', 'fv-player' ),
1355 '&quot;Courier New&quot;, Courier, monospace' => 'Courier New',
1356 'Helvetica, sans-serif' => 'Helvetica',
1357 'Tahoma, Geneva, sans-serif' => 'Tahoma, Geneva'
1358 ),
1359 'default' => 'Tahoma, Geneva, sans-serif',
1360 'data' => array( 'fv-preview' => $aPreview['font-face'] )
1361 ),
1362
1363 array(
1364 'type' => 'input_text',
1365 'key' => array('skin-custom', 'progressColor'),
1366 'name' => __( 'Progress', 'fv-player' ),
1367 'class' => 'color',
1368 'default' => 'BB0000',
1369 'data' => array( 'fv-preview' => $aPreview['progressColor'] )
1370 ),
1371
1372 array(
1373 'type' => 'input_text',
1374 'key' => array('skin-custom', 'durationColor'),
1375 'name' => __( 'Buttons', 'fv-player' ),
1376 'class' => 'color',
1377 'default' => 'EEEEEE',
1378 'data' => array( 'fv-preview' => $aPreview['durationColor'] )
1379 ),
1380
1381 array(
1382 'type' => 'select',
1383 'key' => array('skin-custom', 'design-timeline'),
1384 'first_td_class' => 'second-column',
1385 'name' => __( 'Timeline', 'fv-player' ),
1386 'default' => ' ',
1387 'options' => array(
1388 ' ' => __( 'Default', 'fv-player' ),
1389 'fp-slim' => __( 'Slim', 'fv-player' ),
1390 'fp-full' => __( 'Full', 'fv-player' ),
1391 'fp-fat' => __( 'Fat', 'fv-player' ),
1392 'fp-minimal' => __( 'Minimal', 'fv-player' ),
1393 )
1394 ),
1395
1396 array(
1397 'type' => 'select',
1398 'key' => array('skin-custom', 'design-icons'),
1399 'first_td_class' => 'second-column',
1400 'name' => __( 'Icons', 'fv-player' ),
1401 'default' => ' ',
1402 'options' => array(
1403 ' ' => __( 'Default', 'fv-player' ),
1404 'fp-edgy' => __( 'Edgy', 'fv-player' ),
1405 'fp-outlined' => __( 'Outlined', 'fv-player' ),
1406 'fp-playful' => __( 'Playful', 'fv-player' )
1407 )
1408 ),
1409
1410 )
1411 ) );
1412 ?>
1413 </div>
1414
1415 <div id="skin-tab-logo" class="skin-tab-content">
1416 <table class="form-table2">
1417 <tr>
1418 <td class="first aligntop-input"><label for="logo">Logo:</label></td>
1419 <td>
1420
1421 <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 />
1422 <input id="upload_image_button" class="upload_image_button button no-margin small" type="button" value="<?php esc_attr_e( 'Upload', 'fv-player' ); ?>" alt="Select Logo" />
1423 </td>
1424 </tr>
1425 <tr>
1426 <td class="first"><label for="logoPosition">Position:</label></td>
1427 <td>
1428 <?php
1429 $value = $fv_fp->_get_option('logoPosition');
1430 ?>
1431 <select name="logoPosition" class="small" style="width: 9em !important" data-fv-preview>
1432 <option <?php if( $value == 'bottom-left' ) echo "selected"; ?> value="bottom-left"><?php esc_html_e( 'Bottom-left', 'fv-player' ); ?></option>
1433 <option <?php if( $value == 'bottom-right' ) echo "selected"; ?> value="bottom-right"><?php esc_html_e( 'Bottom-right', 'fv-player' ); ?></option>
1434 <option <?php if( $value == 'top-left' ) echo "selected"; ?> value="top-left"><?php esc_html_e( 'Top-left', 'fv-player' ); ?></option>
1435 <option <?php if( $value == 'top-right' ) echo "selected"; ?> value="top-right"><?php esc_html_e( 'Top-right', 'fv-player' ); ?></option>
1436 </select>
1437 </td>
1438 </tr>
1439 <?php $fv_fp->_get_checkbox(
1440 array(
1441 'name' => __( 'Align to video', 'fv-player' ),
1442 'key' => 'logo_over_video',
1443 'help' => __( 'Logo stays on top of video if aspect ratio does not match.', 'fv-player' ),
1444 'first_td_class' => 'first aligntop',
1445 'data' => array(
1446 'fv-preview' => ''
1447 )
1448 )
1449 ); ?>
1450 <tr>
1451 <td class="first"></td>
1452 <td>
1453 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1454 </td>
1455 </tr>
1456 </table>
1457 </div>
1458
1459 <div id="skin-tab-controls" class="skin-tab-content">
1460 <table class="form-table2">
1461 <?php $fv_fp->_get_checkbox(__( 'Always Visible', 'fv-player' ), 'show_controlbar', __( 'Control bar will show below player and not just on hover.') ); ?>
1462 <?php $fv_fp->_get_checkbox(__( 'Airplay', 'fv-player' ), 'ui_airplay', __( 'Adds support for Airplay.', 'fv-player' ) ); ?>
1463 <?php $fv_fp->_get_checkbox(__( 'Embed', 'fv-player' ), 'ui_embed', __( 'Embed link in top bar (no preview).', 'fv-player' ) ); ?>
1464 <?php $fv_fp->_get_checkbox(__( 'Chromecast', 'fv-player' ), 'chromecast', __( 'Adds support for Google Chromecast.', 'fv-player' ) ); ?>
1465 <?php $fv_fp->_get_checkbox(__( 'Fullscreen', 'fv-player' ), 'allowfullscreen', __( 'Adds a fullscreen button.', 'fv-player' ) ); ?>
1466 <?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' ) ); ?>
1467 <?php $fv_fp->_get_checkbox(__( 'Repeat', 'fv-player' ), 'ui_repeat_button', __( 'Adds a button to set playlist/track repeat and shuffle.', 'fv-player' ) ); ?>
1468 <?php $fv_fp->_get_checkbox(__( 'Rewind/Forward', 'fv-player' ), 'ui_rewind_button', __( 'Adds a button to go 10 seconds back/forth.', 'fv-player' ) ); ?>
1469 <?php $fv_fp->_get_checkbox(__( 'Sharing', 'fv-player' ), 'ui_sharing', __( 'Sharing buttons in top bar (no preview).', 'fv-player' ) ); ?>
1470 <?php $fv_fp->_get_checkbox(__( 'Speed', 'fv-player' ), 'ui_speed', __( 'Speed buttons control playback speed.', 'fv-player' ) ); ?>
1471 <tr>
1472 <td><label for="ui_speed_increment"><?php esc_html_e( 'Speed Step', 'fv-player' ); ?>:</label></td>
1473 <td colspan="3">
1474 <p class="description">
1475 <?php
1476 $value = $fv_fp->_get_option('ui_speed_increment');
1477 ?>
1478 <select id="ui_speed_increment" name="ui_speed_increment" style="width: 5em">
1479 <option value="0.1" <?php if( $value == 0.1 ) echo ' selected="selected"'; ?> >0.1</option>
1480 <option value="0.25" <?php if( $value == 0.25 ) echo ' selected="selected"'; ?> >0.25</option>
1481 <option value="0.5" <?php if ( $value == 0.5 ) echo ' selected="selected"'; ?> >0.5</option>
1482 </select>
1483 <?php esc_html_e( 'Accuracy of the Speed button.', 'fv-player' ); ?>
1484 </p>
1485 </td>
1486 </tr>
1487 <?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' ) ); ?>
1488 <tr>
1489 <td></td>
1490 <td>
1491 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1492 </td>
1493 </tr>
1494 </table>
1495 </div>
1496
1497 <div style="clear: both"></div>
1498 <?php
1499 do_action('fv_player_extensions_admin_load_assets');
1500 }
1501
1502 function fv_flowplayer_admin_skin_safe_styles( $styles ) {
1503 $styles[] = 'display';
1504 return $styles;
1505 }
1506
1507 function fv_flowplayer_admin_skin_safe_tags( $tags, $context ) {
1508 if ( 'post' === $context ) {
1509 $tags['noscript'] = array();
1510 }
1511 return $tags;
1512 }
1513
1514 function fv_flowplayer_admin_skin_playlist() {
1515 global $fv_fp;
1516 ?>
1517 <div class="column-right">
1518 <?php
1519 global $fv_fp_admin_preview_player;
1520 if ( isset( $fv_fp_admin_preview_player[1] ) ) {
1521 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] );
1522 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' );
1523 }
1524 ?>
1525 </div>
1526 <table class="column-left form-table2 flowplayer-settings">
1527 <?php
1528 $fv_fp->_get_select(
1529 array(
1530 'name' => __( 'Playlist Design', 'fv-player' ),
1531 'key' => 'playlist-design',
1532 'options' => array(
1533 '2017' => __( '2017' , 'fv-player' ),
1534 '2017 visible-captions' => __( '2017 with captions' , 'fv-player' ),
1535 '2014' => __( '2014' , 'fv-player' )
1536 ),
1537 'first_td_class' => 'first'
1538 )
1539 );
1540 ?>
1541 <tr>
1542 <td><label for="playlistBgColor"><?php esc_html_e( 'Background', 'fv-player' ); ?></label></td>
1543 <td><input class="color" id="playlistBgColor" name="playlistBgColor" type="text" value="<?php echo esc_attr( $fv_fp->_get_option('playlistBgColor') ); ?>"
1544 data-fv-preview=".fp-playlist-external > a > span { background-color:#%val%; }"/></td>
1545 </tr>
1546 <tr>
1547 <td><label for="playlistSelectedColor"><?php esc_html_e( 'Active Item', 'fv-player' ); ?></label></td>
1548 <td><input class="color" id="playlistSelectedColor" name="playlistSelectedColor" type="text" value="<?php echo esc_attr( $fv_fp->_get_option('playlistSelectedColor') ); ?>"
1549 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>
1550 </tr>
1551 <tr>
1552 <td><label for="playlistFontColor-proxy"><?php esc_html_e( 'Font Color', 'fv-player' ); ?></label></td>
1553 <?php $bShowPlaylistFontColor = ( $fv_fp->_get_option('playlistFontColor') && $fv_fp->_get_option('playlistFontColor') !== '#' ); ?>
1554 <td>
1555 <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;}" />
1556 <input id="playlistFontColor" name="playlistFontColor" type="hidden" value="<?php echo esc_attr( $fv_fp->_get_option('playlistFontColor') ); ?>" />
1557 <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>
1558 <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>
1559 </td>
1560 </tr>
1561 <tr>
1562 <td></td>
1563 <td>
1564 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1565 </td>
1566 </tr>
1567 </table>
1568 <div style="clear: both"></div>
1569 <?php
1570 }
1571
1572 function fv_flowplayer_admin_custom_css() {
1573 global $fv_fp;
1574 $customCSS = $fv_fp->_get_option('customCSS');
1575 ?>
1576 <style>
1577 .CodeMirror {
1578 border: 1px solid #ddd;
1579 }
1580 </style>
1581 <p><?php echo wp_kses(
1582 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' ),
1583 array( 'a' => array( 'href' => array(), 'target' => array() ) )
1584 ); ?></p>
1585 <table class="form-table2">
1586 <tr>
1587 <td colspan="2">
1588 <textarea id="customCSS" name="customCSS"><?php echo esc_textarea($customCSS); ?></textarea>
1589 </td>
1590 </tr>
1591
1592 <tr>
1593 <td colspan="2">
1594 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1595 </td>
1596 </tr>
1597 </table>
1598 <div style="clear: both"></div>
1599 <?php
1600 }
1601
1602
1603 function fv_flowplayer_admin_skin_subtitles() {
1604 global $fv_fp;
1605 $subtitleBgColor = $fv_fp->_get_option('subtitleBgColor');
1606 if( $subtitleBgColor[0] == '#' && $opacity = $fv_fp->_get_option('subtitleBgAlpha') ) {
1607 $rgb = array_map('hexdec', array($subtitleBgColor[1].$subtitleBgColor[2], $subtitleBgColor[3].$subtitleBgColor[4], $subtitleBgColor[5].$subtitleBgColor[6]) );
1608 $subtitleBgColor = 'rgba('.implode(",",$rgb).','.$opacity.')';
1609 }
1610 ?>
1611 <div id="fp-preview-wrapper">
1612 <div class="flowplayer skin-<?php echo esc_html( $fv_fp->_get_option('skin') ); ?>" id="preview">
1613 <div class="fp-captions fp-shown">
1614 <p><?php esc_html_e( 'The quick brown fox jumps over the lazy dog.', 'fv-player' ); ?></p>
1615 <p><?php esc_html_e( 'Second line.', 'fv-player' ); ?></p>
1616 </div>
1617 </div>
1618 </div>
1619 <table class="form-table2 flowplayer-settings">
1620 <tr>
1621 <td><label for="subtitle-font-face"><?php esc_html_e( 'Font Face', 'fv-player' ); ?></label></td>
1622 <td>
1623 <select id="subtitle-font-face" name="subtitleFontFace" data-fv-preview=".flowplayer .fp-captions { font-family: %val% !important; }">
1624 <option value="inherit"<?php if( $fv_fp->_get_option('subtitleFontFace') == 'inherit' ) echo ' selected="selected"'; ?>><?php esc_html_e( '(inherit from player)', 'fv-player' ); ?></option>
1625 <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>
1626 <option value="Helvetica, sans-serif"<?php if( $fv_fp->_get_option('subtitleFontFace') == "Helvetica, sans-serif" ) echo ' selected="selected"'; ?>>Helvetica</option>
1627 <option value="Tahoma, Geneva, sans-serif"<?php if( $fv_fp->_get_option('subtitleFontFace') == "Tahoma, Geneva, sans-serif" ) echo ' selected="selected"'; ?>>Tahoma, Geneva</option>
1628 </select>
1629 </td>
1630 </tr>
1631 <tr>
1632 <td><label for="subtitleSize"><?php esc_html_e( 'Font Size', 'fv-player' ); ?></label></td>
1633 <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') ); ?>"
1634 data-fv-preview=".flowplayer .fp-player .fp-captions p { font-size: %val%px !important; }"/></td>
1635 </tr>
1636 <tr>
1637 <td><label for="subtitleBgColor"><?php esc_html_e( 'Background', 'fv-player' ); ?></label></td>
1638 <td><input class="color-opacity" id="subtitleBgColor" name="subtitleBgColor" type="text" value="<?php echo esc_attr($subtitleBgColor); ?>"
1639 data-fv-preview=".flowplayer .fp-player .fp-captions p { background-color: %val% !important; }"/></td>
1640 </tr>
1641 <tr>
1642 <td></td>
1643 <td>
1644 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1645 </td>
1646 </tr>
1647 </table>
1648 <div style="clear: both"></div>
1649 <?php
1650 }
1651 function fv_flowplayer_admin_skin_sticky() {
1652 global $fv_fp;
1653 ?>
1654 <div class="column-right">
1655 <div class="descriptions">
1656 <p class="description" data-describe="off" style="display: none;">When enabled player will stick when scrolling and the video is playing.</p>
1657 <p class="description" data-describe="desktop" style="display: none;">Player will stick if the screen width is greater than 1020 pixels.</p>
1658 <p class="description" data-describe="all" style="display: none;">Player will stick on any screen size.</p>
1659 </div>
1660 </div>
1661 <div class="column-left">
1662 <table class="thirds">
1663 <?php
1664 $fv_fp->_get_radio( array(
1665 'key' => 'sticky_video',
1666 'name' => __( '', 'fv-player' ),
1667 'style' => 'columns',
1668 'values' => array(
1669 'off' => 'Off',
1670 'desktop' => 'Desktop',
1671 'all' => 'Desktop and Mobile'
1672 ),
1673 ) );
1674 ?>
1675 </table>
1676 <table class="form-table2">
1677 <?php
1678 $fv_fp->_get_select(
1679 array(
1680 'name' => __( 'Placement', 'fv-player' ),
1681 'key' => 'sticky_place',
1682 'options' => array(
1683 'right-bottom' => 'Right, Bottom',
1684 'left-bottom' => 'Left, Bottom',
1685 'left-top' => 'Left, Top',
1686 'right-top' => 'Right, Top'
1687 ),
1688 'first_td_class' => 'first'
1689 )
1690 );
1691
1692 $fv_fp->_get_input_text(
1693 array(
1694 'name' => __( 'Player Width', 'fv-player' ),
1695 'key' => 'sticky_width',
1696 'type' => 'number',
1697 'help' => __( 'Enter value in pixels', 'fv-player' ),
1698 'min' => 200,
1699 'max' => 1920,
1700 'step' => 10,
1701 )
1702 );
1703
1704 $fv_fp->_get_select(
1705 array(
1706 'name' => __( 'Mobile Player Width', 'fv-player' ),
1707 'key' => 'sticky_width_mobile',
1708 'options' => array(
1709 '100' => '100%',
1710 '75' => '75%',
1711 '50' => '50%'
1712 ),
1713 'help' => __( 'Limits the size when the device is in vertical (portrait) orientation.', 'fv-player' ),
1714 )
1715 );
1716 ?>
1717 <tr>
1718 <td></td>
1719 <td>
1720 <a class="fv-wordpress-flowplayer-save button button-primary" href="#"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
1721 </td>
1722 </tr>
1723 </table>
1724 </div>
1725
1726 <script>
1727 jQuery( function($) {
1728 show_description_sticky_video();
1729
1730 $('[name=sticky_video]' ).on( 'change', show_description_sticky_video );
1731
1732 function show_description_sticky_video() {
1733 $( '#fv_flowplayer_skin_sticky [data-describe]' ).hide();
1734 $( '#fv_flowplayer_skin_sticky [data-describe='+$('[name=sticky_video]:checked').val()+']' ).show();
1735 }
1736 } );
1737 </script>
1738 <?php
1739 }
1740
1741 function fv_flowplayer_admin_usage() {
1742 ?>
1743 <table class="form-table">
1744 <tr>
1745 <td colspan="4">
1746 <div class="usage-section">
1747 <h3><a target="_blank" href="https://foliovision.com/player/why"><?php esc_html_e( 'Why FV Player?', 'fv-player' ); ?></a></h3>
1748 <ul>
1749 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/why/integrations" title="FV Player Integrations">FV Player Integrations</a></li>
1750 <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>
1751 <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>
1752 <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>
1753 <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>
1754 </ul>
1755 </div>
1756 <div class="usage-section">
1757 <h3><a target="_blank" href="https://foliovision.com/player/why"><?php esc_html_e( 'Getting Started', 'fv-player' ); ?></a></h3>
1758 <ul>
1759 <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>
1760 <ul>
1761 <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>
1762 </ul>
1763 </li>
1764 <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>
1765 <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>
1766 <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>
1767 <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>
1768 <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>
1769 <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>
1770 <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>
1771 </ul>
1772 </div>
1773 <div class="usage-section">
1774 <h3><a target="_blank" href="https://foliovision.com/player/playlists"><?php esc_html_e( 'Creating and Managing Playlists', 'fv-player' ); ?></a></h3>
1775 <ul>
1776 <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>
1777 </ul>
1778 </div>
1779 <div class="usage-section">
1780 <h3><a target="_blank" href="https://foliovision.com/player/faq"><?php esc_html_e( 'FAQ', 'fv-player' ); ?></a></h3>
1781 <ul>
1782 <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>
1783 <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>
1784 </ul>
1785 </div>
1786 <div class="usage-section">
1787 <h3><a target="_blank" href="https://foliovision.com/player/settings"><?php esc_html_e( 'Setting Screens', 'fv-player' ); ?></a></h3>
1788 <ul>
1789 <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>
1790 <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>
1791 <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>
1792 <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>
1793 <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>
1794 <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>
1795 <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>
1796 </ul>
1797 </div>
1798 <div class="usage-section">
1799 <h3><a target="_blank" href="https://foliovision.com/player/video-hosting"><?php esc_html_e( 'Video Hosting', 'fv-player' ); ?></a></h3>
1800 <ul>
1801 <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>
1802 <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>
1803 <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>
1804 <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>
1805 <ul>
1806 <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>
1807 </ul>
1808 </li>
1809 <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>
1810 <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>
1811 <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>
1812 <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>
1813 </ul>
1814 </div>
1815 <div class="usage-section">
1816 <h3><a target="_blank" href="https://foliovision.com/player/features"><?php esc_html_e( 'Advanced features', 'fv-player' ); ?></a></h3>
1817 <ul>
1818 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback" title="Playback Features">Playback Features</a></li>
1819 <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>
1820 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/playback/autoplay" title="Autoplay">Autoplay</a></li>
1821 <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>
1822 <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>
1823 <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>
1824 <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>
1825 <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>
1826 <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>
1827 </ul>
1828 </div>
1829 <div class="usage-section">
1830 <h3><a target="_blank" href="https://foliovision.com/player/features/accessibility"><?php esc_html_e( 'Accessibility Features', 'fv-player' ); ?></a></h3>
1831 <ul>
1832 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/subtitles" title="How to Use Subtitles">Subtitles</a></li>
1833 <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>
1834 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/timeline-previews" title="Timeline Previews">Timeline Previews</a></li>
1835 <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>
1836 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/sticky-video" title="Sticky Video">Sticky Video</a></li>
1837 <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>
1838 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/features/accessibility/alignment-settings" title="Alignment Settings">Alignment Settings</a></li>
1839 <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>
1840 </ul>
1841 </div>
1842 <div class="usage-section">
1843 <h3><a target="_blank" href="https://foliovision.com/player/features/sharing"><?php esc_html_e( 'Sharing Options', 'fv-player' ); ?></a></h3>
1844 <ul>
1845 <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>
1846 <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>
1847 <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>
1848 <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>
1849 <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>
1850 <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>
1851 </ul>
1852 </div>
1853 <div class="usage-section">
1854 <h3><a target="_blank" href="https://foliovision.com/player/video-security"><?php esc_html_e( 'Video Security', 'fv-player' ); ?></a></h3>
1855 <ul>
1856 <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>
1857 <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>
1858 <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>
1859 <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>
1860 <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>
1861 </ul>
1862 </div>
1863 <div class="usage-section">
1864 <h3><a target="_blank" href="https://foliovision.com/player/video-security/cdn"><?php esc_html_e( 'CDN Options', 'fv-player' ); ?></a></h3>
1865 <ul>
1866 <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>
1867 <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>
1868 <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>
1869 </ul>
1870 </div>
1871 <div class="usage-section">
1872 <h3><a target="_blank" href="https://foliovision.com/player/video-security/drm-watermarking"><?php esc_html_e('DRM Watermarking'); ?></a></h3>
1873 <ul>
1874 <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>
1875 </ul>
1876 </div>
1877 <div class="usage-section">
1878 <h3><a target="_blank" href="https://foliovision.com/player/video-security/encoding"><?php esc_html_e( 'Secure Video Encoding', 'fv-player' ); ?></a></h3>
1879 <ul>
1880 <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>
1881 <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>
1882 <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>
1883 <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>
1884 <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>
1885 <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>
1886 </ul>
1887 </div>
1888 <div class="usage-section">
1889 <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>
1890 <ul>
1891 <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>
1892 <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>
1893 <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>
1894 <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>
1895 </ul>
1896 </div>
1897 <div class="usage-section">
1898 <h3><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/membership"><?php esc_html_e( 'Membership Sites', 'fv-player' ); ?></a></h3>
1899 <ul>
1900 <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>
1901 <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>
1902 </ul>
1903 </div>
1904 <div class="usage-section">
1905 <h3><a target="_blank" href="https://foliovision.com/player/membership-ppv-elearning/elearning"><?php esc_html_e( 'WordPress eLearning', 'fv-player' ); ?></a></h3>
1906 <ul>
1907 <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>
1908 <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>
1909 </ul>
1910 </div>
1911 <div class="usage-section">
1912 <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>
1913 <ul>
1914 <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>
1915 <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>
1916 <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>
1917 <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>
1918 <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>
1919 <ul>
1920 <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>
1921 <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>
1922 <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>
1923 </ul>
1924 </li>
1925 </ul>
1926 <div class="clear"></div>
1927 </div>
1928 <div class="usage-section">
1929 <h3><a target="_blank" href="https://foliovision.com/player/tools"><?php esc_html_e( 'Tools', 'fv-player' ); ?></a></h3>
1930 <ul>
1931 <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>
1932 <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>
1933 <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>
1934 <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>
1935 </ul>
1936 </div>
1937 <div class="usage-section">
1938 <h3><a target="_blank" href="https://foliovision.com/player/live-streaming"><?php esc_html_e( 'Live Streaming', 'fv-player' ); ?></a></h3>
1939 <ul>
1940 <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>
1941 <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>
1942 <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>
1943 </ul>
1944 </div>
1945 <div class="usage-section">
1946 <h3><a target="_blank" href="https://foliovision.com/player/video-ads"><?php esc_html_e( 'Video Advertising', 'fv-player' ); ?></a></h3>
1947 <ul>
1948 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/analytics/playback-stats" title="Playback Stats">Playback Stats</a></li>
1949 <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>
1950 <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>
1951 <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>
1952 </ul>
1953 </div>
1954 <div class="usage-section">
1955 <h3><a target="_blank" href="https://foliovision.com/player/analytics"><?php esc_html_e( 'Analytics', 'fv-player' ); ?></a></h3>
1956 <ul>
1957 <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>
1958 <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>
1959 <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>
1960 <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>
1961 <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>
1962 <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>
1963 </ul>
1964 </div>
1965 <div class="usage-section">
1966 <h3><a target="_blank" href="https://foliovision.com/player/video-ads/google-ads"><?php esc_html_e( 'Google Ads', 'fv-player' ); ?></a></h3>
1967 <ul>
1968 <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>
1969 <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>
1970 </ul>
1971 </div>
1972 <div class="usage-section">
1973 <h3><a target="_blank" href="https://foliovision.com/player/casting"><?php esc_html_e( 'Casting Options', 'fv-player' ); ?></a></h3>
1974 <ul>
1975 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/casting/chromecast" title="Using FV Player with Chromecast">Chromecast</a></li>
1976 </ul>
1977 </div>
1978 <div class="usage-section">
1979 <h3><a target="_blank" href="https://foliovision.com/player/audio"><?php esc_html_e( 'Audio Player', 'fv-player' ); ?></a></h3>
1980 <ul>
1981 <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>
1982 <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>
1983 </ul>
1984 </div>
1985 <div class="usage-section">
1986 <h3><a target="_blank" href="https://foliovision.com/player/troubleshooting"><?php esc_html_e( 'Troubleshooting', 'fv-player' ); ?></a></h3>
1987 <ul>
1988 <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>
1989 <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>
1990 <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>
1991 <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>
1992 <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>
1993 <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>
1994 </ul>
1995 </div>
1996 <div class="usage-section">
1997 <h3><a target="_blank" href="https://foliovision.com/player/developers"><?php esc_html_e( 'For Developers', 'fv-player' ); ?></a></h3>
1998 <ul>
1999 <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>
2000 <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>
2001 <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>
2002 <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>
2003 <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>
2004 <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>
2005 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/developers/api-programming" title="Programmer's Guide">Programmer’s Guide</a></li>
2006 <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>
2007 </ul>
2008 </div>
2009 <div class="usage-section">
2010 <h3><a target="_blank" href="https://foliovision.com/player/developers/changelog"><?php esc_html_e( 'Changelog', 'fv-player' ); ?></a></h3>
2011 <ul>
2012 <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>
2013 <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>
2014 </ul>
2015 </div>
2016 <div class="usage-section">
2017 <h3><a target="_blank" href="https://foliovision.com/player/legal"><?php esc_html_e( 'Legal', 'fv-player' ); ?></a></h3>
2018 <ul>
2019 <li class="page_item"><a target="_blank" href="https://foliovision.com/player/legal/commercial-license" title="FV Player Pro Changelog">Commercial License</a></li>
2020 <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>
2021 </ul>
2022 </div>
2023 </td>
2024 <td></td>
2025 </tr>
2026 </table>
2027 <?php
2028 }
2029
2030
2031 function fv_flowplayer_admin_database() {
2032 ?>
2033 <p>Here's the result of the last database upgrade check:</p>
2034 <?php
2035 global $FV_Player_Db;
2036 if( is_array($FV_Player_Db->getDatabaseUpgradeStatus()) ) {
2037 foreach( $FV_Player_Db->getDatabaseUpgradeStatus() AS $query ) {
2038 echo "<p><code>" . esc_html( $query[0] ) . "</code></p>";
2039 }
2040 }
2041 }
2042
2043 function fv_flowplayer_admin_embedded_on() {
2044 global $wpdb;
2045 $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" );
2046
2047 $url = wp_nonce_url(
2048 add_query_arg(
2049 array(
2050 'page' => 'fvplayer',
2051 'action' => 'fv-player-embedded-on-fix',
2052 ),
2053 admin_url( 'options-general.php' )
2054 ),
2055 'fv-player-embedded-on-fix'
2056 );
2057
2058 if( $players_with_no_posts > 0 ) :
2059 ?>
2060 <p>It appears there are <?php echo intval( $players_with_no_posts ); ?> players which do not belong to any post.</p>
2061 <a href="<?php echo esc_url( $url ); ?>" class="button">Fix</a>
2062
2063 <?php else : ?>
2064 <p>All of your FV Players seem to have a post associated.</p>
2065 <?php endif;
2066 }
2067
2068
2069 function fv_flowplayer_admin_rollback() {
2070 global $fv_wp_flowplayer_ver;
2071 $base = 'admin.php?page=fvplayer&action=fv-player-rollback&version=';
2072 ?>
2073 <p>Are you having issues with version <?php echo esc_attr( $fv_wp_flowplayer_ver ); ?>?</p>
2074 <p>You can go back to the previous 7.5 version - without changes to Chromecast, WordPress audio/video handling, MPEG-DASH and YouTube:</p>
2075 </div>
2076 <div class="usage-section">
2077 <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>
2078 <?php
2079 }
2080
2081 function fv_flowplayer_admin_uninstall() {
2082 global $fv_fp;
2083
2084 ?>
2085 <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>
2086 <table class="form-table2">
2087 <?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' )); ?>
2088
2089 <tr>
2090 <td></td>
2091 <td>
2092 <?php
2093 // Verify that uninstall.php is there only if needed
2094 $remove_all_data = $fv_fp->_get_option( 'remove_all_data' );
2095
2096 if ( ! class_exists( 'WP_Filesystem_Direct' ) ) {
2097 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-base.php';
2098 require_once ABSPATH . 'wp-admin/includes/class-wp-filesystem-direct.php';
2099 }
2100
2101 $plugin_folder = basename( dirname( dirname( __FILE__ ) ) );
2102
2103 $wp_filesystem = new WP_Filesystem_Direct( '' );
2104 $uninstall_file_hint = 'wp-content/plugings/' . $plugin_folder . '/uninstall.php';
2105 $uninstall_file_real = $wp_filesystem->wp_plugins_dir() . $plugin_folder . '/uninstall.php';
2106
2107 if ( $remove_all_data && $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2108 <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'); ?>
2109 <?php elseif ( $remove_all_data && ! $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2110 <p>
2111 <?php printf( __( 'The <code>%s</code> file failed to create, full uninstall will not work.', 'fv-player' ), $uninstall_file_hint ); ?>
2112 </p>
2113 <?php elseif ( ! $remove_all_data && $wp_filesystem->exists( $uninstall_file_real ) ) : ?>
2114 <?php printf( __( 'The <code>%s</code> file is still present, please remove it by hand.', 'fv-player' ), $uninstall_file_hint ); ?>
2115 <?php endif; ?>
2116 </td>
2117 </tr>
2118 <tr>
2119 <td colspan="4">
2120 <a class="fv-wordpress-flowplayer-save button button-primary" href="#" data-reload="true"><?php esc_html_e( 'Save', 'fv-player' ); ?></a>
2121 </td>
2122 </tr>
2123 </table>
2124 <?php
2125 }
2126
2127 function fv_flowplayer_admin_checkbox( $name ) {
2128 global $fv_fp;
2129 ?>
2130 <input type="hidden" name="<?php echo esc_attr($name); ?>" value="false" />
2131 <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"'; ?> />
2132 <?php
2133 }
2134
2135 /* TABS */
2136 $fv_player_aSettingsTabs = array(
2137 array('id' => 'fv_flowplayer_settings', 'hash' => 'tab_basic', 'name' => __( 'Setup', 'fv-player' ) ),
2138 array('id' => 'fv_flowplayer_settings_skin', 'hash' => 'tab_skin', 'name' => __( 'Skin', 'fv-player' ) ),
2139 array('id' => 'fv_flowplayer_settings_hosting', 'hash' => 'tab_hosting', 'name' => __( 'Hosting', 'fv-player' ) ),
2140 array('id' => 'fv_flowplayer_settings_actions', 'hash' => 'tab_actions', 'name' => __( 'Actions', 'fv-player' ) ),
2141 array('id' => 'fv_flowplayer_settings_video_ads', 'hash' => 'tab_video_ads', 'name' => __( 'Video Ads', 'fv-player' ) ),
2142 array('id' => 'fv_flowplayer_settings_tools', 'hash' => 'tab_tools', 'name' => __( 'Tools', 'fv-player' ) ),
2143 array('id' => 'fv_flowplayer_settings_help', 'hash' => 'tab_help', 'name' => __( 'Help', 'fv-player' ) ),
2144 );
2145
2146
2147
2148 $fv_player_aSettingsTabs = apply_filters('fv_player_admin_settings_tabs',$fv_player_aSettingsTabs);
2149
2150 /* Setup tab */
2151 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description', 'fv_flowplayer_settings', 'normal', 'high' );
2152 add_meta_box( 'fv_flowplayer_interface_options', __( 'Post Interface Options', 'fv-player' ), 'fv_flowplayer_admin_interface_options', 'fv_flowplayer_settings', 'normal' );
2153 add_meta_box( 'fv_flowplayer_default_options', __( 'Sitewide FV Player Defaults', 'fv-player' ), 'fv_flowplayer_admin_default_options', 'fv_flowplayer_settings', 'normal' );
2154 add_meta_box( 'fv_flowplayer_autoplay_and_preloading', __( 'Autoplay and preloading', 'fv-player' ), 'fv_flowplayer_admin_autoplay_and_preloading', 'fv_flowplayer_settings', 'normal' );
2155 add_meta_box( 'fv_flowplayer_integrations', __( 'Integrations/Compatibility', 'fv-player' ), 'fv_flowplayer_admin_integrations', 'fv_flowplayer_settings', 'normal' );
2156 add_meta_box( 'fv_flowplayer_mobile', __( 'Mobile Settings', 'fv-player' ), 'fv_flowplayer_admin_mobile', 'fv_flowplayer_settings', 'normal' );
2157 add_meta_box( 'fv_flowplayer_seo', __( 'Video SEO', 'fv-player' ), 'fv_flowplayer_admin_seo', 'fv_flowplayer_settings', 'normal' );
2158 add_meta_box( 'fv_flowplayer_privacy', __( 'Privacy Settings', 'fv-player' ), 'fv_flowplayer_admin_privacy', 'fv_flowplayer_settings', 'normal' );
2159
2160 if( !class_exists('FV_Player_Pro') ) {
2161 add_meta_box( 'fv_player_pro', __( 'Pro Features', 'fv-player' ), 'fv_flowplayer_admin_pro', 'fv_flowplayer_settings', 'normal', 'low' );
2162 }
2163
2164 /* Skin Tab */
2165 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_skin', 'fv_flowplayer_settings_skin', 'normal', 'high' );
2166 add_meta_box( 'flowplayer-wrapper', __( 'Player Skin', 'fv-player' ), 'fv_flowplayer_admin_skin', 'fv_flowplayer_settings_skin', 'normal' );
2167 add_meta_box( 'fv_flowplayer_skin_playlist', __( 'Playlist', 'fv-player' ), 'fv_flowplayer_admin_skin_playlist', 'fv_flowplayer_settings_skin', 'normal' );
2168 add_meta_box( 'fv_flowplayer_skin_custom_css', __( 'Custom CSS', 'fv-player' ), 'fv_flowplayer_admin_custom_css', 'fv_flowplayer_settings_skin', 'normal' );
2169 add_meta_box( 'fv_flowplayer_skin_subtitles', __( 'Subtitles', 'fv-player' ), 'fv_flowplayer_admin_skin_subtitles', 'fv_flowplayer_settings_skin', 'normal' );
2170 add_meta_box( 'fv_flowplayer_skin_sticky', __( 'Sticky Video', 'fv-player' ), 'fv_flowplayer_admin_skin_sticky', 'fv_flowplayer_settings_skin', 'normal' );
2171
2172 /* Hosting Tab */
2173 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_hosting', 'fv_flowplayer_settings_hosting', 'normal', 'high' );
2174 add_meta_box( 'fv_flowplayer_amazon_options', __( 'Amazon S3 Protected Content', 'fv-player' ), 'fv_flowplayer_admin_amazon_options', 'fv_flowplayer_settings_hosting', 'normal' );
2175
2176 /* Actions Tab */
2177 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_actions', 'fv_flowplayer_settings_actions', 'normal', 'high' );
2178 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' );
2179 add_meta_box( 'fv_flowplayer_popups', __( 'Custom Popups', 'fv-player' ), 'fv_flowplayer_admin_popups' , 'fv_flowplayer_settings_actions', 'normal', 'high' );
2180 add_meta_box( 'fv_flowplayer_ads', __( 'Overlay', 'fv-player' ), 'fv_flowplayer_admin_overlay', 'fv_flowplayer_settings_actions', 'normal' );
2181
2182 /* Video Ads Tab */
2183 if( !class_exists('FV_Player_Pro') ) {
2184 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_video_ads', 'fv_flowplayer_settings_video_ads', 'normal', 'high' );
2185 add_meta_box( 'fv_flowplayer_ads', __( 'Video Ads', 'fv-player' ), 'fv_flowplayer_admin_video_ads', 'fv_flowplayer_settings_video_ads', 'normal' );
2186 }
2187
2188 /* Tools tab */
2189 add_meta_box( 'fv_flowplayer_description', ' ', 'fv_flowplayer_admin_description_tools', 'fv_flowplayer_settings_tools', 'normal', 'high' );
2190 add_meta_box( 'fv_flowplayer_conversion', __( 'Conversion', 'fv-player' ), 'fv_flowplayer_settings_box_conversion', 'fv_flowplayer_settings_tools', 'normal' );
2191 add_meta_box( 'fv_flowplayer_database', __( 'Database', 'fv-player' ), 'fv_flowplayer_admin_database', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2192 add_meta_box( 'fv_flowplayer_embedded_on', __( 'Embeded Posts Information', 'fv-player' ), 'fv_flowplayer_admin_embedded_on', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2193 add_meta_box( 'fv_flowplayer_rollback', __( 'Rollback', 'fv-player' ), 'fv_flowplayer_admin_rollback', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2194 add_meta_box( 'fv_flowplayer_uninstall', __( 'Uninstall', 'fv-player' ), 'fv_flowplayer_admin_uninstall', 'fv_flowplayer_settings_tools', 'normal', 'low' );
2195
2196 /* Help tab */
2197 add_meta_box( 'fv_flowplayer_usage', __( 'Usage', 'fv-player' ), 'fv_flowplayer_admin_usage', 'fv_flowplayer_settings_help', 'normal', 'high' );
2198
2199 ?>
2200
2201 <div class="wrap">
2202 <div style="position: absolute; margin-top: 10px; right: 10px;">
2203 <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>
2204 </div>
2205 <div>
2206 <div id="icon-options-general" class="icon32"></div>
2207 <h2>FV Player</h2>
2208 </div>
2209
2210 <?php
2211 global $fv_fp;
2212 do_action('fv_player_settings_pre');
2213 ?>
2214
2215 <form id="wpfp_options" method="post" action="">
2216
2217 <p id="fv_flowplayer_admin_buttons">
2218 <?php if( preg_match( '!^\$\d+!', $fv_fp->_get_option('key') ) ) : ?>
2219 <?php
2220 $fv_player_pro_path = FV_Wordpress_Flowplayer_Plugin_Private::get_plugin_path('fv-player-pro');
2221 if( is_plugin_inactive($fv_player_pro_path) && !is_wp_error(validate_plugin($fv_player_pro_path)) ) : ?>
2222 <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" />
2223 <?php elseif( is_plugin_active($fv_player_pro_path) && !is_wp_error(validate_plugin($fv_player_pro_path)) ) : ?>
2224 <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' ); ?>" />
2225 <?php else : ?>
2226 <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') ?>
2227 <?php endif; ?>
2228 <?php else : ?>
2229 <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' ); ?>" />
2230 <?php endif; ?>
2231
2232 <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' ); ?>" />
2233 <!--<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' ); ?>" />-->
2234
2235 <?php if( !$fv_fp->_get_option('key') ) : ?>
2236 <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>
2237 <?php endif; ?>
2238 <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" />
2239 <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" />
2240 <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" />
2241 <?php do_action('fv_flowplayer_admin_buttons_after'); ?>
2242 </p>
2243 <div id="fv_flowplayer_admin_notices">
2244 </div>
2245
2246 <?php if( preg_match( '!^\$\d+!', $fv_fp->_get_option('key') ) || apply_filters('fv_player_skip_ads',false) ) : ?>
2247 <?php else : ?>
2248 <div id="fv_flowplayer_ad">
2249 <div class="text-part">
2250 <h2>FV <strong>Player</strong> Pro</h2>
2251 <span class="red-text"><?php esc_html_e( 'Host your videos anywhere', 'fv-player' ); ?></span>
2252 <ul>
2253 <li><?php esc_html_e( 'Pick your favorite CDN', 'fv-player' ); ?></li>
2254 <li><?php esc_html_e( 'Encrypt your videos to avoid downloading', 'fv-player' ); ?></li>
2255 <li><?php esc_html_e( 'Interactive transcript, AB loop&hellip;', 'fv-player' ); ?></li>
2256 </ul>
2257 <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>
2258 </div>
2259 <div class="graphic-part">
2260 <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/buy">
2261 <img width="297" height="239" border="0" src="<?php echo flowplayer::get_plugin_url().'/images/fv-wp-flowplayer-led-monitor.png' ?>"> </a>
2262 </div>
2263 </div>
2264 <?php endif; ?>
2265
2266 <div id="fv_flowplayer_admin_tabs">
2267 <h2 class="fv-nav-tab-wrapper nav-tab-wrapper">
2268 <?php foreach($fv_player_aSettingsTabs as $key => $val):?>
2269 <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>
2270 <?php endforeach;?>
2271 <div id="fv_player_js_warning" style=" margin: 8px 40px; display: inline-block; color: darkgrey;" >There Is a Problem with JavaScript.</div>
2272 <style>
2273 #fv_player_js_warning {
2274 animation: cssAnimation 0s 5s forwards;
2275 visibility: hidden;
2276 }
2277 @keyframes cssAnimation {
2278 to { visibility: visible; }
2279 }
2280 </style>
2281 </h2>
2282 </div>
2283
2284 <div id="dashboard-widgets" class="metabox-holder fv-metabox-holder columns-1">
2285 <?php foreach($fv_player_aSettingsTabs as $key => $val):?>
2286 <div id='postbox-container-<?php echo esc_attr( $val['hash'] ); ?>' class='postbox-container'<?php if( $key > 0 ) : ?> style=""<?php endif; ?>>
2287 <?php do_meta_boxes($val['id'], 'normal', false ); ?>
2288 </div>
2289 <?php endforeach;?>
2290 <div style="clear: both"></div>
2291 </div>
2292 <?php
2293 wp_nonce_field( 'fv_flowplayer_settings_nonce', 'fv_flowplayer_settings_nonce' );
2294 wp_nonce_field( 'fv_flowplayer_settings_ajax_nonce', 'fv_flowplayer_settings_ajax_nonce', false );
2295 wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false );
2296 wp_nonce_field( 'meta-box-order-nonce', 'meta-box-order-nonce', false );
2297 ?>
2298
2299 <input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes">
2300
2301 </form>
2302
2303 <div id="fv-player-settings-save-notice"></div>
2304
2305 </div>
2306 <script type="text/javascript" >
2307 function flowplayer_conversion_script() {
2308 jQuery('#fv-flowplayer-loader').show();
2309
2310 var data = {
2311 action: 'flowplayer_conversion_script',
2312 run: true
2313 };
2314
2315 jQuery.post(ajaxurl, data, function(response) {
2316 jQuery('#fv-flowplayer-loader').hide();
2317 jQuery('#conversion-results').html(response);
2318 jQuery('#fvwpflowplayer_conversion_notice').hide();
2319 });
2320 }
2321
2322 function fv_flowplayer_ajax_check( type, nonce ) {
2323 jQuery('.'+type+'-spin').show();
2324 var ajaxurl = '<?php echo esc_attr( site_url() ); ?>/wp-admin/admin-ajax.php';
2325 jQuery.post( ajaxurl, { action: type, nonce: nonce }, function( response ) {
2326 response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
2327 response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
2328 try {
2329 var obj = (jQuery.parseJSON( response ) );
2330 var css_class = '';
2331 jQuery('#fv_flowplayer_admin_notices').html('');
2332 if( obj.errors && obj.errors.length > 0 ) {
2333 jQuery('#fv_flowplayer_admin_notices').append( '<div class="error"><p>'+obj.errors.join('</p><p>')+'</p></div>' );
2334 } else {
2335 css_class = ' green';
2336 }
2337
2338 if( obj.ok && obj.ok.length > 0 ) {
2339 jQuery('#fv_flowplayer_admin_notices').append( '<div class="updated'+css_class+'"><p>'+obj.ok.join('</p><p>')+'</p></div>' );
2340 }
2341
2342 // Removed the FV Player Pro notice about expired license
2343 if(type == 'fv_wp_flowplayer_check_license') {
2344 jQuery('.fv-player-pro-admin_notice_license_error').remove();
2345 }
2346 } catch(err) {
2347 jQuery('#fv_flowplayer_admin_notices').append( jQuery('#wpbody', response ) );
2348
2349 }
2350
2351 jQuery('.'+type+'-spin').hide();
2352 } );
2353 }
2354
2355 var fv_flowplayer_amazon_s3_count = 0;
2356 jQuery('#amazon-s3-add').on('click', function() {
2357 var new_inputs = jQuery('tr.amazon-s3-1').clone();
2358 new_inputs.find("[name='amazon_key[]']").val('');
2359 new_inputs.find("[name='amazon_secret[]']").val('').show();
2360 new_inputs.find("[name='_is_secret_amazon_secret[]']").val(0); // set val to 0 - save new
2361 new_inputs.attr('class', new_inputs.attr('class') + '-' + fv_flowplayer_amazon_s3_count );
2362 new_inputs.find(':selected').prop('selected',false); // unselect
2363 new_inputs.find('.secret-preview').remove(); // remove secret preview
2364 new_inputs.find("[data-setting-change]").remove(); // remove change link
2365 new_inputs.insertBefore('.amazon-s3-last');
2366 fv_flowplayer_amazon_s3_count++;
2367 return false;
2368 });
2369
2370 function fv_fp_amazon_s3_remove(a) {
2371 jQuery( '.'+jQuery(a).parents('tr').attr('class') ).remove();
2372 }
2373 </script>
2374
2375
2376 <script type="text/javascript">
2377 console.log( 'FV Player Settings screen loading...');
2378 jQuery(window).one( 'load', function() {
2379 console.log( 'FV Player Settings screen initializing settings boxes...');
2380
2381 // close postboxes that should be closed
2382 jQuery('.if-js-closed').removeClass('if-js-closed').addClass('closed');
2383
2384 // postboxes setup
2385 setTimeout( function() {
2386 // check if not already initialized
2387 if( jQuery('.fv-metabox-holder #normal-sortables.ui-sortable').length == 0 ) {
2388 postboxes.add_postbox_toggles('fv_flowplayer_settings');
2389
2390 // Prevent other plugins from interferring
2391 postboxes.add_postbox_toggles = function() {
2392 console.log('FV Player Settings screen prevented duplciate add_postbox_toggles call!');
2393 }
2394 }
2395 }, 100 );
2396
2397 jQuery('.fv_wp_flowplayer_activate_extension').on('click', function() { // todo: block multiple clicks
2398 var button = jQuery(this);
2399 button.siblings('img').eq(0).show();
2400
2401 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 ) {
2402 button.siblings('img').eq(0).hide();
2403
2404 var obj;
2405 try {
2406 response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
2407 response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
2408 obj = jQuery.parseJSON( response );
2409
2410 button.removeClass('fv_wp_flowplayer_activate_extension');
2411 button.attr('value',obj.message);
2412
2413 if( typeof(obj.error) == "undefined" ) {
2414 //window.location.hash = '#'+jQuery(button).attr("data-plugin");
2415 //window.location.reload(true);
2416 window.location.href = window.location.href;
2417 }
2418 } catch(e) { // todo: what if there is "<p>Plugin install failed.</p>"
2419 button.after('<p>Error parsing JSON</p>');
2420 return;
2421 }
2422
2423 } ).error(function() {
2424 button.siblings('img').eq(0).hide();
2425 button.after('<p>Error!</p>');
2426 });
2427 } );
2428
2429 jQuery('.fv-flowplayer-admin-addon-installed').on('click', function() {
2430 jQuery('html, body').animate({
2431 scrollTop: jQuery("#"+jQuery(this).attr("data-plugin") ).offset().top
2432 }, 1000);
2433 } );
2434
2435 jQuery('.show-more').on('click', function(e) {
2436 e.preventDefault();
2437
2438 var more = jQuery('.more', jQuery(this).parents('tr') ).length ? jQuery('.more', jQuery(this).parents('tr') ) : jQuery(this).parent().siblings('.more');
2439
2440 more.toggle();
2441
2442 } );
2443
2444 jQuery('.show-info').on('click', function(e) {
2445 e.preventDefault();
2446 jQuery('.fv-player-admin-tooltip', jQuery(this).parents('tr') ).toggle();
2447 } );
2448
2449 /*
2450 * Color Picker Default
2451 */
2452 jQuery('.playlistFontColor-show').on('click', function(e){
2453 e.preventDefault();
2454 jQuery(e.target).hide();
2455 jQuery('.playlistFontColor-hide').show();
2456
2457 jQuery('#playlistFontColor-proxy').show().val(jQuery('#playlistFontColor-proxy').data('previous')).trigger('change');
2458 jQuery('#playlistFontColor').val(jQuery('#playlistFontColor-proxy').data('previous'));
2459 });
2460
2461 jQuery('.playlistFontColor-hide').on('click', function(e){
2462 e.preventDefault();
2463 jQuery(e.target).hide();
2464 jQuery('.playlistFontColor-show').show();
2465
2466 jQuery('#playlistFontColor-proxy').data('previous',jQuery('#playlistFontColor-proxy').hide().val()).val('').trigger('change');
2467 jQuery('#playlistFontColor').val('');
2468 });
2469
2470 jQuery('#playlistFontColor-proxy').on('change',function(e){
2471 jQuery('#playlistFontColor').val(jQuery(e.target).val());
2472 });
2473
2474 /*
2475 Ensure only one of "Load JavaScript everywhere" and "Optimize JavaScript loading" can be enabled
2476 */
2477 var cb_js_everywhere = jQuery('#js-everywhere'),
2478 cb_js_optimize = jQuery('#js-optimize');
2479
2480 function check_js_everywhere( was_clicked ) {
2481 if( was_clicked && cb_js_optimize.prop('checked') ) {
2482 alert('Cannot be used together with "Optimize JavaScript loading".');
2483 return false;
2484 }
2485
2486 cb_js_optimize.prop('readonly', cb_js_everywhere.prop('checked') );
2487 }
2488 cb_js_everywhere.on( 'click', check_js_everywhere );
2489 check_js_everywhere();
2490
2491 function check_js_optimize( was_clicked ) {
2492 if( was_clicked && cb_js_everywhere.prop('checked') ) {
2493 alert('Cannot be used together with "Load JavaScript everywhere".');
2494 return false;
2495 }
2496
2497 cb_js_everywhere.prop('readonly', cb_js_optimize.prop('checked') );
2498 }
2499 cb_js_optimize.on( 'click', check_js_optimize );
2500 check_js_optimize();
2501
2502 console.log( 'FV Player Settings screen initializing finished.');
2503 });
2504 </script>
2505
2506 <script>
2507 /* TABS */
2508 jQuery( function($) {
2509 function set_visible_tab() {
2510 $('#fv_player_js_warning').hide();
2511
2512 var anchor = window.location.hash.substring(1),
2513 skin_anchor = window.location.hash.substring(1);
2514
2515 if( !anchor || !anchor.match(/tab_/) ) {
2516 if ( skin_anchor.match( /skin-tab-/ ) ) {
2517 anchor = 'postbox-container-tab_skin';
2518 } else {
2519 anchor = 'postbox-container-tab_basic';
2520 }
2521 }
2522
2523 if ( ! skin_anchor || ! skin_anchor.match( /skin-tab-/ ) ) {
2524 skin_anchor = 'skin-tab-skin';
2525 }
2526
2527 $('#fv_flowplayer_admin_tabs .nav-tab, #fv_flowplayer_admin_skin_tabs .nav-tab').removeClass('nav-tab-active');
2528 $('[href=\\#'+anchor+']').addClass('nav-tab-active');
2529 $('#dashboard-widgets .postbox-container').hide();
2530 $('#' + anchor).show();
2531
2532 $( '[href=\\#' + skin_anchor + ']' ).addClass('nav-tab-active');
2533 $( '.skin-tab-content' ).hide();
2534 $( '#' + skin_anchor ).show();
2535
2536 // scroll to the top of skin_anchor
2537 var offset = $( '#' + skin_anchor ).offset().top - 120;
2538 window.scrollTo(0, offset);
2539 }
2540
2541 set_visible_tab();
2542
2543 $( '.settings-section-link' ).on('click', function(e) {
2544 location.hash = $(this).attr('href');
2545 set_visible_tab();
2546 return false;
2547 });
2548 });
2549
2550 jQuery('#fv_flowplayer_admin_tabs a').on('click',function(e){
2551 if ( history.pushState ) {
2552 history.pushState( null, null, e.target.hash );
2553 }
2554
2555 var anchor = jQuery(this).attr('href').substring(1);
2556 jQuery('#fv_flowplayer_admin_tabs .nav-tab').removeClass('nav-tab-active');
2557 jQuery('[href=\\#'+anchor+']').addClass('nav-tab-active');
2558 jQuery('#dashboard-widgets .postbox-container').hide();
2559 jQuery('#' + anchor).show();
2560
2561 return false;
2562 });
2563
2564 jQuery('#fv_flowplayer_admin_skin_tabs a').on('click',function(e){
2565 if ( history.pushState ) {
2566 history.pushState( null, null, e.target.hash );
2567 }
2568
2569 var anchor = jQuery(this).attr('href').substring(1);
2570 jQuery('#fv_flowplayer_admin_skin_tabs .nav-tab').removeClass('nav-tab-active');
2571 jQuery('[href=\\#'+anchor+']').addClass('nav-tab-active');
2572 jQuery( '.skin-tab-content' ).hide();
2573 jQuery('#' + anchor).show();
2574
2575 return false;
2576 });
2577
2578 jQuery('#normal-sortables .button-primary').on('click',function(e){
2579 if ('fv-wp-flowplayer-submit' == this.name) {
2580 // store windows scroll position, so we can return to the same spot after reload
2581 if (localStorage) {
2582 localStorage["fv_posStorage"] = jQuery(window).scrollTop();
2583 }
2584 }
2585
2586 return true;
2587 });
2588
2589 jQuery(window).on('load', function() {
2590 setTimeout(function() {
2591 if (localStorage) {
2592 var posReader = localStorage["fv_posStorage"];
2593 if (posReader) {
2594 jQuery(window).scrollTop(posReader);
2595 localStorage.removeItem("fv_posStorage");
2596 }
2597 }
2598 }, 100);
2599 });
2600
2601 jQuery('a.fv-settings-anchor').on('click',function(e){
2602 var id = jQuery(this).attr('href');
2603 if( id.match(/^#./) ){
2604 var el = jQuery(id);
2605 if(el.length){
2606 var tab = el.parents('.postbox-container').attr('id');
2607 jQuery('#fv_flowplayer_admin_tabs').find('a[href=\\#'+tab+']').click()
2608 }
2609 }
2610 });
2611
2612
2613
2614
2615
2616 </script>
2617