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

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

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