FV Flowplayer Video Player - Version 7.3.6.727

Version Description

  • 2017/01/08 =

  • Caption field - renaming to Title

  • Database - enabling background processing for videos in DB

  • Editor - fix for WebM and HLS duration scanning

  • Lightbox - added Remove fancyBox setting - use if you see a "fancyBox already initialized" message on JavaScript console

  • Sharing - removing Google+ as it's deprecated

  • Bugfix - PHP 7.2 compatiblity

Download this release

Release Info

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

Code changes from version 7.3.3.727 to 7.3.6.727

controller/editor.php CHANGED
@@ -69,7 +69,11 @@ function flowplayer_add_media_button() {
69
  add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
70
 
71
 
 
72
 
 
 
 
73
 
74
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
75
 
69
  add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
70
 
71
 
72
+ add_action( 'block_editor_meta_box_hidden_fields', 'fv_wp_flowplayer_gutenberg_editor_load' );
73
 
74
+ function fv_wp_flowplayer_gutenberg_editor_load() {
75
+ add_action( 'admin_footer', 'fv_wp_flowplayer_edit_form_after_editor', 0 );
76
+ }
77
 
78
  add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
79
 
controller/shortcodes.php CHANGED
@@ -361,10 +361,6 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
361
  $aArgs = func_get_args();
362
  $atts = $aArgs[1];
363
 
364
- if( !empty($atts['type']) && $atts['type'] != 'video' ) {
365
- return false;
366
- }
367
-
368
  // copy from wp-includes/media.php wp_playlist_shortcode()
369
  global $post;
370
  if ( ! empty( $attr['ids'] ) ) {
@@ -416,6 +412,8 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
416
  $bridge_atts = array();
417
  $aPlaylistItems = array();
418
  $aPlaylistImages = array();
 
 
419
  $i = 0;
420
  foreach ( $attachments as $attachment ) {
421
  $i++;
@@ -437,6 +435,15 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
437
  } else {
438
  $aPlaylistImages[] = $src;
439
  }
 
 
 
 
 
 
 
 
 
440
 
441
  }
442
 
@@ -450,7 +457,13 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
450
  $bridge_atts['playlist'] .= ';';
451
  }
452
  $bridge_atts['playlist'] = trim($bridge_atts['playlist'],';');
 
 
453
 
 
 
 
 
454
  if( isset($atts['width']) ) {
455
  $bridge_atts['width'] = $atts['width'];
456
  }
@@ -461,7 +474,11 @@ if( ( empty($_POST['action']) || $_POST['action'] != 'parse-media-shortcode' ) &
461
  if( count($bridge_atts) == 0 ) {
462
  return "<!--FV Flowplayer video shortcode integration - no attributes recognized-->";
463
  }
464
-
 
 
 
 
465
  return flowplayer_content_handle( $bridge_atts, false, 'video' );
466
  }
467
 
361
  $aArgs = func_get_args();
362
  $atts = $aArgs[1];
363
 
 
 
 
 
364
  // copy from wp-includes/media.php wp_playlist_shortcode()
365
  global $post;
366
  if ( ! empty( $attr['ids'] ) ) {
412
  $bridge_atts = array();
413
  $aPlaylistItems = array();
414
  $aPlaylistImages = array();
415
+ $aPlaylistCaptions = array();
416
+ $aPlaylistDurations = array();
417
  $i = 0;
418
  foreach ( $attachments as $attachment ) {
419
  $i++;
435
  } else {
436
  $aPlaylistImages[] = $src;
437
  }
438
+
439
+ $aPlaylistCaptions[] = str_replace( array('"',';'), '', flowplayer::esc_caption($attachment->post_title) );
440
+
441
+ $meta = wp_get_attachment_metadata( $attachment->ID );
442
+ if( !empty($meta) ) {
443
+ if( !empty($meta['length_formatted']) ) {
444
+ $aPlaylistDurations[] = $meta['length_formatted'];
445
+ }
446
+ }
447
 
448
  }
449
 
457
  $bridge_atts['playlist'] .= ';';
458
  }
459
  $bridge_atts['playlist'] = trim($bridge_atts['playlist'],';');
460
+ if( count($aPlaylistCaptions) > 1 || $atts['tracklist'] ) $bridge_atts['caption'] = implode(';',$aPlaylistCaptions);
461
+ $bridge_atts['durations'] = implode(';',$aPlaylistDurations);
462
 
463
+ if( $atts['tracklist'] ) {
464
+ $bridge_atts['listshow'] = true;
465
+ }
466
+
467
  if( isset($atts['width']) ) {
468
  $bridge_atts['width'] = $atts['width'];
469
  }
474
  if( count($bridge_atts) == 0 ) {
475
  return "<!--FV Flowplayer video shortcode integration - no attributes recognized-->";
476
  }
477
+
478
+ if( !empty($atts['type']) && $atts['type'] == 'audio' ) {
479
+ $bridge_atts['liststyle'] = 'horizontal';
480
+ }
481
+
482
  return flowplayer_content_handle( $bridge_atts, false, 'video' );
483
  }
484
 
css/colorbox.css CHANGED
@@ -1,41 +1,40 @@
1
- #fv-wordpress-flowplayer-popup { background: white; }
2
-
3
- /*
4
- ColorBox Core Style
5
- The following rules are the styles that are consistant between themes.
6
- Avoid changing this area to maintain compatability with future versions of ColorBox.
7
- */
8
- #fv_player_box, #fv_player_boxOverlay, #fv_player_boxWrapper, #fv_player_box.fv-flowplayer-shortcode-editor, #fv_player_boxOverlay.fv-flowplayer-shortcode-editor, #fv_player_boxWrapper.fv-flowplayer-shortcode-editor{position:absolute; top:0; left:0; z-index:100001; overflow:hidden;}
9
- #fv_player_boxOverlay, #fv_player_boxOverlay.fv-flowplayer-shortcode-editor{position:fixed; width:100%; height:100%; z-index: 100000}
10
- #fv_player_boxMiddleLeft, #fv_player_boxBottomLeft{clear:left;}
11
- #fv_player_boxContent{position:relative; overflow:hidden;}
12
- #fv_player_boxLoadedContent{overflow:auto;}
13
- #fv_player_boxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
- .fv-flowplayer-shortcode-editor #fv_player_boxTitle{margin:5px; text-align: left; bottom: auto;}
15
- .fv-flowplayer-shortcode-editor #fv_player_boxClose{top:8px;right:8px;}
16
- #fv_player_boxLoadingOverlay, #fv_player_boxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
17
- #fv_player_boxPrevious, #fv_player_boxNext, #fv_player_boxClose, #fv_player_boxSlideshow{cursor:pointer;}
18
-
19
- /*
20
- ColorBox example user style
21
- The following rules are ordered and tabbed in a way that represents the
22
- order/nesting of the generated HTML, so that the structure easier to understand.
23
- */
24
- #fv_player_boxOverlay{background:#111;}
25
-
26
- #colorBox{}
27
- #fv_player_boxContent{background:#fff; padding: 5px;background:url(loading.gif) 50% 50% no-repeat #fff; }
28
- #fv_player_boxLoadedContent{margin-top:35px;}
29
- #fv_player_boxTitle{position:absolute; top:0px; left:0; padding: 8px 0 8px 18.5%; width:100%; color:#9D1A28; font-size: 14px;}
30
- #fv_player_boxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
31
- #fv_player_boxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
32
- #fv_player_boxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
33
- #fv_player_boxNext{position:absolute; bottom:0px; left:63px; color:#444;}
34
- /*#fv_player_boxLoadingOverlay{ text-align: center; background:url(loading.gif) 5px 5px no-repeat #fff;}*/
35
- #fv_player_boxClose{position:absolute; top:2px; right:2px; display:block; color:#444; height: 16px; width: 16px; overflow: hidden; text-indent: 25px; background: url("img/uploader-icons.png") -98px 0 no-repeat transparent; border: 0; }
36
- #fv_player_boxClose:hover { background-position: -98px 0; }
37
-
38
- /* Add video button */
39
- .wp-media-buttons .fv-wordpress-flowplayer-button span{min-width:28px;min-height: 26px;display:inline-block;background:url('../images/icon.png') no-repeat center center;vertical-align:top;}
40
- @media only screen and (max-width: 782px) {.wp-media-buttons .fv-wordpress-flowplayer-button span{min-width:24px;display:inline-block;min-height:18px;background-size:24px auto;} }
41
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {.wp-media-buttons .fv-wordpress-flowplayer-button span{background:url('../images/icon@x2.png') no-repeat center center;min-width:32px;background-size:25px auto;} }
1
+ #fv-wordpress-flowplayer-popup { background: white; }
2
+
3
+ /*
4
+ ColorBox Core Style
5
+ The following rules are the styles that are consistant between themes.
6
+ Avoid changing this area to maintain compatability with future versions of ColorBox.
7
+ */
8
+ #fv_player_box, #fv_player_boxOverlay, #fv_player_boxWrapper, #fv_player_box.fv-flowplayer-shortcode-editor, #fv_player_boxOverlay.fv-flowplayer-shortcode-editor, #fv_player_boxWrapper.fv-flowplayer-shortcode-editor{position:absolute; top:0; left:0; z-index:100001; overflow:hidden;}
9
+ #fv_player_boxOverlay, #fv_player_boxOverlay.fv-flowplayer-shortcode-editor{position:fixed; width:100%; height:100%; z-index: 100000}
10
+ #fv_player_boxMiddleLeft, #fv_player_boxBottomLeft{clear:left;}
11
+ #fv_player_boxContent{position:relative; overflow:hidden;}
12
+ #fv_player_boxLoadedContent{overflow:auto;}
13
+ #fv_player_boxLoadedContent iframe{display:block; width:100%; height:100%; border:0; background-color: white;}
14
+ .fv-flowplayer-shortcode-editor #fv_player_boxTitle{margin:5px; text-align: left; bottom: auto;}
15
+ .fv-flowplayer-shortcode-editor #fv_player_boxClose{top:8px;right:8px;}
16
+ #fv_player_boxLoadingOverlay, #fv_player_boxLoadingGraphic{position:absolute; top:0; left:0; width:100%;}
17
+ #fv_player_boxPrevious, #fv_player_boxNext, #fv_player_boxClose, #fv_player_boxSlideshow{cursor:pointer;}
18
+
19
+ /*
20
+ ColorBox example user style
21
+ The following rules are ordered and tabbed in a way that represents the
22
+ order/nesting of the generated HTML, so that the structure easier to understand.
23
+ */
24
+ #fv_player_boxOverlay{background:#111;}
25
+
26
+ #colorBox{}
27
+ #fv_player_boxContent{background:#fff; padding: 5px;background:url(loading.gif) 50% 50% no-repeat #fff; }
28
+ #fv_player_boxLoadedContent{margin-top:35px;}
29
+ #fv_player_boxTitle{position:absolute; top:0px; left:0; padding: 8px 0 8px 18.5%; width:100%; color:#9D1A28; font-size: 14px;}
30
+ #fv_player_boxCurrent{position:absolute; bottom:0px; left:100px; color:#999;}
31
+ #fv_player_boxSlideshow{position:absolute; bottom:0px; right:42px; color:#444;}
32
+ #fv_player_boxPrevious{position:absolute; bottom:0px; left:0; color:#444;}
33
+ #fv_player_boxNext{position:absolute; bottom:0px; left:63px; color:#444;}
34
+ /*#fv_player_boxLoadingOverlay{ text-align: center; background:url(loading.gif) 5px 5px no-repeat #fff;}*/
35
+ #fv_player_boxClose{position:absolute; top:2px; right:2px; display:block; color:#444; height: 16px; width: 16px; overflow: hidden; text-indent: 25px; background: url("img/uploader-icons.png") -98px 0 no-repeat transparent; border: 0; }
36
+ #fv_player_boxClose:hover { background-position: -98px 0; }
37
+
38
+ /* Add video button */
39
+ @media only screen and (max-width: 782px) {.wp-media-buttons .fv-wordpress-flowplayer-button span{min-width:24px;display:inline-block;min-height:18px;background-size:24px auto;} }
40
+ @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {.wp-media-buttons .fv-wordpress-flowplayer-button span{background:url('../images/icon@x2.png') no-repeat center center;min-width:32px;background-size:25px auto;} }
 
css/flowplayer.css CHANGED
@@ -365,7 +365,7 @@
365
  bottom: 0;
366
  left: 0;
367
  right: 0;
368
- height: 100%;
369
  width: 100%; }
370
  .flowplayer video.fp-engine:not(.native-subtitles)::-webkit-media-controls {
371
  display: none !important; }
@@ -1152,14 +1152,6 @@
1152
  left: 50%;
1153
  top: 50%;
1154
  }
1155
- .fvp-share-bar .fvp-sharing .sharing-google {
1156
- background-color: #dd4b39;
1157
- }
1158
- .fvp-share-bar .fvp-sharing .sharing-google svg{
1159
- margin: -9px 0 0 -9px;
1160
- width: 18px;
1161
- height: 18px;
1162
- }
1163
  .fvp-share-bar .fvp-sharing .sharing-facebook {
1164
  background-color: #3B5998;
1165
  }
@@ -1268,7 +1260,9 @@
1268
  .fp-playlist-external a:hover h4,.fp-playlist-external a.fvp-video-thumb-no-splash h4,#dashboard-widgets .flowplayer-wrapper a:hover h4,.fp-playlist-external a.is-active:hover h4, .fp-playlist-external a:hover .dur {opacity:1;color:#fff}
1269
  .fp-playlist-horizontal a.is-active {-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s}
1270
  .is-touch + .fp-playlist-horizontal a h4 {opacity:1;background-color:transparent;text-shadow:0 0 12px #000;top:20%;bottom:20%;font-family:"myriad pro",Helvetica,Arial,sans-serif !important}
 
1271
  .is-touch + .fp-playlist-horizontal a h4 span {background-color:rgba(0,0,0,.3)}
 
1272
  .fp-playlist-horizontal.is-wide a,.entry-content .fp-playlist-horizontal.is-wide a {width: 20%}
1273
  .fp-playlist-horizontal.is-wide a:nth-child(3n+1) div:before {display: block}
1274
  .fp-playlist-horizontal.is-wide a:nth-child(5n+1) div:before {display: none}
365
  bottom: 0;
366
  left: 0;
367
  right: 0;
368
+ height: 100% !important;
369
  width: 100%; }
370
  .flowplayer video.fp-engine:not(.native-subtitles)::-webkit-media-controls {
371
  display: none !important; }
1152
  left: 50%;
1153
  top: 50%;
1154
  }
 
 
 
 
 
 
 
 
1155
  .fvp-share-bar .fvp-sharing .sharing-facebook {
1156
  background-color: #3B5998;
1157
  }
1260
  .fp-playlist-external a:hover h4,.fp-playlist-external a.fvp-video-thumb-no-splash h4,#dashboard-widgets .flowplayer-wrapper a:hover h4,.fp-playlist-external a.is-active:hover h4, .fp-playlist-external a:hover .dur {opacity:1;color:#fff}
1261
  .fp-playlist-horizontal a.is-active {-webkit-transition:all .3s;-moz-transition:all .3s;transition:all .3s}
1262
  .is-touch + .fp-playlist-horizontal a h4 {opacity:1;background-color:transparent;text-shadow:0 0 12px #000;top:20%;bottom:20%;font-family:"myriad pro",Helvetica,Arial,sans-serif !important}
1263
+ .is-touch + .fp-playlist-horizontal.is-audio a h4 {text-shadow:none}
1264
  .is-touch + .fp-playlist-horizontal a h4 span {background-color:rgba(0,0,0,.3)}
1265
+ .is-touch + .fp-playlist-horizontal.is-audio a h4 span {background-color:transparent}
1266
  .fp-playlist-horizontal.is-wide a,.entry-content .fp-playlist-horizontal.is-wide a {width: 20%}
1267
  .fp-playlist-horizontal.is-wide a:nth-child(3n+1) div:before {display: block}
1268
  .fp-playlist-horizontal.is-wide a:nth-child(5n+1) div:before {display: none}
css/shortcode-editor.css CHANGED
@@ -1,161 +1,166 @@
1
- #fv_player_boxLoadedContent{ background-color:white; }
2
- #fv-player-shortcode-editor { background-color: white; }
3
- .fv-wp-flowplayer-notice { background-color: #FFFFE0; border-color: #E6DB55; margin: 5px 0 15px; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; }
4
- .fv-wp-flowplayer-notice.fv-wp-flowplayer-note { background-color: #F8F8F8; border-color: #E0E0E0; }
5
- .fv-wp-flowplayer-notice p { font-family: sans-serif; font-size: 12px; margin: 0.5em 0; padding: 2px; }
6
- .fv_wp_flowplayer_playlist_remove { display: none; }
7
- .fv-player-tabs-header { padding:6px 0 12px; }
8
- #fv-flowplayer-playlist table { border-bottom: 1px #eee solid; }
9
- #fv-player-shortcode-editor table input[type=text], #fv-flowplayer-playlist table input[type=text].with-button { width: 93%; }
10
- #fv-player-shortcode-editor table input[type=text].half-field { width: 46%; }
11
- #fv-player-shortcode-editor table/*:first-child*/ input.with-button { width: 70%; }
12
- #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles { width: 82%; }
13
- #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles.with-button { width: 59%; }
14
- #fv-player-shortcode-editor table select.fv_wp_flowplayer_field_subtitles_lang { width: 10%;float:left; }
15
- #fv-flowplayer-playlist table tr.video-size { display: none; }
16
- #fv-flowplayer-playlist table tr#fv_wp_flowplayer_add_format_wrapper { display: none; }
17
- #fv-flowplayer-playlist table tr#fv_wp_flowplayer_file_info { display: none; }
18
- #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp { visibility: hidden; }
19
- #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: hidden; }
20
- #fv-flowplayer-playlist table .hint { display: none; }
21
- /*#fv-flowplayer-playlist table .button { display: none; }*/
22
- #fv-flowplayer-playlist table:first-child tr.video-size { display: table-row; }
23
- #fv-flowplayer-playlist table:first-child .hint { display: inline; }
24
- #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_add_format_wrapper { display: table-row; }
25
- #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_file_info { display: none; }
26
- #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp { visibility: visible; }
27
- #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: visible; }
28
- /*#fv-flowplayer-playlist table:first-child .button { display: inline-block; }*/
29
- /*#colorbox, #cboxOverlay, #cboxWrapper{ z-index: 100000; }*/
30
-
31
- #fv-player-shortcode-editor-editor{ top:0; }
32
- #fv-player-shortcode-editor-editor > table{ width:100%; }
33
- #fv-player-shortcode-editor td{ vertical-align: top; }
34
- .fv-player-tab table{ margin-bottom: 10px; }
35
- .fv-player-tabs-header .nav-tab-wrapper{ margin:0; }
36
- .fv_player_actions_end-toggle,.fv_player_interface_hide,.fv-player-playlist-item-title{ display:none; }
37
- #fv_player_boxTitle{ display:none!important; }
38
- #fv_player_boxLoadedContent{ margin-top:0; }
39
-
40
- .fv-player-shortcode-editor-left{ width:40%; }
41
- .fv-player-shortcode-editor-right{ width:60%; }
42
- #fv-player-shortcode-editor #fv_wp_flowplayer_field_player_name { width: 88% }
43
- .fv-player-tab{position:relative;}
44
- .fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
45
- #fv-player-list-thumb-toggle a{ text-decoration:none;margin-left:6px;color:#b4b9be; }
46
- #fv-player-list-thumb-toggle a.active{ color:#0073aa; }
47
- #fv-player-list-thumb-toggle a.disabled{ cursor:default; }
48
- .fv-player-playlist-item-title, .fv-player-playlist-item-title:hover{ margin:0;border:0;background:transparent; }
49
-
50
- /*Playlist view*/
51
- .is-playlist .fv-player-playlist-item-title{ display:block;padding:0 10px 12px; }
52
- .is-playlist .fv_player_field_insert-button{ display:none; }
53
- .is-playlist-active .playlist_edit{ display:none; }
54
-
55
- .is-playlist .hide-if-playlist{display:none;}
56
- .is-singular .hide-if-singular{display:none;}
57
- .is-playlist-active .hide-if-playlist-active{display:none;}
58
-
59
- .playlist_edit{ display:block; }
60
- .fv-player-tab-playlist tr:not(:hover) .fvp_item_remove{visibility: hidden;}
61
- .fv-player-tab-playlist tr:hover .fvp_item_remove{visibility: visible;color: #a00;}
62
- .fv-player-tab-playlist a{cursor:pointer;}
63
-
64
- .fv-player-tab-playlist .fv-player-playlist-item{ border-spacing: 0 2px; }
65
- .fv-player-tab-playlist tbody td{ padding:3px 5px;height:50px;cursor:pointer; }
66
- .fv-player-tab-playlist .fv-player-playlist-item tbody td:first-child{cursor:n-resize;}
67
-
68
- .fvp_item_video-side-by-side{display:inline-block;vertical-align:top;float: left;margin-right: 1%;}
69
- .fvp_item_video-filename {word-wrap: break-word;display: inline-block; max-width: 180px;}
70
- .hide-thumbnails .fvp_item_video-filename {max-width: 100%;}
71
- .fv-player-tab-playlist > table > thead > tr > th:nth-child(1),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(1),
72
- .fv-player-tab-playlist > table > thead > tr > th:nth-child(2),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(2){ width:300px; }
73
- .fv-player-tab-playlist > table > thead{ display:block; }
74
- .fv-player-tab-playlist.hide-thumbnails .fvp_item_video-thumbnail{ display:none; }
75
- .fv-player-tab-playlist > table > tbody{ display:block;overflow:auto;max-height:calc(100vh - 270px); }
76
- #fv-player-list-thumb-toggle > .active{ font-weight:bold; }
77
- #fv-player-list-thumb-toggle > a{ box-shadow:none; }
78
- #fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
79
-
80
- #fv-player-shortcode-editor-loading-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center; position:absolute; z-index: 2; height: 100%; width: 100%;}
81
- #fv-player-shortcode-editor-loading-spinner.loaded {background: white}
82
-
83
- /*Preview iframe*/
84
- #fv-player-shortcode-editor-preview{ width: 460px;position:relative; }
85
- #fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
86
- #fv-player-shortcode-editor-preview.preview-loading #fv-player-shortcode-editor-preview-spinner,
87
- #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-no,
88
- #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-new-tab{display:block;}
89
- #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
90
- #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
91
- #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-iframe-refresh{display:none!important}
92
- #fv-player-shortcode-editor-preview-spinner, .fv-player-shortcode-editor-small-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center}
93
- #fv-player-shortcode-editor-preview-spinner{position:absolute; z-index: 2; height: 200px; width: 100%;}
94
- .fv-player-shortcode-editor-small-spinner {z-index: 2; background-size: 20px; height: 20px; width: 20px; display: inline-block}
95
- .fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
96
- #fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
97
- #fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
98
-
99
- #fv-player-shortcode-editor-preview div.notice { display: block }
100
-
101
- .first-item-only {
102
- display: none;
103
- }
104
- .fv-player-playlist-item[data-index="0"] .first-item-only {
105
- display: table-row;
106
- }
107
- .fv-player-playlist-item[data-index="0"] .first-item-only.fv_player_interface_hide {
108
- display: none;
109
- }
110
-
111
- .fv-player-tabs th { width: 21%; text-align: right; }
112
- .fv-player-tabs .fv-player-tab-playlist th { text-align: left; }
113
-
114
-
115
-
116
- /* moved in from main plugin css */
117
- .add_media span.wp-media-buttons-icon {
118
- background: url("img/media-button.png") no-repeat scroll left top;
119
- display: inline-block;
120
- height: 16px;
121
- margin: 0 2px;
122
- vertical-align: text-top;
123
- width: 16px;
124
- }
125
- #cboxWrapper a {
126
- text-decoration: none;
127
- }
128
- a #add-format, a #add-rtmp {
129
- background: #333;
130
- border-radius: 2px;
131
- color: #fff;
132
- display: inline-block;
133
- font-size: 16px;
134
- font-weight: normal;
135
- height: 18px;
136
- line-height: 1rem;
137
- margin: 0 5px 0 0;
138
- text-align: center;
139
- width: 18px;
140
- padding: 0;
141
- text-decoration: none;
142
- }
143
- #fv-wordpress-flowplayer-popup table {
144
- width: 100%;
145
- }
146
- #fv-wordpress-flowplayer-popup table th {
147
- text-align: right;
148
- width: 18%;
149
- padding: 4px 2px;
150
- }
151
- #fv-wordpress-flowplayer-popup table td {
152
- padding: 4px 2px;
153
- }
154
-
155
- #fv_player_copy_to_clipboard, #fv_player_import_data {width: 80%}
156
- #fv_player_copied_to_clipboard_message, #fv_player_imported_message {margin: 22px auto 0 auto; visibility: hidden; width: 20%; text-align: center}
157
-
158
- #fv-player-shortcode-editor-editor ::placeholder {
159
- opacity:.5;
160
- }
161
-
 
 
 
 
 
1
+ #fv_player_boxLoadedContent{ background-color:white; }
2
+ #fv-player-shortcode-editor { background-color: white; }
3
+ .fv-wp-flowplayer-notice { background-color: #FFFFE0; border-color: #E6DB55; margin: 5px 0 15px; padding: 0 0.6em; border-radius: 3px 3px 3px 3px; border-style: solid; border-width: 1px; }
4
+ .fv-wp-flowplayer-notice.fv-wp-flowplayer-note { background-color: #F8F8F8; border-color: #E0E0E0; }
5
+ .fv-wp-flowplayer-notice p { font-family: sans-serif; font-size: 12px; margin: 0.5em 0; padding: 2px; }
6
+ .fv_wp_flowplayer_playlist_remove { display: none; }
7
+ .fv-player-tabs-header { padding:6px 0 12px; }
8
+ #fv-flowplayer-playlist table { border-bottom: 1px #eee solid; }
9
+ #fv-player-shortcode-editor table input[type=text], #fv-flowplayer-playlist table input[type=text].with-button { width: 93%; }
10
+ #fv-player-shortcode-editor table input[type=text].half-field { width: 37%; }
11
+ #fv-player-shortcode-editor .fv-player-tab-video-files table input.with-button { width: 75%; }
12
+ #fv-player-shortcode-editor .fv-player-tab-subtitles table input.with-button { width: 70%; }
13
+ #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles { width: 82%; }
14
+ #fv-player-shortcode-editor table input.fv_wp_flowplayer_field_subtitles.with-button { width: 59%; }
15
+ #fv-player-shortcode-editor table select.fv_wp_flowplayer_field_subtitles_lang { width: 10%;float:left; margin: 1px 2px; height: 27px }
16
+ #fv-flowplayer-playlist table tr.video-size { display: none; }
17
+ #fv-flowplayer-playlist table tr#fv_wp_flowplayer_add_format_wrapper { display: none; }
18
+ #fv-flowplayer-playlist table tr#fv_wp_flowplayer_file_info { display: none; }
19
+ #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp { visibility: hidden; }
20
+ #fv-flowplayer-playlist table .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: hidden; }
21
+ #fv-flowplayer-playlist table .hint { display: none; }
22
+ /*#fv-flowplayer-playlist table .button { display: none; }*/
23
+ #fv-flowplayer-playlist table:first-child tr.video-size { display: table-row; }
24
+ #fv-flowplayer-playlist table:first-child .hint { display: inline; }
25
+ #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_add_format_wrapper { display: table-row; }
26
+ #fv-flowplayer-playlist table:first-child tr#fv_wp_flowplayer_file_info { display: none; }
27
+ #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp { visibility: visible; }
28
+ #fv-flowplayer-playlist table:first-child .fv_wp_flowplayer_field_rtmp_wrapper th { visibility: visible; }
29
+ /*#fv-flowplayer-playlist table:first-child .button { display: inline-block; }*/
30
+ /*#colorbox, #cboxOverlay, #cboxWrapper{ z-index: 100000; }*/
31
+
32
+ #fv-player-shortcode-editor .fv-player-tab-video-files table .button { width: 22% }
33
+ #fv-player-shortcode-editor .fv-player-tab-subtitles table .button { width: 26% }
34
+ #fv-player-shortcode-editor .fv-player-tabs .submit-button-wrapper .button { width: auto; }
35
+
36
+ #fv-player-shortcode-editor-editor{ top:0; }
37
+ #fv-player-shortcode-editor-editor > table{ width:100%; }
38
+ #fv-player-shortcode-editor td{ vertical-align: top; }
39
+ .fv-player-tab table{ margin-bottom: 10px; }
40
+ .fv-player-tabs-header .nav-tab-wrapper{ margin:0; }
41
+ .fv_player_actions_end-toggle,.fv_player_interface_hide,.fv-player-playlist-item-title{ display:none; }
42
+ #fv_player_boxTitle{ display:none!important; }
43
+ #fv_player_boxLoadedContent{ margin-top:0; }
44
+
45
+ .fv-player-shortcode-editor-left{ width:40%; }
46
+ .fv-player-shortcode-editor-right{ width:60%; }
47
+ #fv-player-shortcode-editor #fv_wp_flowplayer_field_player_name { width: 88% }
48
+ .fv-player-tab{position:relative;}
49
+ .fv-player-tabs #fv-player-list-thumb-toggle{ position:absolute;right:10px;text-align:right;top:9px; }
50
+ #fv-player-list-thumb-toggle a{ text-decoration:none;margin-left:6px;color:#b4b9be; }
51
+ #fv-player-list-thumb-toggle a.active{ color:#0073aa; }
52
+ #fv-player-list-thumb-toggle a.disabled{ cursor:default; }
53
+ .fv-player-playlist-item-title, .fv-player-playlist-item-title:hover{ margin:0;border:0;background:transparent; }
54
+
55
+ /*Playlist view*/
56
+ .is-playlist .fv-player-playlist-item-title{ display:block;padding:0 10px 12px; }
57
+ .is-playlist .fv_player_field_insert-button{ display:none; }
58
+ .is-playlist-active .playlist_edit{ display:none; }
59
+
60
+ .is-playlist .hide-if-playlist{display:none;}
61
+ .is-singular .hide-if-singular{display:none;}
62
+ .is-playlist-active .hide-if-playlist-active{display:none;}
63
+
64
+ .playlist_edit{ display:block; }
65
+ .fv-player-tab-playlist tr:not(:hover) .fvp_item_remove{visibility: hidden;}
66
+ .fv-player-tab-playlist tr:hover .fvp_item_remove{visibility: visible;color: #a00;}
67
+ .fv-player-tab-playlist a{cursor:pointer;}
68
+
69
+ .fv-player-tab-playlist .fv-player-playlist-item{ border-spacing: 0 2px; }
70
+ .fv-player-tab-playlist tbody td{ padding:3px 5px;height:50px;cursor:pointer; }
71
+ .fv-player-tab-playlist .fv-player-playlist-item tbody td:first-child{cursor:n-resize;}
72
+
73
+ .fvp_item_video-side-by-side{display:inline-block;vertical-align:top;float: left;margin-right: 1%;}
74
+ .fvp_item_video-filename {word-wrap: break-word;display: inline-block; max-width: 180px;}
75
+ .hide-thumbnails .fvp_item_video-filename {max-width: 100%;}
76
+ .fv-player-tab-playlist > table > thead > tr > th:nth-child(1),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(1),
77
+ .fv-player-tab-playlist > table > thead > tr > th:nth-child(2),.fv-player-tab-playlist > table > tbody > tr > td:nth-child(2){ width:300px; }
78
+ .fv-player-tab-playlist > table > thead{ display:block; }
79
+ .fv-player-tab-playlist.hide-thumbnails .fvp_item_video-thumbnail{ display:none; }
80
+ .fv-player-tab-playlist > table > tbody{ display:block;overflow:auto;max-height:calc(100vh - 270px); }
81
+ #fv-player-list-thumb-toggle > .active{ font-weight:bold; }
82
+ #fv-player-list-thumb-toggle > a{ box-shadow:none; }
83
+ #fv-player-shortcode-editor td > input[type="checkbox"]{margin-top:-4px}
84
+
85
+ #fv-player-shortcode-editor-loading-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center; position:absolute; z-index: 2; height: 100%; width: 100%;}
86
+ #fv-player-shortcode-editor-loading-spinner.loaded {background: white}
87
+
88
+ /*Preview iframe*/
89
+ #fv-player-shortcode-editor-preview{ width: 460px;position:relative; }
90
+ #fv-player-shortcode-editor-preview div.fv-player-shortcode-editor-helper {display:none;}
91
+ #fv-player-shortcode-editor-preview.preview-loading #fv-player-shortcode-editor-preview-spinner,
92
+ #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-no,
93
+ #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-new-tab{display:block;}
94
+ #fv-player-shortcode-editor-preview.preview-no #fv-player-shortcode-editor-preview-target,
95
+ #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-target{display:none}
96
+ #fv-player-shortcode-editor-preview.preview-new-tab #fv-player-shortcode-editor-preview-iframe-refresh{display:none!important}
97
+ #fv-player-shortcode-editor-preview-spinner, .fv-player-shortcode-editor-small-spinner {background-image: url(../../../../wp-includes/images/wpspin-2x.gif); background-color: white; background-repeat: no-repeat; background-position: center}
98
+ #fv-player-shortcode-editor-preview-spinner{position:absolute; z-index: 2; height: 200px; width: 100%;}
99
+ .fv-player-shortcode-editor-small-spinner {z-index: 2; background-size: 20px; height: 20px; width: 20px; display: inline-block}
100
+ .fvp_item_video-thumbnail img{max-width: 95px;max-height: 95px;}
101
+ #fv-player-shortcode-editor-preview-new-tab, #fv-player-shortcode-editor-preview-no{background-image: url(../images/icon-256x256.png);width: 256px;height: 290px;background-repeat: no-repeat;line-height:512px;overflow:hidden;margin:0 auto;text-align: center;}
102
+ #fv-player-shortcode-editor-preview-new-tab a {margin-top:256px;}
103
+
104
+ #fv-player-shortcode-editor-preview div.notice { display: block }
105
+
106
+ .first-item-only {
107
+ display: none;
108
+ }
109
+ .fv-player-playlist-item[data-index="0"] .first-item-only {
110
+ display: table-row;
111
+ }
112
+ .fv-player-playlist-item[data-index="0"] .first-item-only.fv_player_interface_hide {
113
+ display: none;
114
+ }
115
+
116
+ .fv-player-tabs th { width: 21%; text-align: right; }
117
+ .fv-player-tabs .fv-player-tab-playlist th { text-align: left; }
118
+
119
+
120
+
121
+ /* moved in from main plugin css */
122
+ .add_media span.wp-media-buttons-icon {
123
+ background: url("img/media-button.png") no-repeat scroll left top;
124
+ display: inline-block;
125
+ height: 16px;
126
+ margin: 0 2px;
127
+ vertical-align: text-top;
128
+ width: 16px;
129
+ }
130
+ #cboxWrapper a {
131
+ text-decoration: none;
132
+ }
133
+ a #add-format, a #add-rtmp {
134
+ background: #333;
135
+ border-radius: 2px;
136
+ color: #fff;
137
+ display: inline-block;
138
+ font-size: 16px;
139
+ font-weight: normal;
140
+ height: 18px;
141
+ line-height: 1rem;
142
+ margin: 0 5px 0 0;
143
+ text-align: center;
144
+ width: 18px;
145
+ padding: 0;
146
+ text-decoration: none;
147
+ }
148
+ #fv-wordpress-flowplayer-popup table {
149
+ width: 100%;
150
+ }
151
+ #fv-wordpress-flowplayer-popup table th {
152
+ text-align: right;
153
+ width: 18%;
154
+ padding: 4px 2px;
155
+ }
156
+ #fv-wordpress-flowplayer-popup table td {
157
+ padding: 4px 2px;
158
+ }
159
+
160
+ #fv_player_copy_to_clipboard, #fv_player_import_data {width: 80%}
161
+ #fv_player_copied_to_clipboard_message, #fv_player_imported_message {margin: 22px auto 0 auto; visibility: hidden; width: 20%; text-align: center}
162
+
163
+ #fv-player-shortcode-editor-editor ::placeholder {
164
+ opacity:.5;
165
+ }
166
+
flowplayer.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
- Version: 7.3.3.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
@@ -27,7 +27,7 @@ License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
- $fv_wp_flowplayer_ver = '7.3.3.727';
31
  $fv_wp_flowplayer_core_ver = '7.2.7.1';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
@@ -87,8 +87,8 @@ if( is_admin() ) {
87
  }
88
  include_once(dirname( __FILE__ ) . '/models/system-info.php');
89
  register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
 
90
 
91
- }
92
-
93
  include_once( dirname( __FILE__ ) . '/controller/frontend.php' );
94
  include_once( dirname( __FILE__ ) . '/controller/shortcodes.php');
 
3
  Plugin Name: FV Player
4
  Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
5
  Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
6
+ Version: 7.3.6.727
7
  Author URI: http://foliovision.com/
8
  License: GPL-3.0
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.txt
27
  */
28
 
29
  global $fv_wp_flowplayer_ver;
30
+ $fv_wp_flowplayer_ver = '7.3.6.727';
31
  $fv_wp_flowplayer_core_ver = '7.2.7.1';
32
 
33
  include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
87
  }
88
  include_once(dirname( __FILE__ ) . '/models/system-info.php');
89
  register_deactivation_hook( __FILE__, 'flowplayer_deactivate' );
90
+ }
91
 
 
 
92
  include_once( dirname( __FILE__ ) . '/controller/frontend.php' );
93
  include_once( dirname( __FILE__ ) . '/controller/shortcodes.php');
94
+ include_once( dirname( __FILE__ ) . '/models/gutenberg.php' );
flowplayer/fv-flowplayer.min.js CHANGED
@@ -688,7 +688,10 @@ function fv_player_playlist_active(playlist,item) {
688
  }
689
 
690
  // scroll to the currently playing video if playlist type is vertical or horizontal
691
- if ($playlist.hasClass('fp-playlist-vertical') && !fullyVisibleY($item.get(0))) {
 
 
 
692
  var $el = (scroll_parent ? $playlist.parent() : $playlist);
693
  $el.animate({
694
  scrollTop: $el.scrollTop() + ($item.position().top - $el.position().top)
@@ -794,7 +797,6 @@ flowplayer( function(api,root) {
794
 
795
  jQuery('.fvp-share-bar .sharing-facebook',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');
796
  jQuery('.fvp-share-bar .sharing-twitter',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>');
797
- jQuery('.fvp-share-bar .sharing-google',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Google+</title><path d="M5.1 7l0 2c0 0 2 0 2.8 0 -0.4 1.3-1.1 2-2.8 2 -1.7 0-3-1.3-3-3 0-1.7 1.3-3 3-3 0.9 0 1.5 0.3 2 0.7 0.4-0.4 0.4-0.5 1.5-1.5 -0.9-0.8-2.1-1.3-3.4-1.3 -0.8 0-1.5 0.2-2.2 0.5 -1.7 0.8-2.9 2.6-2.9 4.6 0 2.8 2.3 5.1 5.1 5.1 4.2 0 5.2-3.7 4.9-6.1 -1 0-4.9 0-4.9 0l0 0Zm9.2 0.1l0-1.8 -1.3 0 0 1.8 -1.8 0 0 1.3 1.8 0 0 1.8 1.3 0 0-1.8 1.8 0 0-1.3 -1.8 0Z"/></svg>');
798
  jQuery('.fvp-share-bar .sharing-email',root).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>');
799
 
800
  jQuery('.fp-header',root).prepend( jQuery('.fvp-share-bar',root) );
688
  }
689
 
690
  // scroll to the currently playing video if playlist type is vertical or horizontal
691
+ if ( (
692
+ $playlist.hasClass('fp-playlist-vertical') ||
693
+ $playlist.hasClass('fp-playlist-horizontal') && $playlist.hasClass('is-audio') // this combination is also a vertical playlist basically
694
+ ) && !fullyVisibleY($item.get(0)) ) {
695
  var $el = (scroll_parent ? $playlist.parent() : $playlist);
696
  $el.animate({
697
  scrollTop: $el.scrollTop() + ($item.position().top - $el.position().top)
797
 
798
  jQuery('.fvp-share-bar .sharing-facebook',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Facebook</title><path d="M11.9 5.2l-2.6 0 0-1.6c0-0.7 0.3-0.7 0.7-0.7 0.3 0 1.6 0 1.6 0l0-2.9 -2.3 0c-2.6 0-3.3 2-3.3 3.3l0 2 -1.6 0 0 2.9 1.6 0c0 3.6 0 7.8 0 7.8l3.3 0c0 0 0-4.2 0-7.8l2.3 0 0.3-2.9Z"/></svg>');
799
  jQuery('.fvp-share-bar .sharing-twitter',root).append('<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="#fff"><title>Twitter</title><path d="M16 3.1c-0.6 0.3-1.2 0.4-1.9 0.5 0.7-0.4 1.2-1 1.4-1.8 -0.6 0.4-1.3 0.6-2.1 0.8 -0.6-0.6-1.4-1-2.4-1 -2 0.1-3.2 1.6-3.2 4 -2.7-0.1-5.1-1.4-6.7-3.4 -0.9 1.4 0.2 3.8 1 4.4 -0.5 0-1-0.1-1.5-0.4l0 0.1c0 1.6 1.1 2.9 2.6 3.2 -0.7 0.2-1.3 0.1-1.5 0.1 0.4 1.3 1.6 2.2 3 2.3 -1.6 1.7-4.6 1.4-4.8 1.3 1.4 0.9 3.2 1.4 5 1.4 6 0 9.3-5 9.3-9.3 0-0.1 0-0.3 0-0.4 0.6-0.4 1.2-1 1.6-1.7Z"/></svg>');
 
800
  jQuery('.fvp-share-bar .sharing-email',root).append('<svg xmlns="http://www.w3.org/2000/svg" height="16" viewBox="0 0 16 16" width="16" fill="#fff"><title>Email</title><path d="M8 10c0 0 0 0-1 0L0 6v7c0 1 0 1 1 1h14c1 0 1 0 1-1V6L9 10C9 10 8 10 8 10zM15 2H1C0 2 0 2 0 3v1l8 4 8-4V3C16 2 16 2 15 2z"/></svg>');
801
 
802
  jQuery('.fp-header',root).prepend( jQuery('.fvp-share-bar',root) );
js/gutenberg.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ( function() {
2
+ var el = wp.element.createElement;
3
+
4
+ wp.blocks.registerBlockType( 'fv-player-gutenberg/basic', {
5
+ title: 'FV Player',
6
+
7
+ icon: 'controls-play',
8
+
9
+ category: 'layout',
10
+
11
+ attributes: {
12
+ content: {
13
+ type: 'string',
14
+ source: 'text'
15
+ }
16
+ },
17
+
18
+ edit: function( props ) {
19
+ var content = props.attributes.content;
20
+ function onChangeContent( newContent ) {
21
+ props.setAttributes( { content: newContent } );
22
+ }
23
+
24
+ return el('div', {
25
+ className: 'fv-player-gutenberg'
26
+ }, el(
27
+ 'a',{
28
+ 'class': 'button fv-wordpress-flowplayer-button'
29
+ },
30
+ el(
31
+ 'span'
32
+ ),
33
+ 'FV Player'
34
+ ),
35
+ el(
36
+ wp.components.TextareaControl,
37
+ {
38
+ 'class': 'components-textarea-control__input fv-player-editor-field',
39
+ onChange: onChangeContent,
40
+ value: content,
41
+ }
42
+ )
43
+ );
44
+ },
45
+
46
+ save: function( props ) {
47
+ return el( wp.element.RawHTML,
48
+ null,
49
+ props.attributes.content
50
+ );
51
+ },
52
+ } );
53
+ }() );
js/shortcode-editor.js CHANGED
@@ -21,7 +21,7 @@ var fv_player_shortcode_preview_unsupported = false;
21
  var fv_player_editor_matcher = {
22
  default: {
23
  // matches URL of the video
24
- matcher: /\.mp4$/i,
25
  // AJAX will return these fields which can be auto-updated via JS
26
  update_fields: ['duration', 'last_video_meta_check'],
27
  }
@@ -544,7 +544,7 @@ function fv_wp_flowplayer_init() {
544
 
545
  jQuery('#player_id_top_text').html('');
546
 
547
- var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
548
  if( field.length ) {
549
  fv_wp_flowplayer_content = jQuery(field).val();
550
 
@@ -614,7 +614,15 @@ function fv_wp_flowplayer_init() {
614
  function fv_wp_flowplayer_insert( shortcode ) {
615
  if (typeof(jQuery(fv_player_editor_button_clicked).data('player_id')) == 'undefined' && typeof(jQuery(fv_player_editor_button_clicked).data('add_new')) == 'undefined') {
616
  var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
617
- if (field.length) {
 
 
 
 
 
 
 
 
618
  field.val(shortcode);
619
  field.trigger('fv_flowplayer_shortcode_insert', [shortcode]);
620
 
@@ -826,6 +834,8 @@ function fv_flowplayer_editor_item_show( new_index ) {
826
  jQuery('.fv-player-tabs-header .nav-tab').attr('style',false);
827
 
828
  var $ = jQuery;
 
 
829
 
830
  $('a[data-tab=fv-player-tab-video-files]').click();
831
 
@@ -990,7 +1000,7 @@ function fv_wp_flowplayer_edit() {
990
  jQuery("[name=fv_wp_flowplayer_field_splash_text]").each( function() { jQuery(this).val( '' ) } );
991
  jQuery(".fv_player_field_insert-button").attr( 'value', 'Insert' );
992
 
993
- var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
994
  if( field.length || jQuery('#widget-widget_fvplayer-'+FVFP_sWidgetId+'-text').length){
995
  // this is a horrible hack as it adds the hidden marker to the otherwise clean text field value just to make sure the shortcode varible below is parsed properly. But it allows some extra text to be entered into the text widget, so for now - ok
996
  if(fv_wp_flowplayer_content.match(/\[/) ) {
@@ -1758,7 +1768,15 @@ function fv_wp_flowplayer_on_close() {
1758
 
1759
  function fv_wp_flowplayer_set_html( html ) {
1760
  var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
1761
- if( field.length ) {
 
 
 
 
 
 
 
 
1762
  field.val(html);
1763
  field.trigger('fv_flowplayer_shortcode_insert', [ html ] );
1764
 
21
  var fv_player_editor_matcher = {
22
  default: {
23
  // matches URL of the video
24
+ matcher: /\.(mp4|webm|m3u8)$/i,
25
  // AJAX will return these fields which can be auto-updated via JS
26
  update_fields: ['duration', 'last_video_meta_check'],
27
  }
544
 
545
  jQuery('#player_id_top_text').html('');
546
 
547
+ var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper, .fv-player-gutenberg').find('.fv-player-editor-field');
548
  if( field.length ) {
549
  fv_wp_flowplayer_content = jQuery(field).val();
550
 
614
  function fv_wp_flowplayer_insert( shortcode ) {
615
  if (typeof(jQuery(fv_player_editor_button_clicked).data('player_id')) == 'undefined' && typeof(jQuery(fv_player_editor_button_clicked).data('add_new')) == 'undefined') {
616
  var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
617
+ var gutenberg = jQuery(fv_player_editor_button_clicked).parents('.fv-player-gutenberg').find('.fv-player-editor-field');
618
+
619
+ if( gutenberg.length ) {
620
+ var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value").set;
621
+ nativeInputValueSetter.call(gutenberg[0], shortcode);
622
+ var ev2 = new Event('change', { bubbles: true});
623
+ gutenberg[0].dispatchEvent(ev2,shortcode);
624
+
625
+ } else if (field.length) {
626
  field.val(shortcode);
627
  field.trigger('fv_flowplayer_shortcode_insert', [shortcode]);
628
 
834
  jQuery('.fv-player-tabs-header .nav-tab').attr('style',false);
835
 
836
  var $ = jQuery;
837
+
838
+ $(document).trigger('fv_flowplayer_shortcode_item_switch', [ new_index ] );
839
 
840
  $('a[data-tab=fv-player-tab-video-files]').click();
841
 
1000
  jQuery("[name=fv_wp_flowplayer_field_splash_text]").each( function() { jQuery(this).val( '' ) } );
1001
  jQuery(".fv_player_field_insert-button").attr( 'value', 'Insert' );
1002
 
1003
+ var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper, .fv-player-gutenberg').find('.fv-player-editor-field');
1004
  if( field.length || jQuery('#widget-widget_fvplayer-'+FVFP_sWidgetId+'-text').length){
1005
  // this is a horrible hack as it adds the hidden marker to the otherwise clean text field value just to make sure the shortcode varible below is parsed properly. But it allows some extra text to be entered into the text widget, so for now - ok
1006
  if(fv_wp_flowplayer_content.match(/\[/) ) {
1768
 
1769
  function fv_wp_flowplayer_set_html( html ) {
1770
  var field = jQuery(fv_player_editor_button_clicked).parents('.fv-player-editor-wrapper').find('.fv-player-editor-field');
1771
+ var gutenberg = jQuery(fv_player_editor_button_clicked).parents('.fv-player-gutenberg').find('.fv-player-editor-field');
1772
+
1773
+ if( gutenberg.length ) {
1774
+ var nativeInputValueSetter = Object.getOwnPropertyDescriptor(window.HTMLTextAreaElement.prototype, "value").set;
1775
+ nativeInputValueSetter.call(gutenberg[0], html);
1776
+ var ev2 = new Event('change', { bubbles: true});
1777
+ gutenberg[0].dispatchEvent(ev2,html);
1778
+
1779
+ } else if( field.length ) {
1780
  field.val(html);
1781
  field.trigger('fv_flowplayer_shortcode_insert', [ html ] );
1782
 
models/checker.php CHANGED
@@ -136,166 +136,117 @@ class FV_Player_Checker {
136
  if( isset($media) ) {
137
  $remotefilename = $media;
138
  $remotefilename_encoded = flowplayer::get_encoded_url($remotefilename);
139
-
140
- if( $fv_fp->is_secure_amazon_s3($remotefilename_encoded) || 1>0 ) { // skip headers check for Amazon S3, as it's slow
141
- $headers = false;
142
- } else {
143
- $headers = wp_remote_head( trim( str_replace(' ', '%20', $remotefilename_encoded ) ), array( 'method' => 'GET', 'redirection' => 3 ) );
144
- }
145
-
146
  $bValidFile = true;
147
- if( is_wp_error($headers) ) {
148
- $video_errors[] = 'Error checking '.$media.'!<br />'.print_r($headers,true);
149
- } else {
150
- if( $headers ) {
151
- list( $aVideoErrors, $sContentType, $bFatal ) = $this->check_headers( $headers, $remotefilename, $random );
152
- if( $bFatal ) {
153
- $bValidFile = false;
 
 
 
 
 
 
 
 
 
 
 
 
154
  }
155
- if( $aVideoErrors ) {
156
- $video_errors = array_merge( $video_errors, $aVideoErrors );
 
 
157
  }
158
- }
159
-
160
- if( function_exists('is_utf8') && is_utf8($remotefilename) ) {
161
- $video_errors[] = '<p><strong>UTF-8 error</strong>: Your file name is using non-latin characters, the file might not play in browsers using Flash for the video!</p>';
162
- }
163
-
164
- if ( ! class_exists( 'getID3' ) ) {
165
- require( ABSPATH . WPINC . '/ID3/getid3.php' );
166
- }
167
- $getID3 = new getID3;
168
-
169
- if( !function_exists('curl_init') ) {
170
- $video_errors[] = 'cURL for PHP not found, please contact your server administrator.';
171
- } else {
172
- $message = '<p>Analysis of <a class="bluelink" target="_blank" href="'.esc_attr($remotefilename_encoded).'">'.$remotefilename_encoded.'</a></p>';
173
-
174
- // taken from: http://www.getid3.org/phpBB3/viewtopic.php?f=3&t=1141
175
- $upload_dir = wp_upload_dir();
176
- $localtempfilename = trailingslashit( $upload_dir['basedir'] ).'fv_flowlayer_tmp_'.md5(rand(1,999)).'_'.basename( substr($remotefilename_encoded,0,32) );
177
 
178
- $out = @fopen( $localtempfilename,'wb' );
179
-
180
- if( $out ) {
181
- $aArgs = array( 'file' => $out );
182
- if( !$this->is_cron && !$force_is_cron ) {
183
- $aArgs['quick_check'] = apply_filters( 'fv_flowplayer_checker_timeout_quick', 2 );
184
- }
185
- list( $header, $sHTTPError ) = $this->http_request( $remotefilename_encoded, $aArgs );
186
 
187
- $video_errors = array();
188
- if( $sHTTPError ) {
189
- $video_errors[] = $sHTTPError;
190
- $bValidFile = false;
191
- }
192
- fclose($out);
193
 
194
- if( !$headers ) {
195
- $headers = WP_Http::processHeaders( $header );
196
-
197
- list( $aVideoErrors, $sContentType, $bFatal ) = $this->check_headers( $headers, $remotefilename, $random );
198
- if( $bFatal ) {
199
- $bValidFile = false;
200
- }
201
-
202
- if( $aVideoErrors ) {
203
- $video_errors = array_merge( $video_errors, $aVideoErrors );
204
- }
205
-
206
- if( isset($hearders['headers']['server']) && $hearders['headers']['server'] == 'AmazonS3' && $headers['response']['code'] == '403' ) {
207
- $error = new SimpleXMLElement($body);
208
-
209
- if( stripos( $error->Message, 'Request has expired' ) !== false ) {
210
- $video_errors[] = '<p><strong>Amazon S3</strong>: Your secure link is expired, there might be problem with your Amazon S3 plugin. Please test if the above URL opens in your browser.</p>';
211
- } else {
212
- $video_errors[] = '<p><strong>Amazon S3</strong>: '.$error->Message.'</p>';
213
- }
214
-
215
- }
216
- }
217
-
218
- if( $bValidFile ) {
219
- $ThisFileInfo = $getID3->analyze( $localtempfilename );
220
- }
221
- if( !@unlink($localtempfilename) ) {
222
- $video_errors[] = 'Can\'t remove temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
223
- }
224
- } else {
225
- $video_errors[] = 'Can\'t create temporary file for video analysis in <tt>'.$localtempfilename.'</tt>!';
226
- }
227
  }
228
-
229
-
230
- /*
231
- Only check file length
232
- */
233
 
234
- if( (isset($meta_action) && $meta_action == 'check_time') || $force_is_cron ) {
235
- $time = false;
236
- if( isset($ThisFileInfo) && isset($ThisFileInfo['playtime_seconds']) ) {
237
- $time = $ThisFileInfo['playtime_seconds'];
238
- }
239
-
240
 
241
-
242
- if(preg_match('/.m3u8(\?.*)?$/i', $meta_original)){
243
-
244
- remove_action( 'http_api_curl', array( 'FV_Player_Checker', 'http_api_curl' ) );
245
-
246
- $request = wp_remote_get($meta_original);
247
- $response = wp_remote_retrieve_body( $request );
248
-
249
- $playlist = false;
250
- $duration = 0;
251
- $segments = false;
252
-
253
- if(!preg_match_all('/^[^#].*\.m3u8(\?.*)?$/im', $response,$playlist)){
254
- if(preg_match_all('/^#EXTINF:([0-9]+\.?[0-9]*)/im', $response,$segments)){
 
 
 
 
 
 
 
255
  foreach($segments[1] as $segment_item){
256
  $duration += $segment_item;
257
  }
258
  }
259
- }else{
260
- foreach($playlist[0] as $item){
261
- $item_url = preg_replace('/[^\/]*\.m3u8(\?.*)?/i', $item, $meta_original);
262
- $request = wp_remote_get($item_url);
263
- $playlist_item = wp_remote_retrieve_body( $request );
264
- if(preg_match_all('/^#EXTINF:([0-9]+\.?[0-9]*)/im', $playlist_item,$segments)){
265
- foreach($segments[1] as $segment_item){
266
- $duration += $segment_item;
267
- }
268
- }
269
- if($duration > 0)
270
- break;
271
- }
272
  }
273
-
274
- $time = $duration;
275
  }
276
-
277
- $time = apply_filters( 'fv_flowplayer_checker_time', $time, $meta_original );
278
-
279
- global $post;
280
- $fv_flowplayer_meta = get_post_meta( $post->ID, flowplayer::get_video_key($meta_original), true );
281
- $fv_flowplayer_meta = ($fv_flowplayer_meta) ? $fv_flowplayer_meta : array();
282
- $fv_flowplayer_meta['duration'] = $time;
283
- $fv_flowplayer_meta['etag'] = isset($headers['headers']['etag']) ? $headers['headers']['etag'] : false; // todo: check!
284
- $fv_flowplayer_meta['date'] = time();
285
- $fv_flowplayer_meta['check_time'] = microtime(true) - $tStart;
286
-
287
- if( $time > 0 || $this->is_cron ) {
288
- update_post_meta( $post->ID, flowplayer::get_video_key($meta_original), $fv_flowplayer_meta );
289
- return $fv_flowplayer_meta;
 
 
 
 
 
 
 
 
290
  }
291
- //} else {
292
- //self::queue_add($post->ID);
293
- //return false;
294
- //}
295
-
296
- }
297
 
298
- } // end is_wp_error check
299
 
300
  } // end isset($media)
301
  }
@@ -305,6 +256,54 @@ class FV_Player_Checker {
305
 
306
 
307
  function checker_cron() {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
  if( !$aQueue = self::queue_get() ) return;
309
  $tStart = microtime(true);
310
  $this->is_cron = true;
136
  if( isset($media) ) {
137
  $remotefilename = $media;
138
  $remotefilename_encoded = flowplayer::get_encoded_url($remotefilename);
139
+
 
 
 
 
 
 
140
  $bValidFile = true;
141
+
142
+ if ( ! class_exists( 'getID3' ) ) {
143
+ require( ABSPATH . WPINC . '/ID3/getid3.php' );
144
+ }
145
+ $getID3 = new getID3;
146
+
147
+ if( function_exists('curl_init') ) {
148
+ $message = '<p>Analysis of <a class="bluelink" target="_blank" href="'.esc_attr($remotefilename_encoded).'">'.$remotefilename_encoded.'</a></p>';
149
+
150
+ // taken from: http://www.getid3.org/phpBB3/viewtopic.php?f=3&t=1141
151
+ $upload_dir = wp_upload_dir();
152
+ $localtempfilename = trailingslashit( $upload_dir['basedir'] ).'fv_flowlayer_tmp_'.md5(rand(1,999)).'_'.basename( substr($remotefilename_encoded,0,32) );
153
+
154
+ $out = @fopen( $localtempfilename,'wb' );
155
+
156
+ if( $out ) {
157
+ $aArgs = array( 'file' => $out );
158
+ if( !$this->is_cron && !$force_is_cron ) {
159
+ $aArgs['quick_check'] = apply_filters( 'fv_flowplayer_checker_timeout_quick', 2 );
160
  }
161
+ list( $header, $sHTTPError ) = $this->http_request( $remotefilename_encoded, $aArgs );
162
+
163
+ if( $sHTTPError ) {
164
+ $bValidFile = false;
165
  }
166
+ fclose($out);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
167
 
168
+ $headers = WP_Http::processHeaders( $header );
 
 
 
 
 
 
 
169
 
170
+ list( $aVideoErrors, $sContentType, $bFatal ) = $this->check_headers( $headers, $remotefilename, $random );
171
+ if( $bFatal ) {
172
+ $bValidFile = false;
173
+ }
 
 
174
 
175
+ if( $bValidFile ) {
176
+ $ThisFileInfo = $getID3->analyze( $localtempfilename );
177
+ }
178
+ }
179
+ }
180
+
181
+
182
+ /*
183
+ Only check file length
184
+ */
185
+
186
+ if( (isset($meta_action) && $meta_action == 'check_time') || $force_is_cron ) {
187
+ $time = false;
188
+ if( isset($ThisFileInfo) && isset($ThisFileInfo['playtime_seconds']) ) {
189
+ $time = $ThisFileInfo['playtime_seconds'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  }
 
 
 
 
 
191
 
192
+ if(preg_match('/.m3u8(\?.*)?$/i', $remotefilename_encoded)){
 
 
 
 
 
193
 
194
+ remove_action( 'http_api_curl', array( 'FV_Player_Checker', 'http_api_curl' ) );
195
+
196
+ $request = wp_remote_get($remotefilename_encoded);
197
+ $response = wp_remote_retrieve_body( $request );
198
+
199
+ $playlist = false;
200
+ $duration = 0;
201
+ $segments = false;
202
+
203
+ if(!preg_match_all('/^[^#].*\.m3u8(\?.*)?$/im', $response,$playlist)){
204
+ if(preg_match_all('/^#EXTINF:([0-9]+\.?[0-9]*)/im', $response,$segments)){
205
+ foreach($segments[1] as $segment_item){
206
+ $duration += $segment_item;
207
+ }
208
+ }
209
+ }else{
210
+ foreach($playlist[0] as $item){
211
+ $item_url = preg_replace('/[^\/]*\.m3u8(\?.*)?/i', $item, $remotefilename_encoded);
212
+ $request = wp_remote_get($item_url);
213
+ $playlist_item = wp_remote_retrieve_body( $request );
214
+ if(preg_match_all('/^#EXTINF:([0-9]+\.?[0-9]*)/im', $playlist_item,$segments)){
215
  foreach($segments[1] as $segment_item){
216
  $duration += $segment_item;
217
  }
218
  }
219
+ if($duration > 0)
220
+ break;
 
 
 
 
 
 
 
 
 
 
 
221
  }
 
 
222
  }
223
+
224
+ $time = $duration;
225
+ }
226
+
227
+ $time = apply_filters( 'fv_flowplayer_checker_time', $time, $remotefilename_encoded );
228
+ $key = flowplayer::get_video_key($remotefilename_encoded);
229
+
230
+ global $post;
231
+ $fv_flowplayer_meta = array();
232
+ if( !empty($post) ) {
233
+ $fv_flowplayer_meta = get_post_meta( $post->ID, $key, true );
234
+ if( !$fv_flowplayer_meta ) $fv_flowplayer_meta = array();
235
+ }
236
+
237
+ $fv_flowplayer_meta['duration'] = $time;
238
+ $fv_flowplayer_meta['etag'] = isset($headers['headers']['etag']) ? $headers['headers']['etag'] : false; // todo: check!
239
+ $fv_flowplayer_meta['date'] = time();
240
+ $fv_flowplayer_meta['check_time'] = microtime(true) - $tStart;
241
+
242
+ if( $time > 0 || $this->is_cron ) {
243
+ if( !empty($post) ) {
244
+ update_post_meta( $post->ID, $key, $fv_flowplayer_meta );
245
  }
246
+ return $fv_flowplayer_meta;
247
+ }
 
 
 
 
248
 
249
+ }
250
 
251
  } // end isset($media)
252
  }
256
 
257
 
258
  function checker_cron() {
259
+
260
+ // get all video IDs for which there is no duration meta_key
261
+ global $wpdb, $fv_fp;
262
+ $aVideos = $wpdb->get_results( "SELECT id, src FROM `{$wpdb->prefix}fv_player_videos` as v left join ( select id_video from {$wpdb->prefix}fv_player_videometa WHERE meta_key = 'duration' ) as m ON v.id = m.id_video where m.id_video IS NULL ORDER BY id DESC" );
263
+
264
+ if( $aVideos ) {
265
+ foreach( $aVideos AS $objVideo ) {
266
+ $id = $objVideo->id;
267
+ $url = $objVideo->src;
268
+
269
+ global $FV_Player_Db;
270
+ $objVideo = new FV_Player_Db_Video( $id, array(), $FV_Player_Db );
271
+ $last_check = $objVideo->getMetaValue('last_video_meta_check',true);
272
+
273
+ if( $last_check && intval($last_check) + 3600 > time() ) {
274
+ continue;
275
+ }
276
+
277
+ $meta_data = apply_filters('fv_player_meta_data', $url, false);
278
+ if( $meta_data == false) {
279
+ if( $secured_url = $fv_fp->get_video_src( $url, array( 'dynamic' => true ) ) ) {
280
+ $url = $secured_url;
281
+ }
282
+
283
+ $meta_data['duration'] = $this->check_mimetype(array($url), false, true);
284
+ $meta_data['duration'] = $meta_data['duration']['duration'];
285
+
286
+ }
287
+
288
+ if( !empty($meta_data['thumbnail']) ) {
289
+ if( !$objVideo->getSplash() || $objVideo->getMetaValue('auto_splash',true) ) {
290
+ $video_object = new FV_Player_Db_Video( $objVideo->getId(), array(), $FV_Player_Db );
291
+ $video_object->link2db( $objVideo->getId() );
292
+ $video_object->set( 'splash', $meta_data['thumbnail'] );
293
+ $video_object->save();
294
+ }
295
+ }
296
+
297
+ $objVideo->updateMetaValue('last_video_meta_check', time());
298
+
299
+ if( $meta_data['duration'] ) {
300
+ $objVideo->updateMetaValue( 'duration', $meta_data['duration'] );
301
+ }
302
+
303
+ }
304
+ }
305
+
306
+ // legacy
307
  if( !$aQueue = self::queue_get() ) return;
308
  $tStart = microtime(true);
309
  $this->is_cron = true;
models/db-player-meta.php CHANGED
@@ -267,7 +267,7 @@ CREATE TABLE " . self::$db_table_name . " (
267
 
268
  if (!$is_cached) {
269
  // load a single player meta data record
270
- $meta_data = $wpdb->get_results( 'SELECT * FROM ' . self::$db_table_name . ' WHERE id = ' . $id );
271
 
272
  // run through all of the meta data and
273
  // fill the ones that were not found with blank arrays
267
 
268
  if (!$is_cached) {
269
  // load a single player meta data record
270
+ $meta_data = $wpdb->get_results( 'SELECT * FROM ' . self::$db_table_name . ' WHERE id = ' . intval($id) );
271
 
272
  // run through all of the meta data and
273
  // fill the ones that were not found with blank arrays
models/db-player.php CHANGED
@@ -539,30 +539,39 @@ CREATE TABLE " . self::$db_table_name . " (
539
  }
540
 
541
  if ($id === null || count($query_ids)) {
 
 
 
 
 
 
 
 
 
542
  // if we have multiple video IDs to load players for, let's prepare a like statement here
543
- $where_like_part = '';
544
-
545
- if ($options && !empty($options['db_options']) && !empty($options['db_options']['search_by_video_ids'])){
546
  $where_like_part = array();
547
-
548
  foreach ($options['db_options']['search_by_video_ids'] as $player_video_id) {
 
549
  $where_like_part[] = "(videos = \"$player_video_id\" OR videos LIKE \"%,$player_video_id\" OR videos LIKE \"$player_video_id,%\")";
550
  }
551
 
552
- $where_like_part = implode(' OR ', $where_like_part);
553
  }
554
-
555
- // load multiple players via their IDs but a single query and return their values
556
- $player_data = $wpdb->get_results('
557
- SELECT
558
- '.($options && !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ? 'id,'.$options['db_options']['select_fields'] : '*').'
559
- FROM
560
- '.self::$db_table_name.($id !== null ? '
561
- WHERE
562
- id IN('. implode(',', $query_ids).')' : ($options && !empty($options['db_options']) && !empty($options['db_options']['search_by_video_ids']) ? ' WHERE '.$where_like_part : '')).
563
- ($options && !empty($options['db_options']) && !empty($options['db_options']['order_by']) ? ' ORDER BY '.$options['db_options']['order_by'].(!empty($options['db_options']['order']) ? ' '.$options['db_options']['order'] : '') : '').
564
- ($options && !empty($options['db_options']) && isset($options['db_options']['offset']) && isset($options['db_options']['per_page']) ? ' LIMIT '.$options['db_options']['offset'].', '.$options['db_options']['per_page'] : '')
565
- );
 
 
566
  } else if ($id !== null && !count($query_ids)) {
567
  $all_cached = true;
568
  } else {
@@ -574,13 +583,12 @@ CREATE TABLE " . self::$db_table_name . " (
574
  // load a single video
575
  $player_data = $wpdb->get_row('
576
  SELECT
577
- '.($options && !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ? 'id,'.$options['db_options']['select_fields'] : '*').'
578
  FROM
579
  '.self::$db_table_name.'
580
  WHERE
581
- id = '.$id.
582
- ($options && !empty($options['db_options']) && !empty($options['db_options']['order_by']) ? ' ORDER BY '.$options['db_options']['order_by'].(!empty($options['db_options']['order']) ? ' '.$options['db_options']['order'] : '') : '').
583
- ($options && !empty($options['db_options']) && !empty($options['db_options']['offset']) && !empty($options['db_options']['per_page']) ? ' LIMIT '.$options['db_options']['offset'].', '.$options['db_options']['per_page'] : '')
584
  );
585
  } else if ($DB_Cache && $DB_Cache->isPlayerCached($id)) {
586
  $all_cached = true;
@@ -590,7 +598,7 @@ CREATE TABLE " . self::$db_table_name . " (
590
  }
591
  }
592
 
593
- if (isset($player_data) && $player_data !== -1 && count($player_data)) {
594
  // single ID, just populate our own data
595
  if (!$multiID) {
596
  $this->fill_properties($player_data,$DB_Cache);
539
  }
540
 
541
  if ($id === null || count($query_ids)) {
542
+
543
+ // load multiple players via their IDs but a single query and return their values
544
+ $select = '*';
545
+ if( !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ) $select = 'id,'.esc_sql($options['db_options']['select_fields']);
546
+
547
+ $where = '';
548
+ if( $id !== null ) {
549
+ $where = ' WHERE id IN('. implode(',', $query_ids).') ';
550
+
551
  // if we have multiple video IDs to load players for, let's prepare a like statement here
552
+ } else if( !empty($options['db_options']) && !empty($options['db_options']['search_by_video_ids'])){
 
 
553
  $where_like_part = array();
 
554
  foreach ($options['db_options']['search_by_video_ids'] as $player_video_id) {
555
+ $player_video_id = intval($player_video_id);
556
  $where_like_part[] = "(videos = \"$player_video_id\" OR videos LIKE \"%,$player_video_id\" OR videos LIKE \"$player_video_id,%\")";
557
  }
558
 
559
+ $where = ' WHERE '.implode(' OR ', $where_like_part);
560
  }
561
+
562
+ $order = '';
563
+ if( !empty($options['db_options']) && !empty($options['db_options']['order_by']) ) {
564
+ $order = ' ORDER BY '.esc_sql($options['db_options']['order_by']);
565
+ if( !empty($options['db_options']['order']) ) $order .= ' '.esc_sql($options['db_options']['order']);
566
+ }
567
+
568
+ $limit = '';
569
+ if( !empty($options['db_options']) && isset($options['db_options']['offset']) && isset($options['db_options']['per_page']) ) {
570
+ $limit = ' LIMIT '.intval($options['db_options']['offset']).', '.intval($options['db_options']['per_page']);
571
+ }
572
+
573
+ $player_data = $wpdb->get_results('SELECT '.$select.' FROM '.self::$db_table_name.$where.$order.$limit );
574
+
575
  } else if ($id !== null && !count($query_ids)) {
576
  $all_cached = true;
577
  } else {
583
  // load a single video
584
  $player_data = $wpdb->get_row('
585
  SELECT
586
+ '.($options && !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ? 'id,'.esc_sql( $options['db_options']['select_fields'] ) : '*').'
587
  FROM
588
  '.self::$db_table_name.'
589
  WHERE
590
+ id = '.intval($id),
591
+ ARRAY_A
 
592
  );
593
  } else if ($DB_Cache && $DB_Cache->isPlayerCached($id)) {
594
  $all_cached = true;
598
  }
599
  }
600
 
601
+ if (isset($player_data) && $player_data !== -1 && is_array($player_data) && count($player_data)) {
602
  // single ID, just populate our own data
603
  if (!$multiID) {
604
  $this->fill_properties($player_data,$DB_Cache);
models/db-video-meta.php CHANGED
@@ -259,7 +259,7 @@ CREATE TABLE " . self::$db_table_name . " (
259
 
260
  if (!$is_cached) {
261
  // load a single video meta data record
262
- $meta_data = $wpdb->get_row( $wpdb->query( 'SELECT * FROM ' . self::$db_table_name . ' WHERE id = ' . $id ) );
263
 
264
  // run through all of the meta data and
265
  // fill the ones that were not found with blank arrays
259
 
260
  if (!$is_cached) {
261
  // load a single video meta data record
262
+ $meta_data = $wpdb->get_row( $wpdb->query( 'SELECT * FROM ' . self::$db_table_name . ' WHERE id = ' . intval($id) ) );
263
 
264
  // run through all of the meta data and
265
  // fill the ones that were not found with blank arrays
models/db-video.php CHANGED
@@ -278,16 +278,23 @@ CREATE TABLE " . self::$db_table_name . " (
278
 
279
  // load multiple videos via their IDs but a single query and return their values
280
  if (count($query_ids)) {
281
- $video_data = $wpdb->get_results( '
282
- SELECT
283
- ' . ( $options && ! empty( $options['db_options'] ) && ! empty( $options['db_options']['select_fields'] ) ? 'id,' . $options['db_options']['select_fields'] : '*' ) . '
284
- FROM
285
- ' . self::$db_table_name . '
286
- WHERE
287
- id IN(' . implode( ',', $query_ids ) . ')' .
288
- ( $options && ! empty( $options['db_options'] ) && ! empty( $options['db_options']['order_by'] ) ? ' ORDER BY ' . $options['db_options']['order_by'] . ( ! empty( $options['db_options']['order'] ) ? ' ' . $options['db_options']['order'] : '' ) : '' ) .
289
- ( $options && ! empty( $options['db_options'] ) && isset( $options['db_options']['offset'] ) && isset( $options['db_options']['per_page'] ) ? ' LIMIT ' . $options['db_options']['offset'] . ', ' . $options['db_options']['per_page'] : '' )
290
- );
 
 
 
 
 
 
 
291
 
292
  if( !$video_data && count($id) != count($query_ids) ) { // if no video data has returned, but we have the rest of videos cached already
293
  $all_cached = true;
@@ -300,13 +307,11 @@ CREATE TABLE " . self::$db_table_name . " (
300
  // load a single video
301
  $video_data = $wpdb->get_row( '
302
  SELECT
303
- ' . ( $options && ! empty( $options['db_options'] ) && ! empty( $options['db_options']['select_fields'] ) ? 'id,' . $options['db_options']['select_fields'] : '*' ) . '
304
  FROM
305
  ' . self::$db_table_name . '
306
  WHERE
307
- id = ' . $id .
308
- ( $options && ! empty( $options['db_options'] ) && ! empty( $options['db_options']['order_by'] ) ? ' ORDER BY ' . $options['db_options']['order_by'] . ( ! empty( $options['db_options']['order'] ) ? ' ' . $options['db_options']['order'] : '' ) : '' ) .
309
- ( $options && ! empty( $options['db_options'] ) && isset( $options['db_options']['offset'] ) && isset( $options['db_options']['per_page'] ) ? ' LIMIT ' . $options['db_options']['offset'] . ', ' . $options['db_options']['per_page'] : '' )
310
  );
311
  } else {
312
  $all_cached = true;
@@ -491,7 +496,7 @@ CREATE TABLE " . self::$db_table_name . " (
491
  foreach ($fields_to_search as $field_name) {
492
  $where[] = "`$field_name` ". ($like ? 'LIKE "%'.esc_sql($search_string).'%"' : '="'.esc_sql($search_string).'"');
493
  }
494
- $where = implode(' '.$and_or.' ', $where);
495
 
496
  self::init_db_name();
497
  $data = $wpdb->get_results("SELECT ". ($fields ? esc_sql($fields) : '*') ." FROM `" . self::$db_table_name . "` WHERE $where ORDER BY id DESC");
@@ -552,7 +557,20 @@ CREATE TABLE " . self::$db_table_name . " (
552
  return array();
553
  } else {
554
  if ($this->meta_data && $this->meta_data->getIsValid()) {
555
- return array( $this->meta_data );
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  } else {
557
  return array();
558
  }
@@ -578,7 +596,54 @@ CREATE TABLE " . self::$db_table_name . " (
578
  }
579
  if( $single ) return false;
580
  return $output;
581
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
 
583
  /**
584
  * Stores new video instance or updates and existing one
278
 
279
  // load multiple videos via their IDs but a single query and return their values
280
  if (count($query_ids)) {
281
+ $select = '*';
282
+ if( !empty($options['db_options']) && !empty($options['db_options']['select_fields']) ) $select = 'id,'.esc_sql($options['db_options']['select_fields']);
283
+
284
+ $where = ' WHERE id IN('. implode(',', $query_ids).') ';
285
+
286
+ $order = '';
287
+ if( !empty($options['db_options']) && !empty($options['db_options']['order_by']) ) {
288
+ $order = ' ORDER BY '.esc_sql($options['db_options']['order_by']);
289
+ if( !empty($options['db_options']['order']) ) $order .= ' '.esc_sql($options['db_options']['order']);
290
+ }
291
+
292
+ $limit = '';
293
+ if( !empty($options['db_options']) && isset($options['db_options']['offset']) && isset($options['db_options']['per_page']) ) {
294
+ $limit = ' LIMIT '.intval($options['db_options']['offset']).', '.intval($options['db_options']['per_page']);
295
+ }
296
+
297
+ $video_data = $wpdb->get_results('SELECT '.$select.' FROM '.self::$db_table_name.$order.$limit);
298
 
299
  if( !$video_data && count($id) != count($query_ids) ) { // if no video data has returned, but we have the rest of videos cached already
300
  $all_cached = true;
307
  // load a single video
308
  $video_data = $wpdb->get_row( '
309
  SELECT
310
+ ' . ( $options && ! empty( $options['db_options'] ) && ! empty( $options['db_options']['select_fields'] ) ? 'id,' . esc_sql($options['db_options']['select_fields']) : '*' ) . '
311
  FROM
312
  ' . self::$db_table_name . '
313
  WHERE
314
+ id = ' . intval($id)
 
 
315
  );
316
  } else {
317
  $all_cached = true;
496
  foreach ($fields_to_search as $field_name) {
497
  $where[] = "`$field_name` ". ($like ? 'LIKE "%'.esc_sql($search_string).'%"' : '="'.esc_sql($search_string).'"');
498
  }
499
+ $where = implode(' '.esc_sql($and_or).' ', $where);
500
 
501
  self::init_db_name();
502
  $data = $wpdb->get_results("SELECT ". ($fields ? esc_sql($fields) : '*') ." FROM `" . self::$db_table_name . "` WHERE $where ORDER BY id DESC");
557
  return array();
558
  } else {
559
  if ($this->meta_data && $this->meta_data->getIsValid()) {
560
+ // meta data will be an array if we filled all of them at once
561
+ // from database at the time when player is initially created
562
+ if (is_array($this->meta_data)) {
563
+ return $this->meta_data;
564
+ } else if ( $this->DB_Instance->isVideoMetaCached($this->id) ) {
565
+ $cache = $this->DB_Instance->getVideoMetaCache();
566
+ return $cache[$this->id];
567
+ } else {
568
+ if ($this->meta_data && $this->meta_data->getIsValid()) {
569
+ return array( $this->meta_data );
570
+ } else {
571
+ return array();
572
+ }
573
+ }
574
  } else {
575
  return array();
576
  }
596
  }
597
  if( $single ) return false;
598
  return $output;
599
+ }
600
+
601
+ /**
602
+ * Updates or instert a video meta row
603
+ *
604
+ * @param string $key The meta key
605
+ * @param string $value The meta value
606
+ * @param int $id ID of the existing video meta row
607
+ *
608
+ * @throws Exception When the underlying Meta object throws.
609
+ *
610
+ * @return bool|int Returns record ID if successful, false otherwise.
611
+ *
612
+ */
613
+ public function updateMetaValue( $key, $value, $id = false ) {
614
+ $to_update = false;
615
+ $data = $this->getMetaData();
616
+
617
+ if (count($data)) {
618
+ foreach ($data as $meta_object) {
619
+ // find the matching video meta row and if id is provided as well, match on that too
620
+ if( ( !$id || $id == $meta_object->getId() ) && $meta_object->getMetaKey() == $key) {
621
+ if( $meta_object->getMetaValue() != $value ) {
622
+ $to_update = $meta_object->getId();
623
+ }
624
+ }
625
+ }
626
+ }
627
+
628
+ // if matching row has been found or if it was not found and no row id is provided (insert)
629
+ if( $to_update || !$to_update && !$id ) {
630
+ $meta = new FV_Player_Db_Video_Meta( null, array( 'id_video' => $this->getId(), 'meta_key' => $key, 'meta_value' => $value ), $this->DB_Instance );
631
+ if( $to_update ) $meta->link2db($to_update);
632
+ return $meta->save();
633
+ }
634
+
635
+ return false;
636
+ }
637
+
638
+ /**
639
+ * Lets you alter any of the video properties and then call save()
640
+ *
641
+ * @param string $key The meta key
642
+ * @param string $value The meta value
643
+ */
644
+ public function set( $key, $value ) {
645
+ $this->$key = stripslashes($value);
646
+ }
647
 
648
  /**
649
  * Stores new video instance or updates and existing one
models/db.php CHANGED
@@ -473,7 +473,8 @@ class FV_Player_Db {
473
  private function mapDbAttributeValue2Shortcode($att_name, $att_value) {
474
  switch ($att_name) {
475
  case 'playlist_advance':
476
- return ($att_value == 'off' ? 'false' : 'true');
 
477
  }
478
 
479
  return $att_value;
473
  private function mapDbAttributeValue2Shortcode($att_name, $att_value) {
474
  switch ($att_name) {
475
  case 'playlist_advance':
476
+ if($att_value == 'on' ) return 'true';
477
+ if($att_value == 'off' ) return 'false';
478
  }
479
 
480
  return $att_value;
models/flowplayer-frontend.php CHANGED
@@ -197,7 +197,7 @@ class flowplayer_frontend extends flowplayer
197
 
198
  list( $playlist_items_external_html, $aPlaylistItems, $aSplashScreens, $aCaptions ) = $this->build_playlist( $this->aCurArgs, $media, $src1, $src2, $rtmp, $splash_img );
199
 
200
- if( count($aPlaylistItems) == 1 ) {
201
  $playlist_items_external_html = false;
202
  $attributes['data-item'] = $this->json_encode( apply_filters( 'fv_player_item', $aPlaylistItems[0], 0, $this->aCurArgs ) );
203
  }
@@ -518,7 +518,7 @@ class flowplayer_frontend extends flowplayer
518
  $playlist_items_external_html = str_replace( 'class="fp-playlist-external', 'style="display: none" class="fp-playlist-external', $playlist_items_external_html );
519
  }
520
 
521
- if( count($aPlaylistItems) == 1 && !empty($this->aCurArgs['caption']) ) {
522
  $attributes['class'] .= ' has-caption';
523
  $this->sHTMLAfter .= apply_filters( 'fv_player_caption', "<p class='fp-caption'>".$this->aCurArgs['caption']."</p>", $this );
524
  }
@@ -1112,7 +1112,6 @@ class flowplayer_frontend extends flowplayer
1112
  $sHTMLSharing = '<ul class="fvp-sharing">
1113
  <li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=' . $sPermalink . '" target="_blank"></a></li>
1114
  <li><a class="sharing-twitter" href="https://twitter.com/home?status=' . $sTitle . $sPermalink . '" target="_blank"></a></li>
1115
- <li><a class="sharing-google" href="https://plus.google.com/share?url=' . $sPermalink . '" target="_blank"></a></li>
1116
  <li><a class="sharing-email" href="mailto:?body=' . $sMail . '" target="_blank"></a></li></ul>';
1117
 
1118
  if( isset($post) && isset($post->ID) ) {
@@ -1154,8 +1153,8 @@ class flowplayer_frontend extends flowplayer
1154
  $sSpinURL = site_url('wp-includes/images/wpspin.gif');
1155
 
1156
  $sHTML = <<< HTML
1157
- <div title="This note is visible to logged-in admins only." class="fv-wp-flowplayer-notice-small fv-wp-flowplayer-ok" id="wpfp_notice_{$this->hash}" style="display: none">
1158
- <div class="fv_wp_flowplayer_notice_head" onclick="fv_wp_flowplayer_admin_show_notice('{$this->hash}', this.parent); return false">Report Issue</div>
1159
  <small>Admin: <span class="video-checker-result">Checking the video file...</span></small>
1160
  <div style="display: none;" class="fv_wp_fp_notice_content" id="fv_wp_fp_notice_{$this->hash}">
1161
  <div class="mail-content-notice">
197
 
198
  list( $playlist_items_external_html, $aPlaylistItems, $aSplashScreens, $aCaptions ) = $this->build_playlist( $this->aCurArgs, $media, $src1, $src2, $rtmp, $splash_img );
199
 
200
+ if( count($aPlaylistItems) == 1 && empty($this->aCurArgs['listshow']) ) {
201
  $playlist_items_external_html = false;
202
  $attributes['data-item'] = $this->json_encode( apply_filters( 'fv_player_item', $aPlaylistItems[0], 0, $this->aCurArgs ) );
203
  }
518
  $playlist_items_external_html = str_replace( 'class="fp-playlist-external', 'style="display: none" class="fp-playlist-external', $playlist_items_external_html );
519
  }
520
 
521
+ if( count($aPlaylistItems) == 1 && !empty($this->aCurArgs['caption']) && empty($this->aCurArgs['listshow']) ) {
522
  $attributes['class'] .= ' has-caption';
523
  $this->sHTMLAfter .= apply_filters( 'fv_player_caption', "<p class='fp-caption'>".$this->aCurArgs['caption']."</p>", $this );
524
  }
1112
  $sHTMLSharing = '<ul class="fvp-sharing">
1113
  <li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=' . $sPermalink . '" target="_blank"></a></li>
1114
  <li><a class="sharing-twitter" href="https://twitter.com/home?status=' . $sTitle . $sPermalink . '" target="_blank"></a></li>
 
1115
  <li><a class="sharing-email" href="mailto:?body=' . $sMail . '" target="_blank"></a></li></ul>';
1116
 
1117
  if( isset($post) && isset($post->ID) ) {
1153
  $sSpinURL = site_url('wp-includes/images/wpspin.gif');
1154
 
1155
  $sHTML = <<< HTML
1156
+ <div title="Only you and other admins can see this warning." class="fv-wp-flowplayer-notice-small fv-wp-flowplayer-ok" id="wpfp_notice_{$this->hash}" style="display: none">
1157
+ <div class="fv_wp_flowplayer_notice_head" onclick="fv_wp_flowplayer_admin_show_notice('{$this->hash}', this.parent); return false">Video Checker</div>
1158
  <small>Admin: <span class="video-checker-result">Checking the video file...</span></small>
1159
  <div style="display: none;" class="fv_wp_fp_notice_content" id="fv_wp_fp_notice_{$this->hash}">
1160
  <div class="mail-content-notice">
models/flowplayer.php CHANGED
@@ -774,6 +774,13 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
774
  $sDuration = $this->current_video()->getDuration();
775
  }
776
 
 
 
 
 
 
 
 
777
  global $post;
778
  if( !$sDuration && $post && isset($post->ID) && isset($aPlayer['sources']) && isset($aPlayer['sources'][0]) && isset($aPlayer['sources'][0]['src']) ) {
779
  $sDuration = flowplayer::get_duration( $post->ID, $aPlayer['sources'][0]['src'] );
@@ -2002,7 +2009,7 @@ class flowplayer extends FV_Wordpress_Flowplayer_Plugin_Private {
2002
  <?php
2003
  // regular shortcode data with source
2004
  global $fv_fp;
2005
- if (!$dataInPost && preg_match('/src="[^"][^"]*"/i',$shortcode)) {
2006
  $aAtts = shortcode_parse_atts($shortcode);
2007
  if ( $aAtts && !empty($aAtts['liststyle'] ) && $aAtts['liststyle'] == 'vertical' || $fv_fp->_get_option('liststyle') == 'vertical' ) {
2008
  _e('The preview is too narrow, vertical playlist will shift below the player as it would on mobile.','fv-wordpress-flowplayer');
774
  $sDuration = $this->current_video()->getDuration();
775
  }
776
 
777
+ if( !empty($aArgs['durations']) ) {
778
+ $durations = explode( ';', $aArgs['durations'] );
779
+ if( !empty($durations[$index]) ) {
780
+ $sDuration = $durations[$index];
781
+ }
782
+ }
783
+
784
  global $post;
785
  if( !$sDuration && $post && isset($post->ID) && isset($aPlayer['sources']) && isset($aPlayer['sources'][0]) && isset($aPlayer['sources'][0]['src']) ) {
786
  $sDuration = flowplayer::get_duration( $post->ID, $aPlayer['sources'][0]['src'] );
2009
  <?php
2010
  // regular shortcode data with source
2011
  global $fv_fp;
2012
+ if (!$dataInPost && preg_match('/id="\d+"|src="[^"][^"]*"/i',$shortcode)) {
2013
  $aAtts = shortcode_parse_atts($shortcode);
2014
  if ( $aAtts && !empty($aAtts['liststyle'] ) && $aAtts['liststyle'] == 'vertical' || $fv_fp->_get_option('liststyle') == 'vertical' ) {
2015
  _e('The preview is too narrow, vertical playlist will shift below the player as it would on mobile.','fv-wordpress-flowplayer');
models/gutenberg.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ function fv_player_gutenberg() {
4
+ global $fv_wp_flowplayer_ver;
5
+ wp_register_script( 'fv-player-gutenberg', flowplayer::get_plugin_url().'/js/gutenberg.js', array( 'wp-blocks', 'wp-element', 'wp-components' ), $fv_wp_flowplayer_ver );
6
+
7
+ if( function_exists('register_block_type') ) {
8
+ register_block_type( 'fv-player-gutenberg/basic', array(
9
+ 'editor_script' => 'fv-player-gutenberg',
10
+ ) );
11
+ }
12
+ }
13
+ add_action( 'init', 'fv_player_gutenberg' );
models/lightbox.php CHANGED
@@ -28,10 +28,14 @@ class FV_Player_lightbox {
28
 
29
  add_action('fv_flowplayer_admin_default_options_after', array( $this, 'lightbox_admin_default_options_html' ) );
30
  add_filter('fv_flowplayer_admin_interface_options_after', array( $this, 'lightbox_admin_interface_html' ) );
 
31
 
32
  add_action( 'wp_footer', array( $this, 'disp__lightboxed_players' ), 0 );
33
 
34
  add_filter('fv_player_conf_defaults', array( $this, 'conf_defaults' ) );
 
 
 
35
 
36
  //TODO is this hack needed?
37
  $conf = get_option('fvwpflowplayer');
@@ -96,6 +100,20 @@ class FV_Player_lightbox {
96
 
97
  return $sType;
98
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
  function shortcode($attrs) {
101
  $aArgs = func_get_args();
@@ -384,7 +402,7 @@ class FV_Player_lightbox {
384
  <input type="checkbox" id="fv_wp_flowplayer_field_lightbox" name="fv_wp_flowplayer_field_lightbox" />
385
  <input type="text" id="fv_wp_flowplayer_field_lightbox_width" name="fv_wp_flowplayer_field_lightbox_width" style="width: 12%" placeholder="Width" />
386
  <input type="text" id="fv_wp_flowplayer_field_lightbox_height" name="fv_wp_flowplayer_field_lightbox_height" style="width: 12%" placeholder="Height" />
387
- <input type="text" id="fv_wp_flowplayer_field_lightbox_caption" name="fv_wp_flowplayer_field_lightbox_caption" style="width: 62%" placeholder="Caption" />
388
  </td>
389
  </tr>
390
  <script>
@@ -440,6 +458,11 @@ class FV_Player_lightbox {
440
  <?php
441
  }
442
  }
 
 
 
 
 
443
 
444
  function lightbox_admin_interface_html() {
445
  global $fv_fp;
28
 
29
  add_action('fv_flowplayer_admin_default_options_after', array( $this, 'lightbox_admin_default_options_html' ) );
30
  add_filter('fv_flowplayer_admin_interface_options_after', array( $this, 'lightbox_admin_interface_html' ) );
31
+ add_filter('fv_flowplayer_admin_integration_options_after', array( $this, 'lightbox_admin_integrations_html' ) );
32
 
33
  add_action( 'wp_footer', array( $this, 'disp__lightboxed_players' ), 0 );
34
 
35
  add_filter('fv_player_conf_defaults', array( $this, 'conf_defaults' ) );
36
+
37
+ add_action('wp_head', array( $this, 'remove_other_fancybox' ), 8 );
38
+ add_action('wp_footer', array( $this, 'remove_other_fancybox' ), 19 );
39
 
40
  //TODO is this hack needed?
41
  $conf = get_option('fvwpflowplayer');
100
 
101
  return $sType;
102
  }
103
+
104
+ function remove_other_fancybox() {
105
+ global $fv_fp;
106
+ if( $fv_fp->_get_option('lightbox_force') ) {
107
+ global $wp_scripts;
108
+ if( isset($wp_scripts) && isset($wp_scripts->queue) && is_array($wp_scripts->queue) ) {
109
+ foreach( $wp_scripts->queue as $handle ) {
110
+ if( stripos($handle,'fancybox') !== false ) {
111
+ wp_dequeue_script($handle);
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
117
 
118
  function shortcode($attrs) {
119
  $aArgs = func_get_args();
402
  <input type="checkbox" id="fv_wp_flowplayer_field_lightbox" name="fv_wp_flowplayer_field_lightbox" />
403
  <input type="text" id="fv_wp_flowplayer_field_lightbox_width" name="fv_wp_flowplayer_field_lightbox_width" style="width: 12%" placeholder="Width" />
404
  <input type="text" id="fv_wp_flowplayer_field_lightbox_height" name="fv_wp_flowplayer_field_lightbox_height" style="width: 12%" placeholder="Height" />
405
+ <input type="text" id="fv_wp_flowplayer_field_lightbox_caption" name="fv_wp_flowplayer_field_lightbox_caption" style="width: 62%" placeholder="Title" />
406
  </td>
407
  </tr>
408
  <script>
458
  <?php
459
  }
460
  }
461
+
462
+ function lightbox_admin_integrations_html() {
463
+ global $fv_fp;
464
+ $fv_fp->_get_checkbox(__('Remove fancyBox', 'fv-wordpress-flowplayer'), 'lightbox_force', __('Use if FV Player lightbox is not working and you see a "fancyBox already initialized" message on JavaScript console.', 'fv-wordpress-flowplayer'));
465
+ }
466
 
467
  function lightbox_admin_interface_html() {
468
  global $fv_fp;
models/list-table.php CHANGED
@@ -14,8 +14,8 @@ class FV_Player_List_Table_View {
14
 
15
  function admin_menu(){
16
  global $wpdb;
17
- if( current_user_can('edit_posts') && $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}fv_player_players'") == $wpdb->prefix.'fv_player_players' && $wpdb->get_var("SELECT count(*) FROM {$wpdb->prefix}fv_player_players") ) {
18
- add_menu_page( 'FV Player', 'FV Player', 'edit_posts', 'fv_player', '', 'dashicons-welcome-widgets-menus', 30 );
19
  add_submenu_page( 'fv_player', 'FV Player', 'FV Player', 'edit_posts', 'fv_player', array($this, 'tools_panel') );
20
  }
21
  }
@@ -30,6 +30,9 @@ class FV_Player_List_Table_View {
30
  global $fv_wp_flowplayer_ver;
31
  wp_enqueue_style('fv-player-list-view', flowplayer::get_plugin_url().'/css/list-view.css',array(), $fv_wp_flowplayer_ver );
32
  }
 
 
 
33
  }
34
 
35
  function tools_panel() {
14
 
15
  function admin_menu(){
16
  global $wpdb;
17
+ if( current_user_can('edit_posts') ) {
18
+ add_menu_page( 'FV Player', 'FV Player', 'edit_posts', 'fv_player', '', flowplayer::get_plugin_url().'/images/icon@x2.png', 30 );
19
  add_submenu_page( 'fv_player', 'FV Player', 'FV Player', 'edit_posts', 'fv_player', array($this, 'tools_panel') );
20
  }
21
  }
30
  global $fv_wp_flowplayer_ver;
31
  wp_enqueue_style('fv-player-list-view', flowplayer::get_plugin_url().'/css/list-view.css',array(), $fv_wp_flowplayer_ver );
32
  }
33
+ ?>
34
+ <style>#adminmenu #toplevel_page_fv_player .wp-menu-image img {width:28px;height:25px;padding-top:4px}</style>
35
+ <?php
36
  }
37
 
38
  function tools_panel() {
models/xml-video-sitemap.php CHANGED
@@ -112,6 +112,11 @@ class FV_Xml_Video_Sitemap {
112
  $increment_video_counter = false;
113
  $aArgs = shortcode_parse_atts( rtrim( $shortcode, ']' ) );
114
 
 
 
 
 
 
115
  if( !empty($did_videos[$aArgs['src']]) ) continue;
116
  $did_videos[$aArgs['src']] = true;
117
 
@@ -125,14 +130,16 @@ class FV_Xml_Video_Sitemap {
125
 
126
  // this crazyness needs to be first converted into non-html characters (so &quot; becomes "), then
127
  // stripped of them all and returned back HTML-encoded for the XML formatting to be correct
128
- $splash = !empty($aArgs['poster']) ? $aArgs['poster'] : $aArgs['splash'];
 
 
129
  $splash = htmlspecialchars(trim(html_entity_decode($splash), "\n\t\r\0\x0B".'"'));
130
 
131
  // make sure the URLs are absolute
132
  if( $splash ) {
133
  if( stripos($splash,'http://') !== 0 && stripos($splash,'https://') !== 0 && stripos($splash,'//') !== 0 ) {
134
  $splash = home_url($splash);
135
- } else if( stripos($trimmed_splash,'//') === 0 ) {
136
  $splash = 'http:'.$splash;
137
  }
138
  } else {
@@ -142,7 +149,7 @@ class FV_Xml_Video_Sitemap {
142
  // check for caption - if none present, build it up from page title and video position
143
  // note: html characters must be substituted or enclosed in CDATA, from which the first
144
  // is easier to do correctly on a single line
145
- $sanitized_caption = htmlspecialchars(strip_tags($aArgs['caption']), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
146
  $sanitized_src = htmlspecialchars(strip_tags(trim($aArgs['src'])), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
147
 
148
  // make sure the URLs are absolute
112
  $increment_video_counter = false;
113
  $aArgs = shortcode_parse_atts( rtrim( $shortcode, ']' ) );
114
 
115
+ global $FV_Player_Db;
116
+ if( !empty($aArgs['id']) && !empty($FV_Player_Db) ) {
117
+ $aArgs = $FV_Player_Db->getPlayerAttsFromDb( $aArgs );
118
+ }
119
+
120
  if( !empty($did_videos[$aArgs['src']]) ) continue;
121
  $did_videos[$aArgs['src']] = true;
122
 
130
 
131
  // this crazyness needs to be first converted into non-html characters (so &quot; becomes "), then
132
  // stripped of them all and returned back HTML-encoded for the XML formatting to be correct
133
+ $splash = false;
134
+ if( !empty($aArgs['poster']) ) $splash = $aArgs['poster'];
135
+ if( !empty($aArgs['splash']) ) $splash = $aArgs['splash'];
136
  $splash = htmlspecialchars(trim(html_entity_decode($splash), "\n\t\r\0\x0B".'"'));
137
 
138
  // make sure the URLs are absolute
139
  if( $splash ) {
140
  if( stripos($splash,'http://') !== 0 && stripos($splash,'https://') !== 0 && stripos($splash,'//') !== 0 ) {
141
  $splash = home_url($splash);
142
+ } else if( stripos($splash,'//') === 0 ) {
143
  $splash = 'http:'.$splash;
144
  }
145
  } else {
149
  // check for caption - if none present, build it up from page title and video position
150
  // note: html characters must be substituted or enclosed in CDATA, from which the first
151
  // is easier to do correctly on a single line
152
+ $sanitized_caption = !empty($aArgs['caption']) ? htmlspecialchars(strip_tags($aArgs['caption']), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE ) : false;
153
  $sanitized_src = htmlspecialchars(strip_tags(trim($aArgs['src'])), ENT_COMPAT | ENT_HTML401 | ENT_SUBSTITUTE );
154
 
155
  // make sure the URLs are absolute
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: FolioVision
3
  Donate link: https://foliovision.com/donate
4
  Tags: video player, flowplayer, mobile video, html5 video, Vimeo, html5 player, youtube player, youtube playlist, video playlist, RTMP, Cloudfront, HLS
5
  Requires at least: 3.5
6
- Tested up to: 4.9.8
7
  Stable tag: trunk
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -357,6 +357,23 @@ Thank you for being part of the HMTL 5 mobile video revolution!
357
 
358
  == Changelog ==
359
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
360
  = 7.3.3.727 - 2017/12/05 =
361
 
362
  * Compatiblity - improving old Samsung phone detection for warning messages
3
  Donate link: https://foliovision.com/donate
4
  Tags: video player, flowplayer, mobile video, html5 video, Vimeo, html5 player, youtube player, youtube playlist, video playlist, RTMP, Cloudfront, HLS
5
  Requires at least: 3.5
6
+ Tested up to: 5.0.2
7
  Stable tag: trunk
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
357
 
358
  == Changelog ==
359
 
360
+ = 7.3.6.727 - 2017/01/08 =
361
+
362
+ * Caption field - renaming to Title
363
+ * Database - enabling background processing for videos in DB
364
+ * Editor - fix for WebM and HLS duration scanning
365
+ * Lightbox - added Remove fancyBox setting - use if you see a "fancyBox already initialized" message on JavaScript console
366
+ * Sharing - removing Google+ as it's deprecated
367
+ * Bugfix - PHP 7.2 compatiblity
368
+
369
+ = 7.3.4.727 - 2017/12/14 =
370
+
371
+ * FV Player top level wp-admin menu item icon
372
+ * WordPress 5 - Gutenberg editor support
373
+ * Database - bugfix for mapping of Disable Playlist Autoadvance
374
+ * Database - making it work with XML sitemap
375
+ * Handle WordPress shortcodes - improved to work with [playlist] as well
376
+
377
  = 7.3.3.727 - 2017/12/05 =
378
 
379
  * Compatiblity - improving old Samsung phone detection for warning messages
view/admin.php CHANGED
@@ -584,7 +584,7 @@ function fv_flowplayer_admin_integrations() {
584
  </td>
585
  </tr>
586
 
587
- <?php $fv_fp->_get_checkbox(__('Handle WordPress <code><small>[video]</small></code> shortcodes', 'fv-wordpress-flowplayer'), array( 'integrations', 'wp_core_video' ), '...and also the YouTube links', '' ); ?>
588
  <?php $fv_fp->_get_checkbox(__('Load FV Flowplayer JS everywhere', 'fv-wordpress-flowplayer'), 'js-everywhere', __('If you use some special JavaScript integration you might prefer this option.', 'fv-wordpress-flowplayer'), __('Otherwise our JavaScript only loads if the shortcode is found in any of the posts being currently displayed.', 'fv-wordpress-flowplayer') ); ?>
589
  <?php if( $fv_fp->_get_option('parse_commas') ) $fv_fp->_get_checkbox(__('Parse old shortcodes with commas', 'fv-wordpress-flowplayer'), 'parse_commas', __('Older versions of this plugin used commas to sepparate shortcode parameters.', 'fv-wordpress-flowplayer'), __('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-wordpress-flowplayer') ); ?>
590
  <?php $fv_fp->_get_checkbox(__('Parse Vimeo and YouTube links', 'fv-wordpress-flowplayer'), 'parse_comments', __('Affects comments, bbPress and BuddyPress. These links will be displayed as videos.', 'fv-wordpress-flowplayer'), __('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-wordpress-flowplayer') ); ?>
@@ -834,7 +834,7 @@ function fv_flowplayer_admin_interface_options() {
834
  <?php $fv_fp->_get_checkbox(__('Mobile Video', 'fv-wordpress-flowplayer'), array('interface', 'mobile') ); ?>
835
  <?php $fv_fp->_get_checkbox(__('Playlist Auto Advance', 'fv-wordpress-flowplayer'), array('interface', 'playlist_advance') ); ?>
836
  <?php $fv_fp->_get_checkbox(__('Playlist Style', 'fv-wordpress-flowplayer'), array('interface', 'playlist') ); ?>
837
- <?php $fv_fp->_get_checkbox(__('Playlist Captions', 'fv-wordpress-flowplayer'), array('interface', 'playlist_captions') ); ?>
838
  <?php $fv_fp->_get_checkbox(__('Sharing Buttons', 'fv-wordpress-flowplayer'), array('interface', 'share') ); ?>
839
  <?php $fv_fp->_get_checkbox(__('Speed Buttons', 'fv-wordpress-flowplayer'), array('interface', 'speed') ); ?>
840
  <?php $fv_fp->_get_checkbox(__('Splash Text', 'fv-wordpress-flowplayer'), array('interface', 'splash_text') ); ?>
@@ -1522,7 +1522,7 @@ function fv_flowplayer_admin_usage() {
1522
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/encoding"><?php _e('Video Encoding for HTML 5', 'fv-wordpress-flowplayer'); ?></a></li>
1523
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/creating-playlists"><?php _e('How to Create Playlists', 'fv-wordpress-flowplayer'); ?></a></li>
1524
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/vtt-chapters"><?php _e('VTT Chapters', 'fv-wordpress-flowplayer'); ?></a></li>
1525
- <li><a target="_blank" href="https://foliovision.com/player/basic-setup/adding-captions-and-splash-text"><?php _e('Adding Captions and Splash Text', 'fv-wordpress-flowplayer'); ?></a></li>
1526
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/quality-switching"><?php _e('Setting Up Video Quality Switching', 'fv-wordpress-flowplayer'); ?></a></li>
1527
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/how-to-use-video-checker"><?php _e('How to Use the Built-in Video Checker', 'fv-wordpress-flowplayer'); ?></a></li>
1528
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/creating-video-links"><?php _e('Creating Video Links in FV Player', 'fv-wordpress-flowplayer'); ?></a></li>
584
  </td>
585
  </tr>
586
 
587
+ <?php $fv_fp->_get_checkbox(__('Handle WordPress <code><small>[video]</small></code> shortcodes', 'fv-wordpress-flowplayer'), array( 'integrations', 'wp_core_video' ), '...and also <code><small>[playlist]</small></code> and the YouTube links', '' ); ?>
588
  <?php $fv_fp->_get_checkbox(__('Load FV Flowplayer JS everywhere', 'fv-wordpress-flowplayer'), 'js-everywhere', __('If you use some special JavaScript integration you might prefer this option.', 'fv-wordpress-flowplayer'), __('Otherwise our JavaScript only loads if the shortcode is found in any of the posts being currently displayed.', 'fv-wordpress-flowplayer') ); ?>
589
  <?php if( $fv_fp->_get_option('parse_commas') ) $fv_fp->_get_checkbox(__('Parse old shortcodes with commas', 'fv-wordpress-flowplayer'), 'parse_commas', __('Older versions of this plugin used commas to sepparate shortcode parameters.', 'fv-wordpress-flowplayer'), __('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-wordpress-flowplayer') ); ?>
590
  <?php $fv_fp->_get_checkbox(__('Parse Vimeo and YouTube links', 'fv-wordpress-flowplayer'), 'parse_comments', __('Affects comments, bbPress and BuddyPress. These links will be displayed as videos.', 'fv-wordpress-flowplayer'), __('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-wordpress-flowplayer') ); ?>
834
  <?php $fv_fp->_get_checkbox(__('Mobile Video', 'fv-wordpress-flowplayer'), array('interface', 'mobile') ); ?>
835
  <?php $fv_fp->_get_checkbox(__('Playlist Auto Advance', 'fv-wordpress-flowplayer'), array('interface', 'playlist_advance') ); ?>
836
  <?php $fv_fp->_get_checkbox(__('Playlist Style', 'fv-wordpress-flowplayer'), array('interface', 'playlist') ); ?>
837
+ <?php $fv_fp->_get_checkbox(__('Playlist Item Titles', 'fv-wordpress-flowplayer'), array('interface', 'playlist_captions') ); ?>
838
  <?php $fv_fp->_get_checkbox(__('Sharing Buttons', 'fv-wordpress-flowplayer'), array('interface', 'share') ); ?>
839
  <?php $fv_fp->_get_checkbox(__('Speed Buttons', 'fv-wordpress-flowplayer'), array('interface', 'speed') ); ?>
840
  <?php $fv_fp->_get_checkbox(__('Splash Text', 'fv-wordpress-flowplayer'), array('interface', 'splash_text') ); ?>
1522
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/encoding"><?php _e('Video Encoding for HTML 5', 'fv-wordpress-flowplayer'); ?></a></li>
1523
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/creating-playlists"><?php _e('How to Create Playlists', 'fv-wordpress-flowplayer'); ?></a></li>
1524
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/vtt-chapters"><?php _e('VTT Chapters', 'fv-wordpress-flowplayer'); ?></a></li>
1525
+ <li><a target="_blank" href="https://foliovision.com/player/basic-setup/adding-captions-and-splash-text"><?php _e('Adding Titles and Splash Text', 'fv-wordpress-flowplayer'); ?></a></li>
1526
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/quality-switching"><?php _e('Setting Up Video Quality Switching', 'fv-wordpress-flowplayer'); ?></a></li>
1527
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/how-to-use-video-checker"><?php _e('How to Use the Built-in Video Checker', 'fv-wordpress-flowplayer'); ?></a></li>
1528
  <li><a target="_blank" href="https://foliovision.com/player/basic-setup/creating-video-links"><?php _e('Creating Video Links in FV Player', 'fv-wordpress-flowplayer'); ?></a></li>
view/wizard.php CHANGED
@@ -161,7 +161,7 @@ var fv_flowplayer_preview_nonce = '<?php echo wp_create_nonce( "fv-player-previe
161
  <thead>
162
  <tr>
163
  <th><a>Video</a></th>
164
- <th><a<?php if( !isset($fv_flowplayer_conf["interface"]["playlist_captions"]) || $fv_flowplayer_conf["interface"]["playlist_captions"] != 'true' ) echo ' class="fv_player_interface_hide"'; ?>>Caption</a></th>
165
  <!--<th>Dimension</th>
166
  <th>Time</th>-->
167
  </tr>
@@ -283,7 +283,7 @@ var fv_flowplayer_preview_nonce = '<?php echo wp_create_nonce( "fv-player-previe
283
  </tr>
284
 
285
  <tr class="<?php if (isset($fv_flowplayer_conf["interface"]["playlist_captions"]) && $fv_flowplayer_conf["interface"]["playlist_captions"] == 'true') echo 'playlist_caption'; else echo 'fv_player_interface_hide'; ?>" >
286
- <th scope="row" class="label"><label for="fv_wp_flowplayer_field_caption" class="alignright"><?php _e('Caption', 'fv_flowplayer'); ?></label></th>
287
  <td class="field" colspan="2"><input type="text" class="text<?php echo $upload_field_class; ?>" id="fv_wp_flowplayer_field_caption" name="fv_wp_flowplayer_field_caption" value=""/></td>
288
  </tr>
289
 
161
  <thead>
162
  <tr>
163
  <th><a>Video</a></th>
164
+ <th><a<?php if( !isset($fv_flowplayer_conf["interface"]["playlist_captions"]) || $fv_flowplayer_conf["interface"]["playlist_captions"] != 'true' ) echo ' class="fv_player_interface_hide"'; ?>>Title</a></th>
165
  <!--<th>Dimension</th>
166
  <th>Time</th>-->
167
  </tr>
283
  </tr>
284
 
285
  <tr class="<?php if (isset($fv_flowplayer_conf["interface"]["playlist_captions"]) && $fv_flowplayer_conf["interface"]["playlist_captions"] == 'true') echo 'playlist_caption'; else echo 'fv_player_interface_hide'; ?>" >
286
+ <th scope="row" class="label"><label for="fv_wp_flowplayer_field_caption" class="alignright"><?php _e('Title', 'fv_flowplayer'); ?></label></th>
287
  <td class="field" colspan="2"><input type="text" class="text<?php echo $upload_field_class; ?>" id="fv_wp_flowplayer_field_caption" name="fv_wp_flowplayer_field_caption" value=""/></td>
288
  </tr>
289