Version Description
2019/01/24 =
Database - performance fix
Bugfix - fullscreen mode corners when using the YouTuby skin
Bugfix - FV Player Meta Box (Custom Videos) fixes
Bugfix - WP Media Library not loading for FV Player screen
Bugfix - S3 Browser not loading FV Player screen and Gutenberg (block editor)
Download this release
Release Info
Developer | FolioVision |
Plugin | FV Flowplayer Video Player |
Version | 7.3.7.727 |
Comparing to | |
See all releases |
Code changes from version 7.3.6.727 to 7.3.7.727
- controller/backend.php +0 -0
- controller/editor.php +4 -1
- controller/frontend.php +0 -0
- css/colorbox.css +0 -0
- css/flowplayer.css +2 -1
- css/fonts/fpicons.eot +0 -0
- css/fonts/fpicons.svg +0 -0
- css/fonts/fpicons.ttf +0 -0
- css/fonts/fpicons.woff +0 -0
- css/img/exit_btn.png +0 -0
- css/img/flowplayer.png +0 -0
- css/img/no_play_white-x2.png +0 -0
- css/img/no_play_white.png +0 -0
- css/img/techinfo.png +0 -0
- css/shortcode-editor.css +166 -166
- flowplayer.php +2 -2
- flowplayer/embed.min.js +0 -0
- flowplayer/flowplayer.swf +0 -0
- flowplayer/flowplayerhls.swf +0 -0
- flowplayer/fv-flowplayer.min.js +3 -1
- js/s3-browser.js +21 -10
- js/shortcode-editor.js +0 -0
- models/checker.php +0 -0
- models/custom-videos.php +36 -33
- models/db-video.php +2 -2
- models/db.php +3 -3
- models/flowplayer-frontend.php +0 -0
- models/flowplayer.php +0 -0
- models/list-table.php +2 -0
- models/media-browser-s3.php +6 -0
- readme.txt +12 -4
- test/integration/backend/profileVideosTest.php +0 -47
- test/integration/backend/s3BrowserAjaxTest.php +0 -61
- test/integration/backend/settingsTest.php +0 -45
- test/integration/backend/testProfileScreen.html +0 -54
- test/integration/backend/testSettingsScreen.html +0 -2073
- test/integration/backend/videointelligenceInstallTest.php +0 -80
- test/integration/bootstrap.php +0 -38
- test/integration/frontend/1-shortcodesTest.php +0 -52
- test/integration/frontend/dbTest.php +0 -121
- test/integration/frontend/endActionsTest.php +0 -164
- test/integration/frontend/player-data.json +0 -1
- test/integration/frontend/shortcodesLightboxTest.php +0 -168
- test/integration/frontend/shortcodesPlaylistTest.php +0 -156
- test/integration/frontend/testSimpleShortcode.html +0 -83
- test/integration/frontend/videoPositionSavingTest.php +0 -151
- test/integration/fv-player-ajax-unittest-case.php +0 -67
- test/integration/fv-player-unittest-case.php +0 -76
- test/integration/phpunit.xml +0 -8
- test/unit/bootstrap.php +0 -3
- test/unit/controller/frontendTest.php +0 -209
- test/unit/phpunit.xml +0 -7
- test/wp-global-empty-mocks.php +0 -225
controller/backend.php
CHANGED
File without changes
|
controller/editor.php
CHANGED
@@ -69,10 +69,13 @@ function flowplayer_add_media_button() {
|
|
69 |
add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
|
70 |
|
71 |
|
72 |
-
add_action( '
|
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' );
|
69 |
add_action('media_upload_fvplayer_video', '__return_false'); // keep for compatibility!
|
70 |
|
71 |
|
72 |
+
add_action( 'enqueue_block_editor_assets', '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 |
+
// if we are loading for Gutenberg, then forget about the load method for old editor
|
78 |
+
remove_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
|
79 |
}
|
80 |
|
81 |
add_action( 'edit_form_after_editor', 'fv_wp_flowplayer_edit_form_after_editor' );
|
controller/frontend.php
CHANGED
File without changes
|
css/colorbox.css
CHANGED
File without changes
|
css/flowplayer.css
CHANGED
@@ -51,7 +51,8 @@
|
|
51 |
-webkit-box-shadow: 0 !important;
|
52 |
box-shadow: 0 !important;
|
53 |
background-image: none !important;
|
54 |
-
background-color: #333;
|
|
|
55 |
.flowplayer.is-fullscreen .fp-player {
|
56 |
background-color: #333; }
|
57 |
.flowplayer.is-fullscreen .fp-fullscreen:before {
|
51 |
-webkit-box-shadow: 0 !important;
|
52 |
box-shadow: 0 !important;
|
53 |
background-image: none !important;
|
54 |
+
background-color: #333;
|
55 |
+
border-radius: 0; }
|
56 |
.flowplayer.is-fullscreen .fp-player {
|
57 |
background-color: #333; }
|
58 |
.flowplayer.is-fullscreen .fp-fullscreen:before {
|
css/fonts/fpicons.eot
CHANGED
File without changes
|
css/fonts/fpicons.svg
CHANGED
File without changes
|
css/fonts/fpicons.ttf
CHANGED
File without changes
|
css/fonts/fpicons.woff
CHANGED
File without changes
|
css/img/exit_btn.png
CHANGED
File without changes
|
css/img/flowplayer.png
CHANGED
File without changes
|
css/img/no_play_white-x2.png
CHANGED
File without changes
|
css/img/no_play_white.png
CHANGED
File without changes
|
css/img/techinfo.png
CHANGED
File without changes
|
css/shortcode-editor.css
CHANGED
@@ -1,166 +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: 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 |
-
|
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.
|
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.
|
31 |
$fv_wp_flowplayer_core_ver = '7.2.7.1';
|
32 |
|
33 |
include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
|
3 |
Plugin Name: FV Player
|
4 |
Plugin URI: http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer
|
5 |
Description: Formerly FV WordPress Flowplayer. Supports MP4, HLS, MPEG-DASH, WebM and OGV. Advanced features such as overlay ads or popups. Uses Flowplayer 7.2.7.
|
6 |
+
Version: 7.3.7.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.7.727.1';
|
31 |
$fv_wp_flowplayer_core_ver = '7.2.7.1';
|
32 |
|
33 |
include_once( dirname( __FILE__ ) . '/includes/extra-functions.php' );
|
flowplayer/embed.min.js
CHANGED
File without changes
|
flowplayer/flowplayer.swf
CHANGED
File without changes
|
flowplayer/flowplayerhls.swf
CHANGED
File without changes
|
flowplayer/fv-flowplayer.min.js
CHANGED
@@ -593,7 +593,9 @@ function fv_player_preload() {
|
|
593 |
if( property == 'max-height' ) playlist.css('height','auto');
|
594 |
}
|
595 |
check_size_and_all();
|
596 |
-
jQuery(window).on('resize tabsactivate', function() {
|
|
|
|
|
597 |
}
|
598 |
|
599 |
function vertical_playlist_height(args) {
|
593 |
if( property == 'max-height' ) playlist.css('height','auto');
|
594 |
}
|
595 |
check_size_and_all();
|
596 |
+
jQuery(window).on('resize tabsactivate', function() {
|
597 |
+
setTimeout( check_size_and_all, 0 );
|
598 |
+
} );
|
599 |
}
|
600 |
|
601 |
function vertical_playlist_height(args) {
|
js/s3-browser.js
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
jQuery( function($) {
|
|
|
|
|
|
|
2 |
function fv_flowplayer_media_browser_add_tab(tabId, tabText, tabOnClickCallback) {
|
3 |
if (!jQuery('#' + tabId).length) {
|
4 |
// add Vimeo browser tab
|
@@ -141,14 +144,14 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
141 |
// This event listener monitors changes on the URL. We use it to
|
142 |
// capture back/forward navigation in the browser.
|
143 |
|
144 |
-
jQuery(window).on('hashchange', function(){
|
145 |
|
146 |
-
goto(window.
|
147 |
|
148 |
// We are triggering the event. This will execute
|
149 |
// this function on page load, so that we show the correct folder:
|
150 |
|
151 |
-
}).trigger('hashchange');
|
152 |
|
153 |
|
154 |
// Hiding and showing the search box
|
@@ -185,14 +188,16 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
185 |
filemanager.addClass('searching');
|
186 |
|
187 |
// Update the hash on every key stroke
|
188 |
-
window.
|
|
|
189 |
|
190 |
}
|
191 |
|
192 |
else {
|
193 |
|
194 |
filemanager.removeClass('searching');
|
195 |
-
window.
|
|
|
196 |
|
197 |
}
|
198 |
|
@@ -221,7 +226,9 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
221 |
|
222 |
if(!search.val().trim().length) {
|
223 |
|
224 |
-
window.
|
|
|
|
|
225 |
search.hide();
|
226 |
search.parent().find('span').show();
|
227 |
|
@@ -251,7 +258,9 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
251 |
breadcrumbsUrls.push(nextDir);
|
252 |
}
|
253 |
|
254 |
-
window.
|
|
|
|
|
255 |
currentPath = nextDir;
|
256 |
});
|
257 |
|
@@ -266,7 +275,8 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
266 |
|
267 |
breadcrumbsUrls.length = Number(index);
|
268 |
|
269 |
-
window.
|
|
|
270 |
|
271 |
});
|
272 |
|
@@ -275,7 +285,7 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
275 |
|
276 |
function goto(hash) {
|
277 |
|
278 |
-
hash = decodeURIComponent(hash).
|
279 |
|
280 |
if (hash.length) {
|
281 |
var rendered = '';
|
@@ -487,7 +497,8 @@ fv_flowplayer_s3_browse = function(data, ajax_search_callback) {
|
|
487 |
|
488 |
$url_input
|
489 |
.val($this.attr('href'))
|
490 |
-
.removeClass('fv_flowplayer_target' )
|
|
|
491 |
|
492 |
if( splash && $url_input.attr('id').match(/^fv_wp_flowplayer_field_src/) ) {
|
493 |
var splash_input = $url_input.parents('table').find('#fv_wp_flowplayer_field_splash');
|
1 |
jQuery( function($) {
|
2 |
+
|
3 |
+
window.fv_player_browser = '';
|
4 |
+
|
5 |
function fv_flowplayer_media_browser_add_tab(tabId, tabText, tabOnClickCallback) {
|
6 |
if (!jQuery('#' + tabId).length) {
|
7 |
// add Vimeo browser tab
|
144 |
// This event listener monitors changes on the URL. We use it to
|
145 |
// capture back/forward navigation in the browser.
|
146 |
|
147 |
+
jQuery(window).on('fv-player-browser-hashchange', function(){
|
148 |
|
149 |
+
goto(window.fv_player_browser);
|
150 |
|
151 |
// We are triggering the event. This will execute
|
152 |
// this function on page load, so that we show the correct folder:
|
153 |
|
154 |
+
}).trigger('fv-player-browser-hashchange');
|
155 |
|
156 |
|
157 |
// Hiding and showing the search box
|
188 |
filemanager.addClass('searching');
|
189 |
|
190 |
// Update the hash on every key stroke
|
191 |
+
window.fv_player_browser = 'search=' + value.trim();
|
192 |
+
jQuery(window).trigger('fv-player-browser-hashchange');
|
193 |
|
194 |
}
|
195 |
|
196 |
else {
|
197 |
|
198 |
filemanager.removeClass('searching');
|
199 |
+
window.fv_player_browser = encodeURIComponent(currentPath);
|
200 |
+
jQuery(window).trigger('fv-player-browser-hashchange');
|
201 |
|
202 |
}
|
203 |
|
226 |
|
227 |
if(!search.val().trim().length) {
|
228 |
|
229 |
+
window.fv_player_browser = encodeURIComponent(currentPath);
|
230 |
+
jQuery(window).trigger('fv-player-browser-hashchange');
|
231 |
+
|
232 |
search.hide();
|
233 |
search.parent().find('span').show();
|
234 |
|
258 |
breadcrumbsUrls.push(nextDir);
|
259 |
}
|
260 |
|
261 |
+
window.fv_player_browser = encodeURIComponent(nextDir);
|
262 |
+
jQuery(window).trigger('fv-player-browser-hashchange');
|
263 |
+
|
264 |
currentPath = nextDir;
|
265 |
});
|
266 |
|
275 |
|
276 |
breadcrumbsUrls.length = Number(index);
|
277 |
|
278 |
+
window.fv_player_browser = encodeURIComponent(nextDir);
|
279 |
+
jQuery(window).trigger('fv-player-browser-hashchange');
|
280 |
|
281 |
});
|
282 |
|
285 |
|
286 |
function goto(hash) {
|
287 |
|
288 |
+
hash = decodeURIComponent(hash).split('=');
|
289 |
|
290 |
if (hash.length) {
|
291 |
var rendered = '';
|
497 |
|
498 |
$url_input
|
499 |
.val($this.attr('href'))
|
500 |
+
.removeClass('fv_flowplayer_target' )
|
501 |
+
.trigger('keyup'); // this changes the HLS key field visibility in FV Player Pro
|
502 |
|
503 |
if( splash && $url_input.attr('id').match(/^fv_wp_flowplayer_field_src/) ) {
|
504 |
var splash_input = $url_input.parents('table').find('#fv_wp_flowplayer_field_splash');
|
js/shortcode-editor.js
CHANGED
File without changes
|
models/checker.php
CHANGED
File without changes
|
models/custom-videos.php
CHANGED
@@ -2,8 +2,6 @@
|
|
2 |
|
3 |
class FV_Player_Custom_Videos {
|
4 |
|
5 |
-
var $did_form = false;
|
6 |
-
|
7 |
var $id;
|
8 |
|
9 |
var $instance_id;
|
@@ -29,17 +27,6 @@ class FV_Player_Custom_Videos {
|
|
29 |
|
30 |
public function get_form( $args = array() ) {
|
31 |
|
32 |
-
global $FV_Player_Custom_Videos_form_instances;
|
33 |
-
if( isset($FV_Player_Custom_Videos_form_instances[$this->meta]) ) {
|
34 |
-
$number = rand();
|
35 |
-
echo "<span id='fv-player-custom-videos-form-".$number."'></span>";
|
36 |
-
echo "<script>jQuery('span#fv-player-custom-videos-form-".$number."').parents('.postbox').remove();</script>";
|
37 |
-
return false;
|
38 |
-
}
|
39 |
-
$FV_Player_Custom_Videos_form_instances[$this->meta] = true;
|
40 |
-
|
41 |
-
$this->did_form = true;
|
42 |
-
|
43 |
$args = wp_parse_args( $args, array( 'wrapper' => 'div', 'edit' => true, 'limit' => 1000, 'no_form' => false ) );
|
44 |
|
45 |
$html = '';
|
@@ -91,9 +78,13 @@ class FV_Player_Custom_Videos {
|
|
91 |
}
|
92 |
|
93 |
public function get_html_part( $video, $edit = false ) {
|
|
|
|
|
94 |
|
95 |
// exp: what matters here is .fv-player-editor-field and .fv-player-editor-button wrapped in .fv-player-editor-wrapper and .fv-player-editor-preview
|
96 |
if( $edit ) {
|
|
|
|
|
97 |
$html = "<div class='fv-player-editor-wrapper' data-key='fv-player-editor-field-".$this->meta."'>
|
98 |
<div class='inside inside-child'>
|
99 |
<div class='fv-player-editor-preview'>".($video ? do_shortcode($video) : '')."</div>
|
@@ -101,7 +92,7 @@ class FV_Player_Custom_Videos {
|
|
101 |
<div class='edit-video' ".(!$video ? 'style="display:none"' : '').">
|
102 |
<button class='button fv-player-editor-button'>Edit Video</button>
|
103 |
<button class='button fv-player-editor-remove'>Remove Video</button>
|
104 |
-
|
105 |
</div>
|
106 |
|
107 |
<div class='add-video' ".($video ? 'style="display:none"' : '').">
|
@@ -212,15 +203,17 @@ class FV_Player_Custom_Videos_Master {
|
|
212 |
function add_meta_boxes() {
|
213 |
global $post;
|
214 |
if( !empty($this->aMetaBoxes[$post->post_type]) ) {
|
215 |
-
foreach( $this->aMetaBoxes[$post->post_type] AS $meta_key => $
|
216 |
-
|
217 |
-
|
218 |
-
|
|
|
|
|
219 |
array( $this, 'meta_box' ),
|
220 |
null,
|
221 |
'normal',
|
222 |
-
'high'
|
223 |
-
|
224 |
}
|
225 |
}
|
226 |
|
@@ -233,13 +226,15 @@ class FV_Player_Custom_Videos_Master {
|
|
233 |
foreach( $aMeta AS $key => $aMetas ) {
|
234 |
$objVideos = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => $key, 'type' => 'post' ) );
|
235 |
if( $objVideos->have_videos() ) {
|
236 |
-
|
|
|
|
|
|
|
237 |
ucfirst(str_replace( array('_','-'),' ',$key)),
|
238 |
array( $this, 'meta_box' ),
|
239 |
null,
|
240 |
'normal',
|
241 |
-
'high'
|
242 |
-
$objVideos );
|
243 |
}
|
244 |
|
245 |
}
|
@@ -293,17 +288,14 @@ class FV_Player_Custom_Videos_Master {
|
|
293 |
|
294 |
function meta_box( $aPosts, $args ) {
|
295 |
global $FV_Player_Custom_Videos_form_instances;
|
296 |
-
$objVideos = $args['
|
297 |
-
unset($FV_Player_Custom_Videos_form_instances[$objVideos->meta]);
|
298 |
echo $objVideos->get_form();
|
299 |
}
|
300 |
|
301 |
-
function register_metabox( $
|
302 |
-
if( !isset($this->aMetaBoxes[$post_type]) ) $this->aMetaBoxes[$post_type] = array();
|
303 |
-
if( !isset($this->aMetaBoxesDisplay[$post_type]) ) $this->aMetaBoxesDisplay[$post_type] = array();
|
304 |
|
305 |
-
$this->aMetaBoxes[$post_type][$meta_key] = $
|
306 |
-
$this->aMetaBoxesDisplay[$post_type][$meta_key] = $display;
|
307 |
}
|
308 |
|
309 |
|
@@ -361,7 +353,7 @@ class FV_Player_Custom_Videos_Master {
|
|
361 |
$aMeta = get_post_custom($post->ID);
|
362 |
if( $aMeta ) {
|
363 |
foreach( $aMeta AS $key => $aMetas ) {
|
364 |
-
if( !empty($this->
|
365 |
$objVideos = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => $key, 'type' => 'post' ) );
|
366 |
if( $objVideos->have_videos() ) {
|
367 |
$content .= $objVideos->get_html();
|
@@ -442,9 +434,20 @@ $FV_Player_Custom_Videos_Master = new FV_Player_Custom_Videos_Master;
|
|
442 |
|
443 |
class FV_Player_MetaBox {
|
444 |
|
445 |
-
function __construct( $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
446 |
global $FV_Player_Custom_Videos_Master;
|
447 |
-
$FV_Player_Custom_Videos_Master->register_metabox(
|
448 |
}
|
449 |
|
450 |
}
|
2 |
|
3 |
class FV_Player_Custom_Videos {
|
4 |
|
|
|
|
|
5 |
var $id;
|
6 |
|
7 |
var $instance_id;
|
27 |
|
28 |
public function get_form( $args = array() ) {
|
29 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
$args = wp_parse_args( $args, array( 'wrapper' => 'div', 'edit' => true, 'limit' => 1000, 'no_form' => false ) );
|
31 |
|
32 |
$html = '';
|
78 |
}
|
79 |
|
80 |
public function get_html_part( $video, $edit = false ) {
|
81 |
+
global $FV_Player_Custom_Videos_Master, $post;
|
82 |
+
$args = !empty($FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type]) ? $FV_Player_Custom_Videos_Master->aMetaBoxes[$post->post_type][$this->meta] : array( 'multiple' => true );
|
83 |
|
84 |
// exp: what matters here is .fv-player-editor-field and .fv-player-editor-button wrapped in .fv-player-editor-wrapper and .fv-player-editor-preview
|
85 |
if( $edit ) {
|
86 |
+
$add_another = $args['multiple'] ? "<button class='button fv-player-editor-more' style='display:none'>Add Another Video</button>" : false;
|
87 |
+
|
88 |
$html = "<div class='fv-player-editor-wrapper' data-key='fv-player-editor-field-".$this->meta."'>
|
89 |
<div class='inside inside-child'>
|
90 |
<div class='fv-player-editor-preview'>".($video ? do_shortcode($video) : '')."</div>
|
92 |
<div class='edit-video' ".(!$video ? 'style="display:none"' : '').">
|
93 |
<button class='button fv-player-editor-button'>Edit Video</button>
|
94 |
<button class='button fv-player-editor-remove'>Remove Video</button>
|
95 |
+
$add_another
|
96 |
</div>
|
97 |
|
98 |
<div class='add-video' ".($video ? 'style="display:none"' : '').">
|
203 |
function add_meta_boxes() {
|
204 |
global $post;
|
205 |
if( !empty($this->aMetaBoxes[$post->post_type]) ) {
|
206 |
+
foreach( $this->aMetaBoxes[$post->post_type] AS $meta_key => $args ) {
|
207 |
+
global $FV_Player_Custom_Videos_form_instances;
|
208 |
+
$id = 'fv_player_custom_videos-field_'.$meta_key;
|
209 |
+
$FV_Player_Custom_Videos_form_instances[$id] = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => $args['meta_key'], 'type' => 'post' ) );
|
210 |
+
add_meta_box( $id,
|
211 |
+
$args['name'],
|
212 |
array( $this, 'meta_box' ),
|
213 |
null,
|
214 |
'normal',
|
215 |
+
'high'
|
216 |
+
);
|
217 |
}
|
218 |
}
|
219 |
|
226 |
foreach( $aMeta AS $key => $aMetas ) {
|
227 |
$objVideos = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => $key, 'type' => 'post' ) );
|
228 |
if( $objVideos->have_videos() ) {
|
229 |
+
global $FV_Player_Custom_Videos_form_instances;
|
230 |
+
$id = 'fv_player_custom_videos-field_'.$key;
|
231 |
+
$FV_Player_Custom_Videos_form_instances[$id] = $objVideos;
|
232 |
+
add_meta_box( $id,
|
233 |
ucfirst(str_replace( array('_','-'),' ',$key)),
|
234 |
array( $this, 'meta_box' ),
|
235 |
null,
|
236 |
'normal',
|
237 |
+
'high' );
|
|
|
238 |
}
|
239 |
|
240 |
}
|
288 |
|
289 |
function meta_box( $aPosts, $args ) {
|
290 |
global $FV_Player_Custom_Videos_form_instances;
|
291 |
+
$objVideos = $FV_Player_Custom_Videos_form_instances[$args['id']];
|
|
|
292 |
echo $objVideos->get_form();
|
293 |
}
|
294 |
|
295 |
+
function register_metabox( $args ) {
|
296 |
+
if( !isset($this->aMetaBoxes[$args['post_type']]) ) $this->aMetaBoxes[$args['post_type']] = array();
|
|
|
297 |
|
298 |
+
$this->aMetaBoxes[$args['post_type']][$args['meta_key']] = $args;
|
|
|
299 |
}
|
300 |
|
301 |
|
353 |
$aMeta = get_post_custom($post->ID);
|
354 |
if( $aMeta ) {
|
355 |
foreach( $aMeta AS $key => $aMetas ) {
|
356 |
+
if( !empty($this->aMetaBoxes[$post->post_type][$key]) && $this->aMetaBoxes[$post->post_type][$key]['display'] ) {
|
357 |
$objVideos = new FV_Player_Custom_Videos( array('id' => $post->ID, 'meta' => $key, 'type' => 'post' ) );
|
358 |
if( $objVideos->have_videos() ) {
|
359 |
$content .= $objVideos->get_html();
|
434 |
|
435 |
class FV_Player_MetaBox {
|
436 |
|
437 |
+
function __construct( $args, $meta_key = false, $post_type = false, $display = false ) {
|
438 |
+
if( is_string($args) ) {
|
439 |
+
$args = array(
|
440 |
+
'name' => $args,
|
441 |
+
'meta_key' => $meta_key,
|
442 |
+
'post_type' => $post_type,
|
443 |
+
'display' => $display
|
444 |
+
);
|
445 |
+
}
|
446 |
+
|
447 |
+
$args = wp_parse_args( $args, array( 'display' => false, 'multiple' => true ) );
|
448 |
+
|
449 |
global $FV_Player_Custom_Videos_Master;
|
450 |
+
$FV_Player_Custom_Videos_Master->register_metabox($args);
|
451 |
}
|
452 |
|
453 |
}
|
models/db-video.php
CHANGED
@@ -84,7 +84,7 @@ class FV_Player_Db_Video {
|
|
84 |
*/
|
85 |
public function getDuration() {
|
86 |
$sDuration = false;
|
87 |
-
if( $tDuration = $this->getMetaValue('duration',true) ) {
|
88 |
if( $tDuration < 3600 ) {
|
89 |
$sDuration = gmdate( "i:s", $tDuration );
|
90 |
} else {
|
@@ -294,7 +294,7 @@ CREATE TABLE " . self::$db_table_name . " (
|
|
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;
|
84 |
*/
|
85 |
public function getDuration() {
|
86 |
$sDuration = false;
|
87 |
+
if( $tDuration = intval($this->getMetaValue('duration',true)) ) {
|
88 |
if( $tDuration < 3600 ) {
|
89 |
$sDuration = gmdate( "i:s", $tDuration );
|
90 |
} else {
|
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.$where.$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;
|
models/db.php
CHANGED
@@ -102,13 +102,13 @@ class FV_Player_Db {
|
|
102 |
if( is_numeric($aItem['sources'][0]['src']) ) {
|
103 |
$new = array( 'sources' => array() );
|
104 |
if( $src = $vid_obj->getSrc() ) {
|
105 |
-
$new['sources'][] = array( 'src' =>
|
106 |
}
|
107 |
if( $src1 = $vid_obj->getSrc1() ) {
|
108 |
-
$new['sources'][] = array( 'src' =>
|
109 |
}
|
110 |
if( $src2 = $vid_obj->getSrc2() ) {
|
111 |
-
$new['sources'][] = array( 'src' =>
|
112 |
}
|
113 |
if( $rtmp = $vid_obj->getRtmp() ) {
|
114 |
$new['rtmp'] = $rtmp;
|
102 |
if( is_numeric($aItem['sources'][0]['src']) ) {
|
103 |
$new = array( 'sources' => array() );
|
104 |
if( $src = $vid_obj->getSrc() ) {
|
105 |
+
$new['sources'][] = array( 'src' => apply_filters('fv_flowplayer_video_src',$src,array()), 'type' => $fv_fp->get_mime_type($src) );
|
106 |
}
|
107 |
if( $src1 = $vid_obj->getSrc1() ) {
|
108 |
+
$new['sources'][] = array( 'src' => apply_filters('fv_flowplayer_video_src',$src1,array()), 'type' => $fv_fp->get_mime_type($src1) );
|
109 |
}
|
110 |
if( $src2 = $vid_obj->getSrc2() ) {
|
111 |
+
$new['sources'][] = array( 'src' => apply_filters('fv_flowplayer_video_src',$src2,array()), 'type' => $fv_fp->get_mime_type($src2));
|
112 |
}
|
113 |
if( $rtmp = $vid_obj->getRtmp() ) {
|
114 |
$new['rtmp'] = $rtmp;
|
models/flowplayer-frontend.php
CHANGED
File without changes
|
models/flowplayer.php
CHANGED
File without changes
|
models/list-table.php
CHANGED
@@ -29,6 +29,8 @@ class FV_Player_List_Table_View {
|
|
29 |
if( isset($_GET['page']) && $_GET['page'] == 'fv_player' ) {
|
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>
|
29 |
if( isset($_GET['page']) && $_GET['page'] == 'fv_player' ) {
|
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 |
+
wp_enqueue_media();
|
34 |
}
|
35 |
?>
|
36 |
<style>#adminmenu #toplevel_page_fv_player .wp-menu-image img {width:28px;height:25px;padding-top:4px}</style>
|
models/media-browser-s3.php
CHANGED
@@ -4,6 +4,8 @@ class FV_Player_Media_Browser_S3 extends FV_Player_Media_Browser {
|
|
4 |
|
5 |
function __construct( $ajax_action_name ) {
|
6 |
add_action( 'edit_form_after_editor', array($this, 'init'), 1 );
|
|
|
|
|
7 |
parent::__construct( $ajax_action_name );
|
8 |
}
|
9 |
|
@@ -13,6 +15,10 @@ class FV_Player_Media_Browser_S3 extends FV_Player_Media_Browser {
|
|
13 |
wp_enqueue_script( 'flowplayer-aws-s3', flowplayer::get_plugin_url().'/js/s3-browser.js', array(), $fv_wp_flowplayer_ver, true );
|
14 |
}
|
15 |
}
|
|
|
|
|
|
|
|
|
16 |
|
17 |
function fv_wp_flowplayer_include_aws_sdk() {
|
18 |
if ( ! class_exists( 'Aws\S3\S3Client' ) ) {
|
4 |
|
5 |
function __construct( $ajax_action_name ) {
|
6 |
add_action( 'edit_form_after_editor', array($this, 'init'), 1 );
|
7 |
+
add_action( 'enqueue_block_editor_assets', array($this, 'init_for_gutenberg') );
|
8 |
+
add_action( 'admin_print_footer_scripts', array($this, 'init'), 1 );
|
9 |
parent::__construct( $ajax_action_name );
|
10 |
}
|
11 |
|
15 |
wp_enqueue_script( 'flowplayer-aws-s3', flowplayer::get_plugin_url().'/js/s3-browser.js', array(), $fv_wp_flowplayer_ver, true );
|
16 |
}
|
17 |
}
|
18 |
+
|
19 |
+
function init_for_gutenberg() {
|
20 |
+
add_action( 'admin_footer', array($this, 'init'), 1 );
|
21 |
+
}
|
22 |
|
23 |
function fv_wp_flowplayer_include_aws_sdk() {
|
24 |
if ( ! class_exists( 'Aws\S3\S3Client' ) ) {
|
readme.txt
CHANGED
@@ -357,7 +357,15 @@ Thank you for being part of the HMTL 5 mobile video revolution!
|
|
357 |
|
358 |
== Changelog ==
|
359 |
|
360 |
-
= 7.3.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
361 |
|
362 |
* Caption field - renaming to Title
|
363 |
* Database - enabling background processing for videos in DB
|
@@ -366,7 +374,7 @@ Thank you for being part of the HMTL 5 mobile video revolution!
|
|
366 |
* Sharing - removing Google+ as it's deprecated
|
367 |
* Bugfix - PHP 7.2 compatiblity
|
368 |
|
369 |
-
= 7.3.4.727 -
|
370 |
|
371 |
* FV Player top level wp-admin menu item icon
|
372 |
* WordPress 5 - Gutenberg editor support
|
@@ -374,14 +382,14 @@ Thank you for being part of the HMTL 5 mobile video revolution!
|
|
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 -
|
378 |
|
379 |
* Compatiblity - improving old Samsung phone detection for warning messages
|
380 |
* Database - PHP 5.2 compatibility fixes
|
381 |
* Database - schema changes for better compatibility (maximum row size error)
|
382 |
* MPEG-DASH - upgrading Dash.js to 2.8.0
|
383 |
|
384 |
-
= 7.3.1.727 -
|
385 |
|
386 |
* Fix for PHP warning in wp-admin when no database table is present yet
|
387 |
|
357 |
|
358 |
== Changelog ==
|
359 |
|
360 |
+
= 7.3.7.727 - 2019/01/24 =
|
361 |
+
|
362 |
+
* Database - performance fix
|
363 |
+
* Bugfix - fullscreen mode corners when using the YouTuby skin
|
364 |
+
* Bugfix - FV Player Meta Box (Custom Videos) fixes
|
365 |
+
* Bugfix - WP Media Library not loading for FV Player screen
|
366 |
+
* Bugfix - S3 Browser not loading FV Player screen and Gutenberg (block editor)
|
367 |
+
|
368 |
+
= 7.3.6.727 - 2019/01/08 =
|
369 |
|
370 |
* Caption field - renaming to Title
|
371 |
* Database - enabling background processing for videos in DB
|
374 |
* Sharing - removing Google+ as it's deprecated
|
375 |
* Bugfix - PHP 7.2 compatiblity
|
376 |
|
377 |
+
= 7.3.4.727 - 2018/12/14 =
|
378 |
|
379 |
* FV Player top level wp-admin menu item icon
|
380 |
* WordPress 5 - Gutenberg editor support
|
382 |
* Database - making it work with XML sitemap
|
383 |
* Handle WordPress shortcodes - improved to work with [playlist] as well
|
384 |
|
385 |
+
= 7.3.3.727 - 2018/12/05 =
|
386 |
|
387 |
* Compatiblity - improving old Samsung phone detection for warning messages
|
388 |
* Database - PHP 5.2 compatibility fixes
|
389 |
* Database - schema changes for better compatibility (maximum row size error)
|
390 |
* MPEG-DASH - upgrading Dash.js to 2.8.0
|
391 |
|
392 |
+
= 7.3.1.727 - 2018/11/16 =
|
393 |
|
394 |
* Fix for PHP warning in wp-admin when no database table is present yet
|
395 |
|
test/integration/backend/profileVideosTest.php
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_ProfileVideosTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
public function testProfileScreen() {
|
12 |
-
global $fv_fp;
|
13 |
-
$fv_fp->conf['profile_videos_enable_bio'] = true;
|
14 |
-
|
15 |
-
// add new user and create last saved position metadata for this new user
|
16 |
-
$this->userID = $this->factory->user->create(array(
|
17 |
-
'role' => 'admin'
|
18 |
-
));
|
19 |
-
|
20 |
-
add_user_meta($this->userID, '_fv_player_user_video', '[fvplayer src="https://vimeo.com/255317467" playlist="https://vimeo.com/192934117" caption=";Talking about FV Player"]');
|
21 |
-
add_user_meta($this->userID, '_fv_player_user_video', '[fvplayer src="https://vimeo.com/255370388"]');
|
22 |
-
add_user_meta($this->userID, '_fv_player_user_video', '[fvplayer src="https://www.youtube.com/watch?v=6ZfuNTqbHE8"]]');
|
23 |
-
|
24 |
-
$profileuser = get_user_to_edit($this->userID);
|
25 |
-
|
26 |
-
ob_start();
|
27 |
-
apply_filters( 'show_password_fields', true, $profileuser );
|
28 |
-
$output = ob_get_clean();
|
29 |
-
|
30 |
-
$one = $this->fix_newlines(file_get_contents(dirname(__FILE__).'/testProfileScreen.html')); // this contains user ID of '4'
|
31 |
-
$two = explode("\n",$this->fix_newlines($output));
|
32 |
-
foreach( explode("\n",$one) as $k => $v ) {
|
33 |
-
|
34 |
-
/*if( $v != $two[$k]) {
|
35 |
-
for($i=0;$i<strlen($two[$k]);$i++) {
|
36 |
-
var_dump( $two[$k][$i].' '.ord($two[$k][$i]) );
|
37 |
-
}
|
38 |
-
}*/
|
39 |
-
|
40 |
-
//$this->assertEquals( $v, $two[$k] );
|
41 |
-
}
|
42 |
-
|
43 |
-
$this->assertEquals( $this->fix_newlines(file_get_contents(dirname(__FILE__).'/testProfileScreen.html')), $this->fix_newlines($output) );
|
44 |
-
|
45 |
-
}
|
46 |
-
|
47 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/backend/s3BrowserAjaxTest.php
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-ajax-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_S3BrowserAjaxTestCase extends FV_Player_Ajax_UnitTestCase {
|
10 |
-
|
11 |
-
// we need to make sure FV Player loads as if it's wp-admin
|
12 |
-
public static function wpSetUpBeforeClass() {
|
13 |
-
global $fv_fp;
|
14 |
-
|
15 |
-
$_POST = array (
|
16 |
-
'amazon_bucket' => array(FV_PLAYER_AMAZON_BUCKET),
|
17 |
-
's3_browser' => 1,
|
18 |
-
'fv-wp-flowplayer-submit' => 'Save All Changes'
|
19 |
-
);
|
20 |
-
|
21 |
-
set_current_screen( 'edit-post' );
|
22 |
-
// without this included, fv_wp_flowplayer_delete_extensions_transients() would not be found
|
23 |
-
include_once "../../../fv-wordpress-flowplayer/controller/backend.php";
|
24 |
-
parent::wpSetUpBeforeClass();
|
25 |
-
|
26 |
-
$fv_fp->_set_conf();
|
27 |
-
}
|
28 |
-
|
29 |
-
public function setUp() {
|
30 |
-
parent::setUp();
|
31 |
-
}
|
32 |
-
|
33 |
-
public function testNoSaveForNotLoggedInUsers() {
|
34 |
-
global $fv_fp;
|
35 |
-
|
36 |
-
//$fv_fp->conf['amazon_bucket'] = array(FV_PLAYER_AMAZON_BUCKET);
|
37 |
-
$fv_fp->conf['amazon_region'] = array(FV_PLAYER_AMAZON_REGION);
|
38 |
-
$fv_fp->conf['amazon_key'] = array(FV_PLAYER_AMAZON_ACCESS_KEY);
|
39 |
-
$fv_fp->conf['amazon_secret'] = array(FV_PLAYER_AMAZON_SECRET);
|
40 |
-
|
41 |
-
// is anybody listening out there?
|
42 |
-
$this->assertTrue( has_action('wp_ajax_load_s3_assets') );
|
43 |
-
|
44 |
-
// Spoof the nonce in the POST superglobal
|
45 |
-
//$_POST['_wpnonce'] = wp_create_nonce( 'anything-here-if-needed' );
|
46 |
-
|
47 |
-
// set up POST data for video resume times
|
48 |
-
// $_POST['action'] = 'fv_wp_flowplayer_video_position_save';
|
49 |
-
|
50 |
-
// call the AJAX which
|
51 |
-
try {
|
52 |
-
$this->_handleAjax( 'fv_wp_flowplayer_ajax_load_s3_assets' );
|
53 |
-
} catch ( WPAjaxDieContinueException $e ) {
|
54 |
-
$response = json_decode( $this->_last_response );
|
55 |
-
$this->assertInternalType( 'object', $response );
|
56 |
-
$this->assertObjectHasAttribute( 'success', $response );
|
57 |
-
$this->assertFalse( $response->success );
|
58 |
-
}
|
59 |
-
}
|
60 |
-
|
61 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/backend/settingsTest.php
DELETED
@@ -1,45 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_SettingsTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
// we need to convince it is showing the FV Player settings screen!
|
12 |
-
public static function wpSetUpBeforeClass() {
|
13 |
-
set_current_screen( 'settings_page_fvplayer' );
|
14 |
-
|
15 |
-
parent::wpSetUpBeforeClass();
|
16 |
-
|
17 |
-
remove_action( 'admin_init', 'wp_admin_headers' );
|
18 |
-
do_action( 'admin_init' );
|
19 |
-
}
|
20 |
-
|
21 |
-
public function testSettingsScreen() {
|
22 |
-
|
23 |
-
ob_start();
|
24 |
-
fv_player_admin_page();
|
25 |
-
$output = ob_get_clean();
|
26 |
-
|
27 |
-
$one = $this->fix_newlines(file_get_contents(dirname(__FILE__).'/testSettingsScreen.html'));
|
28 |
-
$two = explode("\n",$this->fix_newlines($output));
|
29 |
-
foreach( explode("\n",$one) as $k => $v ) {
|
30 |
-
|
31 |
-
/*if( $v != $two[$k]) {
|
32 |
-
for($i=0;$i<strlen($two[$k]);$i++) {
|
33 |
-
if( $v[$i] != $two[$k][$i]) {
|
34 |
-
var_dump( $v[$i].' vs '.$two[$k][$i].' '.ord($two[$k][$i]) );
|
35 |
-
}
|
36 |
-
}
|
37 |
-
}*/
|
38 |
-
|
39 |
-
$this->assertEquals( $v, $two[$k] );
|
40 |
-
}
|
41 |
-
|
42 |
-
$this->assertEquals( $this->fix_newlines(file_get_contents(dirname(__FILE__).'/testSettingsScreen.html')), $this->fix_newlines($output) );
|
43 |
-
}
|
44 |
-
|
45 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/backend/testProfileScreen.html
DELETED
@@ -1,54 +0,0 @@
|
|
1 |
-
<tr class="user-videos">
|
2 |
-
<th>Videos</th>
|
3 |
-
<td>
|
4 |
-
<div class="fv-player-custom-video-list"><form method='POST'><div class="fv-player-custom-video"><div class='fv-player-editor-wrapper' data-key='fv-player-editor-field-_fv_player_user_video'>
|
5 |
-
<div class='inside inside-child'>
|
6 |
-
<div class='fv-player-editor-preview'><iframe id='fv_vimeo_40a1ea9c2827d8afc50536475564effe' src='//player.vimeo.com/video/255317467' width='640' height='360' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
7 |
-
</div>
|
8 |
-
<input class='attachement-shortcode fv-player-editor-field' name='fv_player_videos[_fv_player_user_video][]' type='hidden' value='[fvplayer src="https://vimeo.com/255317467" playlist="https://vimeo.com/192934117" caption=";Talking about FV Player"]' />
|
9 |
-
<div class='edit-video' >
|
10 |
-
<button class='button fv-player-editor-button'>Edit Video</button>
|
11 |
-
<button class='button fv-player-editor-remove'>Remove Video</button>
|
12 |
-
<button class='button fv-player-editor-more' style='display:none'>Add Another Video</button>
|
13 |
-
</div>
|
14 |
-
|
15 |
-
<div class='add-video' style="display:none">
|
16 |
-
<button class='button fv-player-editor-button'>Add Video</button>
|
17 |
-
</div>
|
18 |
-
</div>
|
19 |
-
</div><div class='fv-player-editor-wrapper' data-key='fv-player-editor-field-_fv_player_user_video'>
|
20 |
-
<div class='inside inside-child'>
|
21 |
-
<div class='fv-player-editor-preview'><iframe id='fv_vimeo_611247c19e9196fbf9433d589da255e1' src='//player.vimeo.com/video/255370388' width='640' height='360' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
22 |
-
</div>
|
23 |
-
<input class='attachement-shortcode fv-player-editor-field' name='fv_player_videos[_fv_player_user_video][]' type='hidden' value='[fvplayer src="https://vimeo.com/255370388"]' />
|
24 |
-
<div class='edit-video' >
|
25 |
-
<button class='button fv-player-editor-button'>Edit Video</button>
|
26 |
-
<button class='button fv-player-editor-remove'>Remove Video</button>
|
27 |
-
<button class='button fv-player-editor-more' style='display:none'>Add Another Video</button>
|
28 |
-
</div>
|
29 |
-
|
30 |
-
<div class='add-video' style="display:none">
|
31 |
-
<button class='button fv-player-editor-button'>Add Video</button>
|
32 |
-
</div>
|
33 |
-
</div>
|
34 |
-
</div><div class='fv-player-editor-wrapper' data-key='fv-player-editor-field-_fv_player_user_video'>
|
35 |
-
<div class='inside inside-child'>
|
36 |
-
<div class='fv-player-editor-preview'><iframe id='fv_ytplayer_5fc2c295c1c8d43b356a8b8ee0c122ca' type='text/html' width='640' height='360'
|
37 |
-
src='//www.youtube.com/embed/6ZfuNTqbHE8?origin=' frameborder='0' webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
|
38 |
-
]</div>
|
39 |
-
<input class='attachement-shortcode fv-player-editor-field' name='fv_player_videos[_fv_player_user_video][]' type='hidden' value='[fvplayer src="https://www.youtube.com/watch?v=6ZfuNTqbHE8"]]' />
|
40 |
-
<div class='edit-video' >
|
41 |
-
<button class='button fv-player-editor-button'>Edit Video</button>
|
42 |
-
<button class='button fv-player-editor-remove'>Remove Video</button>
|
43 |
-
<button class='button fv-player-editor-more' style='display:none'>Add Another Video</button>
|
44 |
-
</div>
|
45 |
-
|
46 |
-
<div class='add-video' style="display:none">
|
47 |
-
<button class='button fv-player-editor-button'>Add Video</button>
|
48 |
-
</div>
|
49 |
-
</div>
|
50 |
-
</div><div style="clear: both"></div>
|
51 |
-
</div>
|
52 |
-
<input type='hidden' name='fv-player-custom-videos-entity-id[_fv_player_user_video]' value='4' /><input type='hidden' name='fv-player-custom-videos-entity-type[_fv_player_user_video]' value='user' /><input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="0926bc6617" /><input type="hidden" name="_wp_http_referer" value="" /><input type='hidden' name='action' value='fv-player-custom-videos-save' /><input type='submit' value='Save Videos' /></form></div> <p class="description">You can put your Vimeo or YouTube links here. <abbr title="These show up as a part of the user bio. Licensed users get FV Player Pro which embeds these video types in FV Player interface without Vimeo or YouTube interface showing up."><span class="dashicons dashicons-editor-help"></span></abbr></p>
|
53 |
-
</td>
|
54 |
-
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/backend/testSettingsScreen.html
DELETED
@@ -1,2073 +0,0 @@
|
|
1 |
-
<div class="wrap">
|
2 |
-
<div style="position: absolute; margin-top: 10px; right: 10px;">
|
3 |
-
<a href="https://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer" target="_blank" title="Documentation"><img alt="visit foliovision" src="//foliovision.com/shared/fv-logo.png" /></a>
|
4 |
-
</div>
|
5 |
-
<div>
|
6 |
-
<div id="icon-options-general" class="icon32"></div>
|
7 |
-
<h2>FV Player</h2>
|
8 |
-
</div>
|
9 |
-
|
10 |
-
|
11 |
-
<form id="wpfp_options" method="post" action="">
|
12 |
-
|
13 |
-
<p id="fv_flowplayer_admin_buttons">
|
14 |
-
<input type="button" class="button fv-license-inactive" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_license'); return false" value="Apply Pro upgrade" />
|
15 |
-
<input type="button" class="button" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_template'); return false" value="Check template" />
|
16 |
-
<input type="button" class="button" onclick="fv_flowplayer_ajax_check('fv_wp_flowplayer_check_files')" value="Check videos" />
|
17 |
-
|
18 |
-
<input type="text" name="key" id="key" placeholder="Commercial License Key" value="" /> <a title="Click here for license info" target="_blank" href="https://foliovision.com/player/download"><span class="dashicons dashicons-editor-help"></span></a>
|
19 |
-
|
20 |
-
<img class="fv_wp_flowplayer_check_license-spin" style="display: none; " src="http://example.org/wp-includes/images/wpspin.gif" width="16" height="16" />
|
21 |
-
<img class="fv_wp_flowplayer_check_template-spin" style="display: none; " src="http://example.org/wp-includes/images/wpspin.gif" width="16" height="16" />
|
22 |
-
<img class="fv_wp_flowplayer_check_files-spin" style="display: none; " src="http://example.org/wp-includes/images/wpspin.gif" width="16" height="16" />
|
23 |
-
</p>
|
24 |
-
<div id="fv_flowplayer_admin_notices">
|
25 |
-
</div>
|
26 |
-
|
27 |
-
<div id="fv_flowplayer_ad">
|
28 |
-
<div class="text-part">
|
29 |
-
<h2>FV Wordpress<strong>Flowplayer</strong></h2>
|
30 |
-
<span class="red-text">with your own branding</span>
|
31 |
-
<ul>
|
32 |
-
<li>Put up your own logo</li>
|
33 |
-
<li>Or remove the logo completely</li>
|
34 |
-
<li>The best video plugin for Wordpress</li>
|
35 |
-
</ul>
|
36 |
-
<a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download" class="red-button"><strong>Easter sale!</strong><br />All Licenses 20% Off</a></p>
|
37 |
-
</div>
|
38 |
-
<div class="graphic-part">
|
39 |
-
<a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/buy">
|
40 |
-
<img width="297" height="239" border="0" src="http://example.org/wp-content/plugins/fv-wordpress-flowplayer/images/fv-wp-flowplayer-led-monitor.png"> </a>
|
41 |
-
</div>
|
42 |
-
</div>
|
43 |
-
|
44 |
-
<div id="fv_flowplayer_admin_tabs">
|
45 |
-
<h2 class="fv-nav-tab-wrapper nav-tab-wrapper">
|
46 |
-
<a href="#postbox-container-tab_basic" class="nav-tab nav-tab-active" style="outline: 0px;">Setup</a>
|
47 |
-
<a href="#postbox-container-tab_skin" class="nav-tab" style="outline: 0px;">Skin</a>
|
48 |
-
<a href="#postbox-container-tab_hosting" class="nav-tab" style="outline: 0px;">Hosting</a>
|
49 |
-
<a href="#postbox-container-tab_actions" class="nav-tab" style="outline: 0px;">Actions</a>
|
50 |
-
<a href="#postbox-container-tab_video_intelligence" class="nav-tab" style="outline: 0px;">vi Ads</a>
|
51 |
-
<a href="#postbox-container-tab_help" class="nav-tab" style="outline: 0px;">Help</a>
|
52 |
-
<div id="fv_player_js_warning" style=" margin: 8px 40px; display: inline-block; color: darkgrey;" >There Is a Problem with JavaScript.</div>
|
53 |
-
</h2>
|
54 |
-
</div>
|
55 |
-
|
56 |
-
<div id="dashboard-widgets" class="metabox-holder fv-metabox-holder columns-1">
|
57 |
-
<div id='postbox-container-tab_basic' class='postbox-container'>
|
58 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_description" class="postbox " >
|
59 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: </span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span> </span></h2>
|
60 |
-
<div class="inside">
|
61 |
-
<table class="form-table">
|
62 |
-
<tr>
|
63 |
-
<td colspan="4">
|
64 |
-
<p>
|
65 |
-
FV Player is a free, easy-to-use, and complete solution for embedding <strong>MP4</strong>, <strong>WEBM</strong>, <strong>OGV</strong>, <strong>MOV</strong>
|
66 |
-
and <strong>FLV</strong>
|
67 |
-
videos into your posts or pages. With MP4 videos, FV Player offers 98% coverage even on mobile devices. </p>
|
68 |
-
</td>
|
69 |
-
</tr>
|
70 |
-
</table>
|
71 |
-
</div>
|
72 |
-
</div>
|
73 |
-
<div id="fv_flowplayer_interface_options" class="postbox " >
|
74 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Post Interface Options</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Post Interface Options</span></h2>
|
75 |
-
<div class="inside">
|
76 |
-
<p>Which features should be available in shortcode editor?</p>
|
77 |
-
<table class="form-table2">
|
78 |
-
<tr>
|
79 |
-
<td class="first"><label for="interface[ads]">Ads:</label></td>
|
80 |
-
<td>
|
81 |
-
<p class="description">
|
82 |
-
<input type="hidden" name="interface[ads]" value="false"/>
|
83 |
-
<input type="checkbox" name="interface[ads]" id="interface[ads]" value="true" />
|
84 |
-
</p>
|
85 |
-
</td>
|
86 |
-
</tr>
|
87 |
-
<tr>
|
88 |
-
<td class="first"><label for="interface[align]">Align:</label></td>
|
89 |
-
<td>
|
90 |
-
<p class="description">
|
91 |
-
<input type="hidden" name="interface[align]" value="false"/>
|
92 |
-
<input type="checkbox" name="interface[align]" id="interface[align]" value="true" />
|
93 |
-
</p>
|
94 |
-
</td>
|
95 |
-
</tr>
|
96 |
-
<tr>
|
97 |
-
<td class="first"><label for="allowuploads">Allow Video Uploads:</label></td>
|
98 |
-
<td>
|
99 |
-
<p class="description">
|
100 |
-
<input type="hidden" name="allowuploads" value="false"/>
|
101 |
-
<input type="checkbox" name="allowuploads" id="allowuploads" value="true" checked="checked" />
|
102 |
-
Enables the WP Media Library integraton if you want to host videos on your own server </p>
|
103 |
-
</td>
|
104 |
-
</tr>
|
105 |
-
<tr>
|
106 |
-
<td class="first"><label for="interface[autoplay]">Autoplay:</label></td>
|
107 |
-
<td>
|
108 |
-
<p class="description">
|
109 |
-
<input type="hidden" name="interface[autoplay]" value="false"/>
|
110 |
-
<input type="checkbox" name="interface[autoplay]" id="interface[autoplay]" value="true" />
|
111 |
-
</p>
|
112 |
-
</td>
|
113 |
-
</tr>
|
114 |
-
<tr>
|
115 |
-
<td class="first"><label for="interface[controlbar]">Controlbar:</label></td>
|
116 |
-
<td>
|
117 |
-
<p class="description">
|
118 |
-
<input type="hidden" name="interface[controlbar]" value="false"/>
|
119 |
-
<input type="checkbox" name="interface[controlbar]" id="interface[controlbar]" value="true" />
|
120 |
-
</p>
|
121 |
-
</td>
|
122 |
-
</tr>
|
123 |
-
<tr>
|
124 |
-
<td class="first"><label for="interface[embed]">Embed:</label></td>
|
125 |
-
<td>
|
126 |
-
<p class="description">
|
127 |
-
<input type="hidden" name="interface[embed]" value="false"/>
|
128 |
-
<input type="checkbox" name="interface[embed]" id="interface[embed]" value="true" />
|
129 |
-
</p>
|
130 |
-
</td>
|
131 |
-
</tr>
|
132 |
-
<tr>
|
133 |
-
<td class="first"><label for="interface[live]">Live Stream:</label></td>
|
134 |
-
<td>
|
135 |
-
<p class="description">
|
136 |
-
<input type="hidden" name="interface[live]" value="false"/>
|
137 |
-
<input type="checkbox" name="interface[live]" id="interface[live]" value="true" />
|
138 |
-
</p>
|
139 |
-
</td>
|
140 |
-
</tr>
|
141 |
-
<tr>
|
142 |
-
<td class="first"><label for="interface[mobile]">Mobile Video:</label></td>
|
143 |
-
<td>
|
144 |
-
<p class="description">
|
145 |
-
<input type="hidden" name="interface[mobile]" value="false"/>
|
146 |
-
<input type="checkbox" name="interface[mobile]" id="interface[mobile]" value="true" />
|
147 |
-
</p>
|
148 |
-
</td>
|
149 |
-
</tr>
|
150 |
-
<tr>
|
151 |
-
<td class="first"><label for="interface[playlist_advance]">Playlist Auto Advance:</label></td>
|
152 |
-
<td>
|
153 |
-
<p class="description">
|
154 |
-
<input type="hidden" name="interface[playlist_advance]" value="false"/>
|
155 |
-
<input type="checkbox" name="interface[playlist_advance]" id="interface[playlist_advance]" value="true" />
|
156 |
-
</p>
|
157 |
-
</td>
|
158 |
-
</tr>
|
159 |
-
<tr>
|
160 |
-
<td class="first"><label for="interface[playlist]">Playlist Style:</label></td>
|
161 |
-
<td>
|
162 |
-
<p class="description">
|
163 |
-
<input type="hidden" name="interface[playlist]" value="false"/>
|
164 |
-
<input type="checkbox" name="interface[playlist]" id="interface[playlist]" value="true" />
|
165 |
-
</p>
|
166 |
-
</td>
|
167 |
-
</tr>
|
168 |
-
<tr>
|
169 |
-
<td class="first"><label for="interface[playlist_captions]">Playlist Captions:</label></td>
|
170 |
-
<td>
|
171 |
-
<p class="description">
|
172 |
-
<input type="hidden" name="interface[playlist_captions]" value="false"/>
|
173 |
-
<input type="checkbox" name="interface[playlist_captions]" id="interface[playlist_captions]" value="true" />
|
174 |
-
</p>
|
175 |
-
</td>
|
176 |
-
</tr>
|
177 |
-
<tr>
|
178 |
-
<td class="first"><label for="interface[share]">Sharing Buttons:</label></td>
|
179 |
-
<td>
|
180 |
-
<p class="description">
|
181 |
-
<input type="hidden" name="interface[share]" value="false"/>
|
182 |
-
<input type="checkbox" name="interface[share]" id="interface[share]" value="true" />
|
183 |
-
</p>
|
184 |
-
</td>
|
185 |
-
</tr>
|
186 |
-
<tr>
|
187 |
-
<td class="first"><label for="interface[speed]">Speed Buttons:</label></td>
|
188 |
-
<td>
|
189 |
-
<p class="description">
|
190 |
-
<input type="hidden" name="interface[speed]" value="false"/>
|
191 |
-
<input type="checkbox" name="interface[speed]" id="interface[speed]" value="true" />
|
192 |
-
</p>
|
193 |
-
</td>
|
194 |
-
</tr>
|
195 |
-
<tr>
|
196 |
-
<td class="first"><label for="interface[splash_text]">Splash Text:</label></td>
|
197 |
-
<td>
|
198 |
-
<p class="description">
|
199 |
-
<input type="hidden" name="interface[splash_text]" value="false"/>
|
200 |
-
<input type="checkbox" name="interface[splash_text]" id="interface[splash_text]" value="true" />
|
201 |
-
</p>
|
202 |
-
</td>
|
203 |
-
</tr>
|
204 |
-
<tr>
|
205 |
-
<td class="first"><label for="interface[subtitles]">Subtitles:</label></td>
|
206 |
-
<td>
|
207 |
-
<p class="description">
|
208 |
-
<input type="hidden" name="interface[subtitles]" value="false"/>
|
209 |
-
<input type="checkbox" name="interface[subtitles]" id="interface[subtitles]" value="true" />
|
210 |
-
</p>
|
211 |
-
</td>
|
212 |
-
</tr>
|
213 |
-
<tr>
|
214 |
-
<td class="first"><label for="interface[sticky]">Sticky:</label></td>
|
215 |
-
<td>
|
216 |
-
<p class="description">
|
217 |
-
<input type="hidden" name="interface[sticky]" value="false"/>
|
218 |
-
<input type="checkbox" name="interface[sticky]" id="interface[sticky]" value="true" />
|
219 |
-
</p>
|
220 |
-
</td>
|
221 |
-
</tr>
|
222 |
-
<tr>
|
223 |
-
<td class="first"><label for="interface[end_actions]">Video Actions:</label></td>
|
224 |
-
<td>
|
225 |
-
<p class="description">
|
226 |
-
<input type="hidden" name="interface[end_actions]" value="false"/>
|
227 |
-
<input type="checkbox" name="interface[end_actions]" id="interface[end_actions]" value="true" />
|
228 |
-
Enables end of playlist actions like Loop, Redirect, Show popup and Show splash screen </p>
|
229 |
-
</td>
|
230 |
-
</tr>
|
231 |
-
|
232 |
-
<tr>
|
233 |
-
<td class="first"><label for="interface[lightbox]">Enable video lightbox:</label></td>
|
234 |
-
<td>
|
235 |
-
<p class="description">
|
236 |
-
<input type="hidden" name="interface[lightbox]" value="false"/>
|
237 |
-
<input type="checkbox" name="interface[lightbox]" id="interface[lightbox]" value="true" />
|
238 |
-
You can also put in <code><a href="http://path.to.your/video.mp4" class="colorbox">Your link title</a></code> for a quick lightboxed video. </p>
|
239 |
-
</td>
|
240 |
-
</tr>
|
241 |
-
|
242 |
-
<tr>
|
243 |
-
<td class="first"><label for="interface[shortcode_editor_old]">Enable old interface:</label></td>
|
244 |
-
<td>
|
245 |
-
<p class="description">
|
246 |
-
<input type="hidden" name="interface[shortcode_editor_old]" value="false"/>
|
247 |
-
<input type="checkbox" name="interface[shortcode_editor_old]" id="interface[shortcode_editor_old]" value="true" />
|
248 |
-
Not recommended </p>
|
249 |
-
</td>
|
250 |
-
</tr>
|
251 |
-
|
252 |
-
<tr>
|
253 |
-
<td colspan="4">
|
254 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
255 |
-
</td>
|
256 |
-
</tr>
|
257 |
-
</table>
|
258 |
-
</div>
|
259 |
-
</div>
|
260 |
-
<div id="fv_flowplayer_default_options" class="postbox " >
|
261 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Sitewide FV Player Defaults</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Sitewide FV Player Defaults</span></h2>
|
262 |
-
<div class="inside">
|
263 |
-
<style>
|
264 |
-
p.description { font-style: normal; }
|
265 |
-
</style>
|
266 |
-
<table class="form-table2">
|
267 |
-
|
268 |
-
<tr>
|
269 |
-
<td class="first"><label for="autoplay">Autoplay:</label></td>
|
270 |
-
<td>
|
271 |
-
<p class="description">
|
272 |
-
<input type="hidden" name="autoplay" value="false"/>
|
273 |
-
<input type="checkbox" name="autoplay" id="autoplay" value="true" />
|
274 |
-
We make sure only one video per page autoplays. Note that mobile devices don't support autoplay. </p>
|
275 |
-
</td>
|
276 |
-
</tr>
|
277 |
-
<tr>
|
278 |
-
<td class="first"><label for="auto_buffering">Auto Buffering:</label></td>
|
279 |
-
<td>
|
280 |
-
<p class="description">
|
281 |
-
<input type="hidden" name="auto_buffering" value="false"/>
|
282 |
-
<input type="checkbox" name="auto_buffering" id="auto_buffering" value="true" />
|
283 |
-
Works for first 2 videos on the page only, to preserve your bandwidth. </p>
|
284 |
-
</td>
|
285 |
-
</tr>
|
286 |
-
|
287 |
-
<tr>
|
288 |
-
<td><label for="width">Default Video Size:</label></td>
|
289 |
-
<td>
|
290 |
-
<p class="description">
|
291 |
-
<label for="width">Width:</label> <input type="text" class="small" name="width" id="width" value="640" />
|
292 |
-
<label for="height">Height:</label> <input type="text" class="small" name="height" id="height" value="360" />
|
293 |
-
Enter values in pixels or 100%. </p>
|
294 |
-
</td>
|
295 |
-
</tr>
|
296 |
-
<tr>
|
297 |
-
<td><label for="volume">Default Volume:</label></td>
|
298 |
-
<td>
|
299 |
-
<p class="description">
|
300 |
-
<input id="volume" name="volume" type="range" min="0" max="1" step="0.1" value="0.7" class="medium" />
|
301 |
-
</p>
|
302 |
-
</td>
|
303 |
-
</tr>
|
304 |
-
|
305 |
-
<tr>
|
306 |
-
<td class="first"><label for="disable_videochecker">Disable Admin Video Checker:</label></td>
|
307 |
-
<td>
|
308 |
-
<p class="description">
|
309 |
-
<input type="hidden" name="disable_videochecker" value="false"/>
|
310 |
-
<input type="checkbox" name="disable_videochecker" id="disable_videochecker" value="true" />
|
311 |
-
Checks your video encoding when you open a post with video as admin. Notifies you about possible playback issues. </p>
|
312 |
-
</td>
|
313 |
-
</tr>
|
314 |
-
<tr>
|
315 |
-
<td class="first"><label for="disableembedding">Disable Embed Button:</label></td>
|
316 |
-
<td>
|
317 |
-
<p class="description">
|
318 |
-
<input type="hidden" name="disableembedding" value="false"/>
|
319 |
-
<input type="checkbox" name="disableembedding" id="disableembedding" value="true" />
|
320 |
-
Removes embed button from top bar. </p>
|
321 |
-
</td>
|
322 |
-
</tr>
|
323 |
-
<tr>
|
324 |
-
<td class="first"><label for="playlist_advance">Disable Playlist Autoadvance:</label></td>
|
325 |
-
<td>
|
326 |
-
<p class="description">
|
327 |
-
<input type="hidden" name="playlist_advance" value="false"/>
|
328 |
-
<input type="checkbox" name="playlist_advance" id="playlist_advance" value="true" />
|
329 |
-
Playlist won't play the next video automatically. </p>
|
330 |
-
</td>
|
331 |
-
</tr>
|
332 |
-
<tr>
|
333 |
-
<td class="first"><label for="disablesharing">Disable Sharing:</label></td>
|
334 |
-
<td>
|
335 |
-
<p class="description">
|
336 |
-
<input type="hidden" name="disablesharing" value="false"/>
|
337 |
-
<input type="checkbox" name="disablesharing" id="disablesharing" value="true" />
|
338 |
-
Removes sharing buttons from top bar. </p>
|
339 |
-
</td>
|
340 |
-
</tr>
|
341 |
-
<tr>
|
342 |
-
<td class="first"><label for="disable_video_hash_links">Disable Video Links:</label></td>
|
343 |
-
<td>
|
344 |
-
<p class="description">
|
345 |
-
<input type="hidden" name="disable_video_hash_links" value="false"/>
|
346 |
-
<input type="checkbox" name="disable_video_hash_links" id="disable_video_hash_links" value="true" />
|
347 |
-
Removes the "Link" item to the top bar. <span class="more">Clicking the video Link gives your visitors a link to the exact place in the video they are watching. If the post access is restricted, it won't make the video open to public.</span> <a href="#" class="show-more">(…)</a>
|
348 |
-
</p>
|
349 |
-
</td>
|
350 |
-
</tr>
|
351 |
-
|
352 |
-
<tr>
|
353 |
-
<td><label for="rtmp">Flash Streaming Server:</label></td>
|
354 |
-
<td>
|
355 |
-
<p class="description">
|
356 |
-
<input type="text" name="rtmp" id="rtmp" value="" placeholder="Enter your default RTMP streaming server (Amazon CloudFront domain)." />
|
357 |
-
</p>
|
358 |
-
</td>
|
359 |
-
</tr>
|
360 |
-
|
361 |
-
<tr>
|
362 |
-
<td class="first"><label for="allowfullscreen">Fullscreen Button:</label></td>
|
363 |
-
<td>
|
364 |
-
<p class="description">
|
365 |
-
<input type="hidden" name="allowfullscreen" value="false"/>
|
366 |
-
<input type="checkbox" name="allowfullscreen" id="allowfullscreen" value="true" checked="checked" />
|
367 |
-
Adds fullscreen button to player top bar. </p>
|
368 |
-
</td>
|
369 |
-
</tr>
|
370 |
-
|
371 |
-
<tr>
|
372 |
-
<td><label for="googleanalytics">Google Analytics ID:</label></td>
|
373 |
-
<td>
|
374 |
-
<p class="description">
|
375 |
-
<input type="text" name="googleanalytics" id="googleanalytics" value="" placeholder="Will be automatically loaded when playing a video." />
|
376 |
-
</p>
|
377 |
-
</td>
|
378 |
-
</tr>
|
379 |
-
<tr>
|
380 |
-
<td><label for="logo">Logo:</label></td>
|
381 |
-
<td>
|
382 |
-
<input type="text" name="logo" id="logo" value="" class="large" placeholder="You need to have a FV Flowplayer license to use it" />
|
383 |
-
|
384 |
-
<input id="upload_image_button" class="upload_image_button button no-margin small" type="button" value="Upload Image" alt="Select Logo" />
|
385 |
-
|
386 |
-
<select name="logoPosition" class="small">
|
387 |
-
<option value="bottom-left">Position</option>
|
388 |
-
<option selected value="bottom-left">Bottom-left</option>
|
389 |
-
<option value="bottom-right">Bottom-right</option>
|
390 |
-
<option value="top-left">Top-left</option>
|
391 |
-
<option value="top-right">Top-right</option>
|
392 |
-
</select>
|
393 |
-
</td>
|
394 |
-
</tr>
|
395 |
-
|
396 |
-
<tr>
|
397 |
-
<td class="first"><label for="ui_play_button">Play Button:</label></td>
|
398 |
-
<td>
|
399 |
-
<p class="description">
|
400 |
-
<input type="hidden" name="ui_play_button" value="false"/>
|
401 |
-
<input type="checkbox" name="ui_play_button" id="ui_play_button" value="true" checked="checked" />
|
402 |
-
Adds play button to player controlbar. </p>
|
403 |
-
</td>
|
404 |
-
</tr>
|
405 |
-
|
406 |
-
<tr>
|
407 |
-
<td><label for="liststyle">Playlist style:</label></td>
|
408 |
-
<td colspan="3">
|
409 |
-
<p class="description">
|
410 |
-
<select id="liststyle" name="liststyle">
|
411 |
-
<option value="horizontal" selected="selected" >Horizontal</option>
|
412 |
-
<option value="tabs" >Tabs</option>
|
413 |
-
<option value="prevnext" >Prev/Next</option>
|
414 |
-
<option value="vertical" >Vertical</option>
|
415 |
-
<option value="slider" >Slider</option>
|
416 |
-
</select>
|
417 |
-
Enter your default playlist style here </p>
|
418 |
-
</td>
|
419 |
-
</tr>
|
420 |
-
|
421 |
-
<tr>
|
422 |
-
<td class="first"><label for="popupbox">Popup Box:</label></td>
|
423 |
-
<td>
|
424 |
-
<p class="description">
|
425 |
-
<input type="hidden" name="popupbox" value="false"/>
|
426 |
-
<input type="checkbox" name="popupbox" id="popupbox" value="true" />
|
427 |
-
Shows a generic "Would you like to replay the video?" message at the end of each video. </p>
|
428 |
-
</td>
|
429 |
-
</tr>
|
430 |
-
|
431 |
-
<tr>
|
432 |
-
<td><label for="sharing_text">Sharing Text:</label></td>
|
433 |
-
<td>
|
434 |
-
<p class="description">
|
435 |
-
<input type="text" name="sharing_email_text" id="sharing_email_text" value="Check out the amazing video here" placeholder="Check out the amazing video here" />
|
436 |
-
</p>
|
437 |
-
</td>
|
438 |
-
</tr>
|
439 |
-
|
440 |
-
<tr>
|
441 |
-
<td class="first"><label for="ui_speed">Speed Buttons:</label></td>
|
442 |
-
<td>
|
443 |
-
<p class="description">
|
444 |
-
<input type="hidden" name="ui_speed" value="false"/>
|
445 |
-
<input type="checkbox" name="ui_speed" id="ui_speed" value="true" />
|
446 |
-
Speed buttons control playback speed and only work in HTML5 compatible browsers. </p>
|
447 |
-
</td>
|
448 |
-
</tr>
|
449 |
-
|
450 |
-
<tr>
|
451 |
-
<td><label for="ui_speed_increment">Speed Step:</label></td>
|
452 |
-
<td colspan="3">
|
453 |
-
<p class="description">
|
454 |
-
<select id="ui_speed_increment" name="ui_speed_increment">
|
455 |
-
<option value="0.1" >0.1</option>
|
456 |
-
<option value="0.25" selected="selected" >0.25</option>
|
457 |
-
<option value="0.5" >0.5</option>
|
458 |
-
</select>
|
459 |
-
Speed buttons will increase or decrease the speed in steps of selected value </p>
|
460 |
-
</td>
|
461 |
-
</tr>
|
462 |
-
<tr>
|
463 |
-
<td><label for="splash">Splash Image:</label></td>
|
464 |
-
<td>
|
465 |
-
<input type="text" name="splash" id="splash" value="" class="large" placeholder="Default which will be used for any player without its own splash image." />
|
466 |
-
<input id="upload_image_button" class="upload_image_button button no-margin small" type="button" value="Upload Image" alt="Select default Splash Screen" /></td>
|
467 |
-
</tr>
|
468 |
-
|
469 |
-
<tr>
|
470 |
-
<td class="first"><label for="subtitleOn">Subtitles On By Default:</label></td>
|
471 |
-
<td>
|
472 |
-
<p class="description">
|
473 |
-
<input type="hidden" name="subtitleOn" value="false"/>
|
474 |
-
<input type="checkbox" name="subtitleOn" id="subtitleOn" value="true" />
|
475 |
-
Normally you have to hit a button in controlbar to turn on subtitles. </p>
|
476 |
-
</td>
|
477 |
-
</tr>
|
478 |
-
|
479 |
-
<tr>
|
480 |
-
<td style="width: 250px"><label for="lightbox_images">Use video lightbox for images as well:</label></td>
|
481 |
-
<td>
|
482 |
-
<p class="description">
|
483 |
-
<input type="hidden" value="false" name="lightbox_images" />
|
484 |
-
<input type="checkbox" value="true" name="lightbox_images" id="lightbox_images" />
|
485 |
-
Will group images as well as videos into the same lightbox gallery. Turn <strong>off</strong> your lightbox plugin when using this. <span class="more">Also works with WordPress <code>[gallery]</code> galleries - these are automatically switched to link to image URLs rather than the attachment pages.</span> <a href="#" class="show-more">(…)</a>
|
486 |
-
</p>
|
487 |
-
</td>
|
488 |
-
</tr>
|
489 |
-
<tr id="lightbox-wp-galleries">
|
490 |
-
<td style="width: 250px"><label for="lightbox_improve_galleries">Use video lightbox for WP Galleries:</label></td>
|
491 |
-
<td>
|
492 |
-
<p class="description">
|
493 |
-
<input type="hidden" value="false" name="lightbox_improve_galleries" />
|
494 |
-
<input type="checkbox" value="true" name="lightbox_improve_galleries" id="lightbox_improve_galleries" />
|
495 |
-
Your gallery items will link to image files directly to allow this. </p>
|
496 |
-
</td>
|
497 |
-
</tr>
|
498 |
-
<script>
|
499 |
-
jQuery(document).ready(function(){
|
500 |
-
jQuery('[name="pro[interface][lightbox]"]').parents('td').replaceWith('<td><p>Setting <a href="#interface[live]">moved</a></p></td>');
|
501 |
-
jQuery('[name="pro[lightbox_images]"]').parents('td').replaceWith('<td><p>Setting <a href="#subtitleOn">moved</a></p></td>');
|
502 |
-
var lightbox_images = jQuery('#lightbox_images');
|
503 |
-
if(lightbox_images.attr('checked')){
|
504 |
-
jQuery('#lightbox-wp-galleries').show();
|
505 |
-
}else{
|
506 |
-
jQuery('#lightbox-wp-galleries').hide();
|
507 |
-
}
|
508 |
-
lightbox_images.on('click',function(){
|
509 |
-
if(jQuery(this).attr('checked')){
|
510 |
-
jQuery('#lightbox-wp-galleries').show();
|
511 |
-
}else{
|
512 |
-
jQuery('#lightbox-wp-galleries').hide();
|
513 |
-
}
|
514 |
-
})
|
515 |
-
})
|
516 |
-
</script>
|
517 |
-
<tr>
|
518 |
-
<td class="first"><label for="video_position_save_enable">Remember video position:</label></td>
|
519 |
-
<td>
|
520 |
-
<p class="description">
|
521 |
-
<input type="hidden" name="video_position_save_enable" value="false"/>
|
522 |
-
<input type="checkbox" name="video_position_save_enable" id="video_position_save_enable" value="true" />
|
523 |
-
Stores the last video play position for users, so they can continue watching from where they left. <span class="more">It stored in usermeta for logged in users and in a localStorage or cookie for guest users.</span> <a href="#" class="show-more">(…)</a>
|
524 |
-
</p>
|
525 |
-
</td>
|
526 |
-
</tr>
|
527 |
-
</table>
|
528 |
-
<small class="alignright">
|
529 |
-
Missing settings? Check <a class="fv-settings-anchor" href="#fv_flowplayer_integrations">Integrations/Compatbility</a> box below. </small>
|
530 |
-
<table class="form-table2">
|
531 |
-
<tr>
|
532 |
-
<td colspan="4">
|
533 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
534 |
-
</td>
|
535 |
-
</tr>
|
536 |
-
</table>
|
537 |
-
<script>
|
538 |
-
jQuery(document).ready(function($) {
|
539 |
-
var fv_flowplayer_uploader;
|
540 |
-
var fv_flowplayer_uploader_button;
|
541 |
-
|
542 |
-
$(document).on( 'click', '.upload_image_button', function(e) {
|
543 |
-
e.preventDefault();
|
544 |
-
|
545 |
-
fv_flowplayer_uploader_button = jQuery(this);
|
546 |
-
jQuery('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
|
547 |
-
fv_flowplayer_uploader_button.parents('tr').find('input[type=text]').addClass('fv_flowplayer_target' );
|
548 |
-
|
549 |
-
//If the uploader object has already been created, reopen the dialog
|
550 |
-
if (fv_flowplayer_uploader) {
|
551 |
-
fv_flowplayer_uploader.open();
|
552 |
-
return;
|
553 |
-
}
|
554 |
-
|
555 |
-
//Extend the wp.media object
|
556 |
-
fv_flowplayer_uploader = wp.media.frames.file_frame = wp.media({
|
557 |
-
title: 'Pick the image',
|
558 |
-
button: {
|
559 |
-
text: 'Choose'
|
560 |
-
},
|
561 |
-
multiple: false
|
562 |
-
});
|
563 |
-
|
564 |
-
fv_flowplayer_uploader.on('open', function() {
|
565 |
-
jQuery('.media-frame-title h1').text(fv_flowplayer_uploader_button.attr('alt'));
|
566 |
-
});
|
567 |
-
|
568 |
-
//When a file is selected, grab the URL and set it as the text field's value
|
569 |
-
fv_flowplayer_uploader.on('select', function() {
|
570 |
-
attachment = fv_flowplayer_uploader.state().get('selection').first().toJSON();
|
571 |
-
|
572 |
-
$('.fv_flowplayer_target').val(attachment.url);
|
573 |
-
$('.fv_flowplayer_target').removeClass('fv_flowplayer_target' );
|
574 |
-
|
575 |
-
/*if( attachment.type == 'video' ) {
|
576 |
-
if( typeof(attachment.width) != "undefined" && attachment.width > 0 ) {
|
577 |
-
$('#fv_wp_flowplayer_field_width').val(attachment.width);
|
578 |
-
}
|
579 |
-
if( typeof(attachment.height) != "undefined" && attachment.height > 0 ) {
|
580 |
-
$('#fv_wp_flowplayer_field_height').val(attachment.height);
|
581 |
-
}
|
582 |
-
if( typeof(attachment.fileLength) != "undefined" ) {
|
583 |
-
$('#fv_wp_flowplayer_file_info').show();
|
584 |
-
$('#fv_wp_flowplayer_file_duration').html(attachment.fileLength);
|
585 |
-
}
|
586 |
-
if( typeof(attachment.filesizeHumanReadable) != "undefined" ) {
|
587 |
-
$('#fv_wp_flowplayer_file_info').show();
|
588 |
-
$('#fv_wp_flowplayer_file_size').html(attachment.filesizeHumanReadable);
|
589 |
-
}
|
590 |
-
|
591 |
-
} else if( attachment.type == 'image' && typeof(fv_flowplayer_set_post_thumbnail_id) != "undefined" ) {
|
592 |
-
if( jQuery('#remove-post-thumbnail').length > 0 ){
|
593 |
-
return;
|
594 |
-
}
|
595 |
-
jQuery.post(ajaxurl, {
|
596 |
-
action:"set-post-thumbnail",
|
597 |
-
post_id: fv_flowplayer_set_post_thumbnail_id,
|
598 |
-
thumbnail_id: attachment.id,
|
599 |
-
_ajax_nonce: fv_flowplayer_set_post_thumbnail_nonce,
|
600 |
-
cookie: encodeURIComponent(document.cookie)
|
601 |
-
}, function(str){
|
602 |
-
var win = window.dialogArguments || opener || parent || top;
|
603 |
-
if ( str == '0' ) {
|
604 |
-
alert( setPostThumbnailL10n.error );
|
605 |
-
} else {
|
606 |
-
jQuery('#postimagediv .inside').html(str);
|
607 |
-
jQuery('#postimagediv .inside #plupload-upload-ui').hide();
|
608 |
-
}
|
609 |
-
} );
|
610 |
-
|
611 |
-
}*/
|
612 |
-
|
613 |
-
});
|
614 |
-
|
615 |
-
//Open the uploader dialog
|
616 |
-
fv_flowplayer_uploader.open();
|
617 |
-
|
618 |
-
});
|
619 |
-
|
620 |
-
});
|
621 |
-
</script>
|
622 |
-
<div class="clear"></div>
|
623 |
-
</div>
|
624 |
-
</div>
|
625 |
-
<div id="fv_flowplayer_integrations" class="postbox " >
|
626 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Integrations/Compatibility</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Integrations/Compatibility</span></h2>
|
627 |
-
<div class="inside">
|
628 |
-
<p>Following options are suitable for web developers and programmers.</p>
|
629 |
-
<table class="form-table2">
|
630 |
-
|
631 |
-
<tr>
|
632 |
-
<td class="first"><label for="fixed_size">Always use fixed size player:</label></td>
|
633 |
-
<td>
|
634 |
-
<p class="description">
|
635 |
-
<input type="hidden" name="fixed_size" value="false"/>
|
636 |
-
<input type="checkbox" name="fixed_size" id="fixed_size" value="true" />
|
637 |
-
Enable to force video size at cost of loosing the video responsiveness. </p>
|
638 |
-
</td>
|
639 |
-
</tr>
|
640 |
-
<tr>
|
641 |
-
<td class="first"><label for="css_disable">Disable saving skin CSS to a static file:</label></td>
|
642 |
-
<td>
|
643 |
-
<p class="description">
|
644 |
-
<input type="hidden" name="css_disable" value="false"/>
|
645 |
-
<input type="checkbox" name="css_disable" id="css_disable" value="true" />
|
646 |
-
Normally the player CSS configuration is stored in wp-content/fv-player-custom/style-{blog_id}.css. <span class="more">We do this to avoid a big style tag in your site <head>. Don't edit this file though, as it will be overwritten by plugin update or saving its options!</span> <a href="#" class="show-more">(…)</a>
|
647 |
-
</p>
|
648 |
-
</td>
|
649 |
-
</tr>
|
650 |
-
<tr>
|
651 |
-
<td class="first"><label for="hlsjs">Enable HLS.js:</label></td>
|
652 |
-
<td>
|
653 |
-
<p class="description">
|
654 |
-
<input type="hidden" name="hlsjs" value="false"/>
|
655 |
-
<input type="checkbox" name="hlsjs" id="hlsjs" value="true" checked="checked" />
|
656 |
-
Allows HLS playback in all modern browsers. <span class="more">HLS normally plays only on iOS, Mac Safari and new Android versions. FV Player increases the compatibility by using Flash engine for HLS. With this option you can go even further and modern browsers supporting MediaSource will play HLS even without Flash. Make sure you setup the required CORS headers.</span> <a href="#" class="show-more">(…)</a>
|
657 |
-
</p>
|
658 |
-
</td>
|
659 |
-
</tr>
|
660 |
-
|
661 |
-
<tr>
|
662 |
-
<td><label for="css_disable">Enable profile videos:</label></td>
|
663 |
-
<td>
|
664 |
-
<div class="description">
|
665 |
-
<input type="hidden" name="profile_videos_enable_bio" value="false" />
|
666 |
-
<input type="checkbox" name="profile_videos_enable_bio" id="profile_videos_enable_bio" value="true" />
|
667 |
-
Check your site carefully after enabling. Videos attached to the user profile will be showing as a part of the user bio. <a href="#" class="show-more">(…)</a>
|
668 |
-
<div class="more">
|
669 |
-
<p>This feature is designed for YouTube and Vimeo videos and works best for our licensed users who get these videos playing without YouTube or Vimeo branding.</p>
|
670 |
-
<p>Some themes show author bio on the author post archive automatically (Genesis framework and others). Or you can also just put this code into your theme archive.php template, right before <code>while ( have_posts() )</code> is called:</p>
|
671 |
-
<blockquote>
|
672 |
-
<pre>
|
673 |
-
<?php if ( is_author() && get_the_author_meta( 'description' ) ) : ?>
|
674 |
-
<div class="author-info">
|
675 |
-
<div class="author-avatar">
|
676 |
-
<?php echo get_avatar( get_the_author_meta( 'user_email' ) ); ?>
|
677 |
-
</div>
|
678 |
-
|
679 |
-
<div class="author-description">
|
680 |
-
<?php the_author_meta( 'description' ); ?>
|
681 |
-
</div>
|
682 |
-
</div>
|
683 |
-
<?php endif; ?>
|
684 |
-
</pre>
|
685 |
-
</blockquote>
|
686 |
-
<p>We will be adding integration for it for popular user profile plugins.</p>
|
687 |
-
|
688 |
-
</div>
|
689 |
-
</div>
|
690 |
-
</td>
|
691 |
-
</tr>
|
692 |
-
|
693 |
-
<tr>
|
694 |
-
<td class="first"><label for="integrations[wp_core_video]">Handle WordPress <code><small>[video]</small></code> shortcodes:</label></td>
|
695 |
-
<td>
|
696 |
-
<p class="description">
|
697 |
-
<input type="hidden" name="integrations[wp_core_video]" value="false"/>
|
698 |
-
<input type="checkbox" name="integrations[wp_core_video]" id="integrations[wp_core_video]" value="true" />
|
699 |
-
...and also the YouTube links </p>
|
700 |
-
</td>
|
701 |
-
</tr>
|
702 |
-
<tr>
|
703 |
-
<td class="first"><label for="js-everywhere">Load FV Flowplayer JS everywhere:</label></td>
|
704 |
-
<td>
|
705 |
-
<p class="description">
|
706 |
-
<input type="hidden" name="js-everywhere" value="false"/>
|
707 |
-
<input type="checkbox" name="js-everywhere" id="js-everywhere" value="true" />
|
708 |
-
If you use some special JavaScript integration you might prefer this option. <span class="more">Otherwise our JavaScript only loads if the shortcode is found in any of the posts being currently displayed.</span> <a href="#" class="show-more">(…)</a>
|
709 |
-
</p>
|
710 |
-
</td>
|
711 |
-
</tr>
|
712 |
-
<tr>
|
713 |
-
<td class="first"><label for="parse_comments">Parse Vimeo and YouTube links:</label></td>
|
714 |
-
<td>
|
715 |
-
<p class="description">
|
716 |
-
<input type="hidden" name="parse_comments" value="false"/>
|
717 |
-
<input type="checkbox" name="parse_comments" id="parse_comments" value="true" />
|
718 |
-
Affects comments, bbPress and BuddyPress. These links will be displayed as videos. <span class="more">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.</span> <a href="#" class="show-more">(…)</a>
|
719 |
-
</p>
|
720 |
-
</td>
|
721 |
-
</tr>
|
722 |
-
<tr>
|
723 |
-
<td class="first"><label for="postthumbnail">Post Thumbnail:</label></td>
|
724 |
-
<td>
|
725 |
-
<p class="description">
|
726 |
-
<input type="hidden" name="postthumbnail" value="false"/>
|
727 |
-
<input type="checkbox" name="postthumbnail" id="postthumbnail" value="true" />
|
728 |
-
Setting a video splash screen from the media library will automatically make it the splash image if there is none. </p>
|
729 |
-
</td>
|
730 |
-
</tr>
|
731 |
-
<tr>
|
732 |
-
<td class="first"><label for="rtmp-live-buffer">RTMP bufferTime tweak:</label></td>
|
733 |
-
<td>
|
734 |
-
<p class="description">
|
735 |
-
<input type="hidden" name="rtmp-live-buffer" value="false"/>
|
736 |
-
<input type="checkbox" name="rtmp-live-buffer" id="rtmp-live-buffer" value="true" />
|
737 |
-
Use if your live streams are not smooth. <span class="more">Adobe <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#bufferTime">recommends</a> to set bufferTime to 0 for live streams, but if your stream is not smooth, you can use this setting.</span> <a href="#" class="show-more">(…)</a>
|
738 |
-
</p>
|
739 |
-
</td>
|
740 |
-
</tr>
|
741 |
-
|
742 |
-
<tr>
|
743 |
-
<td class="first"><label for="db_duration">Scan video length:</label></td>
|
744 |
-
<td>
|
745 |
-
<p class="description">
|
746 |
-
<input type="hidden" name="db_duration" value="false" />
|
747 |
-
<input type="checkbox" name="db_duration" id="db_duration" value="true" />
|
748 |
-
Turn off if you experience issues when saving posts! <span class="more">Turn on to enable video duration scanning. Currently posts in queue. </span> <a href="#" class="show-more">(…)</a>
|
749 |
-
</p>
|
750 |
-
</td>
|
751 |
-
</tr>
|
752 |
-
<!--<tr>
|
753 |
-
<td style="width: 350px"><label for="optimizepress2">Handle OptimizePress 2 videos (<abbr title="Following attributes are not currently supported: margin, border">?</abbr>):</label></td>
|
754 |
-
<td>
|
755 |
-
<input type="hidden" name="integrations[optimizepress2]" value="false" />
|
756 |
-
<input type="checkbox" name="integrations[optimizepress2]" id="optimizepress2" value="true" />
|
757 |
-
</td>
|
758 |
-
</tr>-->
|
759 |
-
|
760 |
-
<tr>
|
761 |
-
<td class="first"><label for="integrations[embed_iframe]">Use iframe embedding:</label></td>
|
762 |
-
<td>
|
763 |
-
<p class="description">
|
764 |
-
<input type="hidden" name="integrations[embed_iframe]" value="false"/>
|
765 |
-
<input type="checkbox" name="integrations[embed_iframe]" id="integrations[embed_iframe]" value="true" />
|
766 |
-
Beta version! New kind of embedding which supports all the features in embedded player. </p>
|
767 |
-
</td>
|
768 |
-
</tr>
|
769 |
-
<tr>
|
770 |
-
<td class="first"><label for="integrations[featured_img]">Add featured image automatically:</label></td>
|
771 |
-
<td>
|
772 |
-
<p class="description">
|
773 |
-
<input type="hidden" name="integrations[featured_img]" value="false"/>
|
774 |
-
<input type="checkbox" name="integrations[featured_img]" id="integrations[featured_img]" value="true" />
|
775 |
-
If the featured image is not set, splash image of the first player will be used. </p>
|
776 |
-
</td>
|
777 |
-
</tr>
|
778 |
-
|
779 |
-
<tr>
|
780 |
-
<td><label for="facebook_sharing">Facebook Video Sharing:</label></td>
|
781 |
-
<td>
|
782 |
-
<p class="description">
|
783 |
-
<input type="hidden" name="integrations[facebook_sharing]" value="false" />
|
784 |
-
<input type="checkbox" name="integrations[facebook_sharing]" id="facebook_sharing" value="true" />
|
785 |
-
When sharing your post to Facebook the first MP4 video will be shared directly rather than the post excerpt. <span class="more"><strong>Requirements</strong>: video has to be on https:// and splash screen has to be present. Videos with download protection are automatically excluded.</span> <a href="#" class="show-more">(…)</a>
|
786 |
-
</p>
|
787 |
-
</td>
|
788 |
-
</tr>
|
789 |
-
<tr>
|
790 |
-
<td colspan="4">
|
791 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
792 |
-
</td>
|
793 |
-
</tr>
|
794 |
-
</table>
|
795 |
-
</div>
|
796 |
-
</div>
|
797 |
-
<div id="fv_flowplayer_mobile" class="postbox " >
|
798 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Mobile Settings</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Mobile Settings</span></h2>
|
799 |
-
<div class="inside">
|
800 |
-
|
801 |
-
<table class="form-table2">
|
802 |
-
<tr>
|
803 |
-
<td class="first"><label for="mobile_native_fullscreen">Use native fullscreen on mobile:</label></td>
|
804 |
-
<td>
|
805 |
-
<p class="description">
|
806 |
-
<input type="hidden" name="mobile_native_fullscreen" value="false"/>
|
807 |
-
<input type="checkbox" name="mobile_native_fullscreen" id="mobile_native_fullscreen" value="true" />
|
808 |
-
Stops popups, ads or subtitles from working, but provides faster interface. We set this for Android < 4.4 and iOS < 7 automatically. </p>
|
809 |
-
</td>
|
810 |
-
</tr>
|
811 |
-
<tr>
|
812 |
-
<td class="first"><label for="mobile_force_fullscreen">Force fullscreen on mobile (beta):</label></td>
|
813 |
-
<td>
|
814 |
-
<p class="description">
|
815 |
-
<input type="hidden" name="mobile_force_fullscreen" value="false"/>
|
816 |
-
<input type="checkbox" name="mobile_force_fullscreen" id="mobile_force_fullscreen" value="true" />
|
817 |
-
Video playback will start in fullscreen. iPhone with iOS < 10 always forces fullscreen for video playback. </p>
|
818 |
-
</td>
|
819 |
-
</tr>
|
820 |
-
<tr>
|
821 |
-
<td colspan="4">
|
822 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
823 |
-
</td>
|
824 |
-
</tr>
|
825 |
-
</table>
|
826 |
-
</div>
|
827 |
-
</div>
|
828 |
-
<div id="fv_flowplayer_seo" class="postbox " >
|
829 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Video SEO</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Video SEO</span></h2>
|
830 |
-
<div class="inside">
|
831 |
-
<table class="form-table2">
|
832 |
-
<tr>
|
833 |
-
<td class="first"><label for="integrations[schema_org]">Use Schema.org markup:</label></td>
|
834 |
-
<td>
|
835 |
-
<p class="description">
|
836 |
-
<input type="hidden" name="integrations[schema_org]" value="false"/>
|
837 |
-
<input type="checkbox" name="integrations[schema_org]" id="integrations[schema_org]" value="true" />
|
838 |
-
Adds the video meta data information for search engines. </p>
|
839 |
-
</td>
|
840 |
-
</tr>
|
841 |
-
<tr>
|
842 |
-
<td class="first"><label for="video_sitemap">Use XML Video Sitemap:</label></td>
|
843 |
-
<td>
|
844 |
-
<p class="description">
|
845 |
-
<input type="hidden" name="video_sitemap" value="false"/>
|
846 |
-
<input type="checkbox" name="video_sitemap" id="video_sitemap" value="true" />
|
847 |
-
Creates <code>http://example.org/video-sitemap.xml</code> which you can submit via Google Webmaster Tools. <span class="more">As feeds tend to be cached by web browser make sure you clear your browser cache if you are doing some testing.</span> <a href="#" class="show-more">(…)</a>
|
848 |
-
</p>
|
849 |
-
</td>
|
850 |
-
</tr>
|
851 |
-
<tr>
|
852 |
-
<td><label for="video_sitemap_meta">Sitemap Post Meta <a href="#" class="show-more">(?)</a>:</label></td>
|
853 |
-
<td>
|
854 |
-
<input id="video_sitemap_meta" name="video_sitemap_meta" type="text" value="" />
|
855 |
-
<p class="description"><span class="more">You can enter post meta keys here, use <code>,</code> to separate multiple values.</span></p>
|
856 |
-
</td>
|
857 |
-
</tr>
|
858 |
-
<tr>
|
859 |
-
<td colspan="4">
|
860 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
861 |
-
</td>
|
862 |
-
</tr>
|
863 |
-
</table>
|
864 |
-
</div>
|
865 |
-
</div>
|
866 |
-
<div id="fv_flowplayer_conversion" class="postbox " >
|
867 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Conversion</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Conversion</span></h2>
|
868 |
-
<div class="inside">
|
869 |
-
<p>This section allows you to convert videos posted using other plugins to FV Player shortcodes.</p>
|
870 |
-
<table class="form-table2" style="margin: 5px; ">
|
871 |
-
<tr>
|
872 |
-
<td>
|
873 |
-
<input type="button" class="button" value="Convert JW Player shortcodes" style="margin-top: 2ex;" onclick="if( confirm('This converts the [jwplayer] shortcodes into [fvplayer] shortcodes.\n\n Please make sure you backup your database before continuing. You can use revisions to get back to previos versions of your posts as well.') ) location.href='http://example.org/wp-admin/options-general.php?page=fvplayer&convert_jwplayer=f13b4f40a5'; "/>
|
874 |
-
</td>
|
875 |
-
</tr>
|
876 |
-
</table>
|
877 |
-
</div>
|
878 |
-
</div>
|
879 |
-
<div id="fv_player_pro" class="postbox " >
|
880 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Pro Features</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Pro Features</span></h2>
|
881 |
-
<div class="inside">
|
882 |
-
<p><a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/download">Purchase FV Flowplayer license</a> to enable Pro features!</p>
|
883 |
-
<table class="form-table2">
|
884 |
-
<tr>
|
885 |
-
<td class="first"><label>Advanced Vimeo embeding:</label></td>
|
886 |
-
<td>
|
887 |
-
<p class="description">
|
888 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
889 |
-
Use Vimeo as your video host and use all of FV Flowplayer features. </p>
|
890 |
-
</td>
|
891 |
-
</tr>
|
892 |
-
<tr>
|
893 |
-
<td><label>Advanced YouTube embeding:</label></td>
|
894 |
-
<td>
|
895 |
-
<p class="description">
|
896 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
897 |
-
Use YouTube as your video host and use all of FV Flowplayer features. </p>
|
898 |
-
</td>
|
899 |
-
</tr>
|
900 |
-
<tr>
|
901 |
-
<td><label>Enable user defined AB loop:</label></td>
|
902 |
-
<td>
|
903 |
-
<p class="description">
|
904 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
905 |
-
Let your users repeat the parts of the video which they like! </p>
|
906 |
-
</td>
|
907 |
-
</tr>
|
908 |
-
<tr>
|
909 |
-
<td><label>Enable video lightbox:</label></td>
|
910 |
-
<td>
|
911 |
-
<p class="description">
|
912 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
913 |
-
Enables Lightbox video gallery to show videos in a lightbox popup! </p>
|
914 |
-
</td>
|
915 |
-
</tr>
|
916 |
-
<tr>
|
917 |
-
<td><label>Enable quality switching:</label></td>
|
918 |
-
<td>
|
919 |
-
<p class="description">
|
920 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
921 |
-
Upload your videos in multiple quality for best user experience with YouTube-like quality switching! </p>
|
922 |
-
</td>
|
923 |
-
</tr>
|
924 |
-
<tr>
|
925 |
-
<td><label>Amazon CloudFront protected content:</label></td>
|
926 |
-
<td>
|
927 |
-
<p class="description">
|
928 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
929 |
-
Protect your Amazon CDN hosted videos.
|
930 |
-
</p>
|
931 |
-
</td>
|
932 |
-
</tr>
|
933 |
-
<tr>
|
934 |
-
<td><label>Autoplay just once:</label></td>
|
935 |
-
<td>
|
936 |
-
<p class="description">
|
937 |
-
<input type="checkbox" disabled="true" />
|
938 |
-
Makes sure each video autoplays only once for each visitor. </p>
|
939 |
-
</td>
|
940 |
-
</tr>
|
941 |
-
<tr>
|
942 |
-
<td><label>Enable video ads:</label></td>
|
943 |
-
<td>
|
944 |
-
<p class="description">
|
945 |
-
<input type="checkbox" disabled="true" />
|
946 |
-
Define your own videos ads to play in together with your videos - postroll or prerool </p>
|
947 |
-
</td>
|
948 |
-
</tr>
|
949 |
-
</table>
|
950 |
-
<p><strong>Upcoming pro features</strong>:</p>
|
951 |
-
<table class="form-table2">
|
952 |
-
<tr>
|
953 |
-
<td class="first"><label>Enable PayWall:</label></td>
|
954 |
-
<td>
|
955 |
-
<p class="description">
|
956 |
-
<input type="checkbox" checked="checked" disabled="true" />
|
957 |
-
Monetize the video content on your membership site. </p>
|
958 |
-
</td>
|
959 |
-
</tr>
|
960 |
-
</table>
|
961 |
-
</div>
|
962 |
-
</div>
|
963 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
964 |
-
</div>
|
965 |
-
<div id='postbox-container-tab_skin' class='postbox-container' style="">
|
966 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_description" class="postbox " >
|
967 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: </span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span> </span></h2>
|
968 |
-
<div class="inside">
|
969 |
-
<table class="form-table">
|
970 |
-
<tr>
|
971 |
-
<td colspan="4">
|
972 |
-
<p>
|
973 |
-
You can customize the colors of the player to match your website. </p>
|
974 |
-
</td>
|
975 |
-
</tr>
|
976 |
-
</table>
|
977 |
-
</div>
|
978 |
-
</div>
|
979 |
-
<div id="flowplayer-wrapper" class="postbox " >
|
980 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Player Skin</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Player Skin</span></h2>
|
981 |
-
<div class="inside">
|
982 |
-
<style id="fv-style-preview"></style>
|
983 |
-
<div class="flowplayer-wrapper">
|
984 |
-
<div id="wpfp_1b7da827d9fee9aa6d5bb9c5dca973bf" class="flowplayer no-brand is-splash fvp-play-button" style="max-width: 100%; background-image: url(https://i.vimeocdn.com/video/609485450_1280.jpg);" data-ratio="0.5625">
|
985 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
986 |
-
<div class='fvp-share-bar'><ul class="fvp-sharing">
|
987 |
-
<li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=" target="_blank">Facebook</a></li>
|
988 |
-
<li><a class="sharing-twitter" href="https://twitter.com/home?status=Test+Blog+" target="_blank">Twitter</a></li>
|
989 |
-
<li><a class="sharing-google" href="https://plus.google.com/share?url=" target="_blank">Google+</a></li>
|
990 |
-
<li><a class="sharing-email" href="mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20" target="_blank">Email</a></li></ul><div><label><a class="embed-code-toggle" href="#"><strong>Embed</strong></a></label></div><div class="embed-code"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
|
991 |
-
</div>
|
992 |
-
Hint: play the video to see live preview of the color settings </div>
|
993 |
-
<table class="form-table2 flowplayer-settings fv-player-interface-form-group">
|
994 |
-
<tr>
|
995 |
-
<td><label for="hasBorder">Border</label></td>
|
996 |
-
<td><input type="hidden" name="hasBorder" value="false" />
|
997 |
-
<input type="checkbox" name="hasBorder" id="hasBorder" value="true"
|
998 |
-
data-fv-preview=".flowplayer{border:%val%px solid!important;}"/>
|
999 |
-
</td>
|
1000 |
-
|
1001 |
-
</tr>
|
1002 |
-
<tr>
|
1003 |
-
<td><label for="borderColor">Border color</label></td>
|
1004 |
-
<td><input class="color" id="borderColor" name="borderColor" type="text" value="#666666"
|
1005 |
-
data-fv-preview=".flowplayer{border-color:#%val%!important;}"/></td>
|
1006 |
-
</tr>
|
1007 |
-
<tr>
|
1008 |
-
<td><label for="marginBottom">Bottom Margin</label></td>
|
1009 |
-
<td><input id="marginBottom" name="marginBottom" title="Enter value in pixels" type="text" value="28"
|
1010 |
-
data-fv-preview=".flowplayer { margin: 0 auto %val%px auto!important; display: block!important; }
|
1011 |
-
.flowplayer.fixed-controls { margin: 0 auto calc(%val%px + 30px) auto!important; display: block!important; }
|
1012 |
-
.flowplayer.has-abloop { margin-bottom: %val%px!important; }
|
1013 |
-
.flowplayer.fixed-controls.has-abloop { margin-bottom: calc(%val%px + 30px)!important; }"/></td>
|
1014 |
-
</tr>
|
1015 |
-
<tr>
|
1016 |
-
<td><label for="bufferColor">Buffer</label></td>
|
1017 |
-
<td><input class="color" id="bufferColor" name="bufferColor" type="text" value="#eeeeee"
|
1018 |
-
data-fv-preview=".flowplayer .fp-volumeslider, .flowplayer .noUi-background { background-color: #%val% !important; }
|
1019 |
-
.flowplayer .fp-buffer, .flowplayer .fv-ab-loop .noUi-handle { background-color: #%val% !important; }" /></td>
|
1020 |
-
</tr>
|
1021 |
-
<tr>
|
1022 |
-
<td><label for="canvas">Canvas</label></td>
|
1023 |
-
<td><input class="color" id="canvas" name="canvas" type="text" value="#000000"
|
1024 |
-
data-fv-preview=".flowplayer { background-color: #%val%!important; }"/></td>
|
1025 |
-
</tr>
|
1026 |
-
<tr>
|
1027 |
-
<td><label for="backgroundColor">Controlbar</label></td>
|
1028 |
-
<td><input class="color" id="backgroundColor" name="backgroundColor" type="text" value="#333333"
|
1029 |
-
data-fv-preview=".flowplayer .fv-ab-loop .noUi-handle { color:#%val%!important; }
|
1030 |
-
.fv_player_popup { background: #%val%!important;}
|
1031 |
-
.fvfp_admin_error_content { background: #%val%!important; }
|
1032 |
-
.flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { background-color: #%val% !important; }"/></td>
|
1033 |
-
</tr>
|
1034 |
-
<tr>
|
1035 |
-
<td><label for="font-face">Font Face</label></td>
|
1036 |
-
<td>
|
1037 |
-
<select id="font-face" name="font-face" data-fv-preview="#content .flowplayer, .flowplayer { font-family: %val%; }">
|
1038 |
-
<option value="inherit">(inherit from template)</option>
|
1039 |
-
<option value=""Courier New", Courier, monospace">Courier New</option>
|
1040 |
-
<option value="Tahoma, Geneva, sans-serif" selected="selected">Tahoma, Geneva</option>
|
1041 |
-
</select>
|
1042 |
-
</td>
|
1043 |
-
</tr>
|
1044 |
-
<tr>
|
1045 |
-
<td class="second-column"><label for="player-position">Player position</label></td>
|
1046 |
-
<td>
|
1047 |
-
<select id="player-position" name="player-position" data-fv-preview=".flowplayer { margin-left: 0; }">
|
1048 |
-
<option value="" selected="selected">Centered</option>
|
1049 |
-
<option value="left">Left (no text-wrap)</option>
|
1050 |
-
</select>
|
1051 |
-
</td>
|
1052 |
-
</tr>
|
1053 |
-
<tr>
|
1054 |
-
<td><label for="progressColor">Progress</label></td>
|
1055 |
-
<td><input class="color" id="progressColor" name="progressColor" type="text" value="#bb0000"
|
1056 |
-
data-fv-preview=".flowplayer .fp-volumelevel { background-color: #%val%!important; }
|
1057 |
-
.flowplayer .fp-progress, .flowplayer .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #%val% !important; }
|
1058 |
-
.flowplayer .fp-dropdown li.active { background-color: #%val% !important }"/></td>
|
1059 |
-
</tr>
|
1060 |
-
<tr>
|
1061 |
-
<td><label for="timeColor">Time</label></td>
|
1062 |
-
<td><input class="color" id="timeColor" name="timeColor" type="text" value="#eeeeee"
|
1063 |
-
data-fv-preview=".flowplayer .fp-elapsed { color: #%val% !important; }
|
1064 |
-
.fv-wp-flowplayer-notice-small { color: #%val% !important; }"/></td>
|
1065 |
-
</tr>
|
1066 |
-
<tr>
|
1067 |
-
<td><label for="durationColor">Total time</label></td>
|
1068 |
-
<td><input class="color" id="durationColor" name="durationColor" type="text" value="#eeeeee"
|
1069 |
-
data-fv-preview=".flowplayer .fp-controls, .flowplayer .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { color:#%val% !important; }"/></td>
|
1070 |
-
</tr>
|
1071 |
-
<tr>
|
1072 |
-
<td colspan="2">
|
1073 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1074 |
-
</td>
|
1075 |
-
</tr>
|
1076 |
-
</table>
|
1077 |
-
<div style="clear: both"></div>
|
1078 |
-
</div>
|
1079 |
-
</div>
|
1080 |
-
<div id="fv_flowplayer_skin_playlist" class="postbox " >
|
1081 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Playlist</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Playlist</span></h2>
|
1082 |
-
<div class="inside">
|
1083 |
-
<div class="flowplayer-wrapper">
|
1084 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_1b7da827d9fee9aa6d5bb9c5dca973bf">
|
1085 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/player.vimeo.com\/external\/196881410.hd.mp4?s=24645ecff21ff60079fc5b7715a97c00f90c6a18&profile_id=174&oauth2_token_id=3501005","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/images\/test-subtitles.vtt"}]}'><div style='background-image: url("https://i.vimeocdn.com/video/608654918_295x166.jpg")'></div><h4><span>Foliovision Video</span></h4></a>
|
1086 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/player.vimeo.com\/external\/224781088.sd.mp4?s=face4dbb990b462826c8e1e43a9c66c6a9bb5585&profile_id=165&oauth2_token_id=3501005","type":"video\/mp4"}]}'><div style='background-image: url("https://i.vimeocdn.com/video/643908843_295x166.jpg")'></div><h4><span>Lapinthrope Extras - Roy Thompson Hall Dance</span></h4></a>
|
1087 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/player.vimeo.com\/external\/45864857.hd.mp4?s=94fddee594da3258c9e10355f5bad8173c4aee7b&profile_id=113&oauth2_token_id=3501005","type":"video\/mp4"}]}'><div style='background-image: url("https://i.vimeocdn.com/video/319116053_295x166.jpg")'></div><h4><span>Romeo and Juliet Ballet Schloss Kittsee</span></h4></a>
|
1088 |
-
</div>
|
1089 |
-
Hint: you can click the thumbnails to switch videos in the above player. This preview uses the horizontal playlist style.
|
1090 |
-
</div>
|
1091 |
-
<table class="form-table2 flowplayer-settings fv-player-interface-form-group">
|
1092 |
-
<tr>
|
1093 |
-
<td><label for="playlist-design">Playlist Design</label></td>
|
1094 |
-
<td>
|
1095 |
-
<select id="playlist-design" name="playlist-design" data-fv-preview="">
|
1096 |
-
<option value="2017" selected="selected">2017</option>
|
1097 |
-
<option value="2017 visible-captions">2017 with captions</option>
|
1098 |
-
<option value="2014">2014</option>
|
1099 |
-
</select>
|
1100 |
-
</td>
|
1101 |
-
</tr>
|
1102 |
-
<tr>
|
1103 |
-
<td><label for="playlistBgColor">Background Color</label></td>
|
1104 |
-
<td><input class="color" id="playlistBgColor" name="playlistBgColor" type="text" value="#808080"
|
1105 |
-
data-fv-preview=".fp-playlist-external > a > span { background-color:#%val%; }"/></td>
|
1106 |
-
</tr>
|
1107 |
-
<tr>
|
1108 |
-
<td><label for="playlistSelectedColor">Active Item</label></td>
|
1109 |
-
<td><input class="color" id="playlistSelectedColor" name="playlistSelectedColor" type="text" value="#bb0000"
|
1110 |
-
data-fv-preview=".fp-playlist-external.fv-playlist-design-2014 a.is-active,.fp-playlist-external.fv-playlist-design-2014 a.is-active h4,.fp-playlist-external.fp-playlist-only-captions a.is-active,.fp-playlist-external.fp-playlist-only-captions a.is-active h4 { color:#%val%; }"/></td>
|
1111 |
-
</tr>
|
1112 |
-
<tr>
|
1113 |
-
<td><label for="playlistFontColor-proxy">Font Color</label></td>
|
1114 |
-
<td>
|
1115 |
-
<input class="color" id="playlistFontColor-proxy" data-previous="" style="display:none;" type="text" value="" />
|
1116 |
-
<input id="playlistFontColor" name="playlistFontColor" type="hidden" value=""
|
1117 |
-
data-fv-preview=".fp-playlist-external > a { color:#%val%; } #dashboard-widgets .flowplayer-wrapper .fp-playlist-external h4{color: #%val% !important;}"/>
|
1118 |
-
<a class="playlistFontColor-show" >Use custom color</a>
|
1119 |
-
<a class="playlistFontColor-hide" style="display:none;">Inherit from theme</a>
|
1120 |
-
</td>
|
1121 |
-
</tr>
|
1122 |
-
<tr>
|
1123 |
-
<td colspan="2">
|
1124 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1125 |
-
</td>
|
1126 |
-
</tr>
|
1127 |
-
</table>
|
1128 |
-
<div style="clear: both"></div>
|
1129 |
-
</div>
|
1130 |
-
</div>
|
1131 |
-
<div id="fv_flowplayer_skin_subtitles" class="postbox " >
|
1132 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Subtitles</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Subtitles</span></h2>
|
1133 |
-
<div class="inside">
|
1134 |
-
<table class="form-table2 flowplayer-settings fv-player-interface-form-group">
|
1135 |
-
<tr>
|
1136 |
-
<td><label for="subtitle-font-face">Font Face</label></td>
|
1137 |
-
<td>
|
1138 |
-
<select id="subtitle-font-face" name="subtitleFontFace" data-fv-preview=".flowplayer .fp-subtitle .fp-subtitle-line { font-family: %val%!important; }">
|
1139 |
-
<option value="inherit">(inherit)</option>
|
1140 |
-
<option value=""Courier New", Courier, monospace">Courier New</option>
|
1141 |
-
<option value="Tahoma, Geneva, sans-serif">Tahoma, Geneva</option>
|
1142 |
-
</select>
|
1143 |
-
</td>
|
1144 |
-
</tr>
|
1145 |
-
<tr>
|
1146 |
-
<td><label for="subtitleSize">Font Size</label></td>
|
1147 |
-
<td><input id="subtitleSize" name="subtitleSize" title="Enter value in pixels" type="text" value="16"
|
1148 |
-
data-fv-preview=".flowplayer .fp-subtitle .fp-subtitle-line { font-size: %val%px!important; }"/></td>
|
1149 |
-
</tr>
|
1150 |
-
<tr>
|
1151 |
-
<td><label for="subtitleBgColor">Background Color</label></td>
|
1152 |
-
<td><input class="color" id="subtitleBgColor" name="subtitleBgColor" type="text" value="#000000"
|
1153 |
-
data-fv-preview=".flowplayer .fp-subtitle .fp-subtitle-line { background-color: rgba(%val%)!important; }"/></td>
|
1154 |
-
</tr>
|
1155 |
-
<tr>
|
1156 |
-
<td><label for="subtitleBgAlpha">Background Opacity</label></td>
|
1157 |
-
<td><input id="subtitleBgAlpha" name="subtitleBgAlpha" type="range" min="0" max="1" step="0.01" value="0.5"
|
1158 |
-
data-fv-preview=""/></td>
|
1159 |
-
</tr>
|
1160 |
-
<tr>
|
1161 |
-
<td colspan="2">
|
1162 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1163 |
-
</td>
|
1164 |
-
</tr>
|
1165 |
-
</table>
|
1166 |
-
<div id="fp-preview-wrapper">
|
1167 |
-
<div class="flowplayer"id="preview">
|
1168 |
-
<div class="fp-subtitle fp-active">
|
1169 |
-
<span class="fp-subtitle-line">
|
1170 |
-
The quick brown fox jumps over the lazy dog. </span>
|
1171 |
-
</div>
|
1172 |
-
</div>
|
1173 |
-
</div>
|
1174 |
-
<div style="clear: both"></div>
|
1175 |
-
</div>
|
1176 |
-
</div>
|
1177 |
-
<div id="fv_flowplayer_skin_sticky" class="postbox " >
|
1178 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Sticky Video</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Sticky Video</span></h2>
|
1179 |
-
<div class="inside">
|
1180 |
-
<p>This feature lets your viewers continue watching the video as they scroll past it. It applies to desktop computer displays - minimal width of 1020 pixels.</p>
|
1181 |
-
<table class="form-table2 flowplayer-settings fv-player-interface-form-group">
|
1182 |
-
<tr>
|
1183 |
-
<td class="first"><label for="sticky_video">Enable:</label></td>
|
1184 |
-
<td>
|
1185 |
-
<p class="description">
|
1186 |
-
<input type="hidden" name="sticky_video" value="false"/>
|
1187 |
-
<input type="checkbox" name="sticky_video" id="sticky_video" value="true" />
|
1188 |
-
</p>
|
1189 |
-
</td>
|
1190 |
-
</tr>
|
1191 |
-
<tr>
|
1192 |
-
<td><label for="sticky_place">Placement</label></td>
|
1193 |
-
<td>
|
1194 |
-
<select id="sticky_place" name="sticky_place">
|
1195 |
-
<option value="right-bottom" selected="selected">Right, Bottom</option>
|
1196 |
-
<option value="left-bottom">Left, Bottom</option>
|
1197 |
-
<option value="left-top">Left, Top</option>
|
1198 |
-
<option value="right-top">Right, Top</option>
|
1199 |
-
</select>
|
1200 |
-
</td>
|
1201 |
-
</tr>
|
1202 |
-
<tr>
|
1203 |
-
<td><label for="sticky_width">Player width [px]</label></td>
|
1204 |
-
<td><input id="sticky_width" name="sticky_width" title="Enter value in pixels" type="text" value="380"/></td>
|
1205 |
-
</tr>
|
1206 |
-
|
1207 |
-
|
1208 |
-
<tr>
|
1209 |
-
<td colspan="2">
|
1210 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1211 |
-
</td>
|
1212 |
-
</tr>
|
1213 |
-
</table>
|
1214 |
-
<div style="clear: both"></div>
|
1215 |
-
</div>
|
1216 |
-
</div>
|
1217 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
1218 |
-
</div>
|
1219 |
-
<div id='postbox-container-tab_hosting' class='postbox-container' style="">
|
1220 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_description" class="postbox " >
|
1221 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: </span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span> </span></h2>
|
1222 |
-
<div class="inside">
|
1223 |
-
<table class="form-table">
|
1224 |
-
<tr>
|
1225 |
-
<td colspan="4">
|
1226 |
-
<p>
|
1227 |
-
Here you can enable and configure advanced hosting options. </p>
|
1228 |
-
</td>
|
1229 |
-
</tr>
|
1230 |
-
</table>
|
1231 |
-
</div>
|
1232 |
-
</div>
|
1233 |
-
<div id="fv_flowplayer_amazon_options" class="postbox " >
|
1234 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Amazon S3 Protected Content</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Amazon S3 Protected Content</span></h2>
|
1235 |
-
<div class="inside">
|
1236 |
-
<table class="form-table2">
|
1237 |
-
<tr>
|
1238 |
-
<td colspan="2">
|
1239 |
-
<p>Secured Amazon S3 URLs are recommended for member-only sections of the site. We check the video length and make sure the link expiration time is big enough for the video to buffer properly.</p>
|
1240 |
-
<p>If you use a cache plugin (such as Hyper Cache, WP Super Cache or W3 Total Cache), we recommend that you set the "Default Expiration Time" to twice as much as your cache timeout and check "Force the default expiration time". That way the video length won't be accounted and the video source URLs in your cached pages won't expire. Read more in the <a href="http://foliovision.com/wordpress/plugins/fv-wordpress-flowplayer/secure-amazon-s3-guide#wp-cache" target="_blank">Using Amazon S3 secure content in FV Flowplayer guide</a>.</p>
|
1241 |
-
</td>
|
1242 |
-
</tr>
|
1243 |
-
<tr>
|
1244 |
-
<td class="first"><label for="amazon_expire">Default Expiration Time [minutes] (<abbr title="Each video duration is stored on post save and then used as the expire time. If the duration is not available, this value is used.">?</abbr>):</label></td>
|
1245 |
-
<td>
|
1246 |
-
<input type="text" size="40" name="amazon_expire" id="amazon_expire" value="5" />
|
1247 |
-
</td>
|
1248 |
-
</tr>
|
1249 |
-
<tr>
|
1250 |
-
<td class="first"><label for="amazon_expire_force">Force the default expiration time:</label></td>
|
1251 |
-
<td>
|
1252 |
-
<p class="description">
|
1253 |
-
<input type="hidden" name="amazon_expire_force" value="false"/>
|
1254 |
-
<input type="checkbox" name="amazon_expire_force" id="amazon_expire_force" value="true" />
|
1255 |
-
</p>
|
1256 |
-
</td>
|
1257 |
-
</tr>
|
1258 |
-
<tr>
|
1259 |
-
<td><label for="s3_browser">Amazon S3 Browser (beta):</label></td>
|
1260 |
-
<td>
|
1261 |
-
<p class="description">
|
1262 |
-
<input type="hidden" name="s3_browser" value="false"/>
|
1263 |
-
<input type="checkbox" name="s3_browser" id="s3_browser" value="true" />
|
1264 |
-
Show Amazon S3 Browser in the "Add Video" dialog. </p>
|
1265 |
-
</td>
|
1266 |
-
</tr>
|
1267 |
-
|
1268 |
-
<tr class="amazon-s3-first">
|
1269 |
-
<td><label for="amazon_bucket[]">Amazon Bucket (<abbr title="We recommend that you simply put all of your protected video into a single bucket and enter its name here. All matching videos will use the protected URLs.">?</abbr>):</label></td>
|
1270 |
-
<td><input id="amazon_bucket[]" name="amazon_bucket[]" type="text" value="" /></td>
|
1271 |
-
</tr>
|
1272 |
-
<tr class="amazon-s3-first">
|
1273 |
-
<td><label for="amazon_region[]">Region</td>
|
1274 |
-
<td>
|
1275 |
-
<select id="amazon_region[]" name="amazon_region[]">
|
1276 |
-
<option value="">Select the region</option>
|
1277 |
-
<option value="us-east-1">US East (N. Virginia)</option>
|
1278 |
-
|
1279 |
-
<option value="us-east-2">US East (Ohio)</option>
|
1280 |
-
|
1281 |
-
<option value="us-west-1">US West (N. California)</option>
|
1282 |
-
|
1283 |
-
<option value="us-west-2">US West (Oregon)</option>
|
1284 |
-
|
1285 |
-
<option value="ca-central-1">Canada (Central)</option>
|
1286 |
-
|
1287 |
-
<option value="ap-south-1">Asia Pacific (Mumbai)</option>
|
1288 |
-
|
1289 |
-
<option value="ap-northeast-2">Asia Pacific (Seoul)</option>
|
1290 |
-
|
1291 |
-
<option value="ap-southeast-1">Asia Pacific (Singapore)</option>
|
1292 |
-
|
1293 |
-
<option value="ap-southeast-2">Asia Pacific (Sydney)</option>
|
1294 |
-
|
1295 |
-
<option value="ap-northeast-1">Asia Pacific (Tokyo)</option>
|
1296 |
-
|
1297 |
-
<option value="eu-central-1">EU (Frankfurt)</option>
|
1298 |
-
|
1299 |
-
<option value="eu-west-1">EU (Ireland)</option>
|
1300 |
-
|
1301 |
-
<option value="eu-west-2">EU (London)</option>
|
1302 |
-
|
1303 |
-
<option value="sa-east-1">South America (São Paulo)</option>
|
1304 |
-
</select>
|
1305 |
-
</td>
|
1306 |
-
</tr>
|
1307 |
-
<tr class="amazon-s3-first">
|
1308 |
-
<td><label for="amazon_key[]">Access Key ID:</label></td>
|
1309 |
-
<td><input id="amazon_key[]" name="amazon_key[]" type="text" value="" /></td>
|
1310 |
-
</tr>
|
1311 |
-
<tr class="amazon-s3-first">
|
1312 |
-
<td><label for="amazon_secret[]">Secret Access Key:</label></td>
|
1313 |
-
<td><input id="amazon_secret[]" name="amazon_secret[]" type="text" value="" /></td>
|
1314 |
-
</tr>
|
1315 |
-
<tr class="amazon-s3-first">
|
1316 |
-
<td colspan="2">
|
1317 |
-
<div class="alignright fv_fp_amazon_remove">
|
1318 |
-
<a href="#" onclick="fv_fp_amazon_s3_remove(this); return false">remove</a>
|
1319 |
-
</div>
|
1320 |
-
<div class="clear"></div>
|
1321 |
-
<hr style="border: 0; border-top: 1px solid #ccc;" />
|
1322 |
-
</td>
|
1323 |
-
</tr>
|
1324 |
-
|
1325 |
-
<tr class="amazon-s3-last"><td colspan="2"></td></tr>
|
1326 |
-
<tr>
|
1327 |
-
<td colspan="4">
|
1328 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1329 |
-
<input type="button" id="amazon-s3-add" class="button" value="Add more Amazon S3 secure buckets" />
|
1330 |
-
</td>
|
1331 |
-
</tr>
|
1332 |
-
</table>
|
1333 |
-
</div>
|
1334 |
-
</div>
|
1335 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
1336 |
-
</div>
|
1337 |
-
<div id='postbox-container-tab_actions' class='postbox-container' style="">
|
1338 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_description" class="postbox " >
|
1339 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: </span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span> </span></h2>
|
1340 |
-
<div class="inside">
|
1341 |
-
<table class="form-table">
|
1342 |
-
<tr>
|
1343 |
-
<td colspan="4">
|
1344 |
-
<p>
|
1345 |
-
Here you can configure ads and banners that will be shown in the video. </p>
|
1346 |
-
</td>
|
1347 |
-
</tr>
|
1348 |
-
</table>
|
1349 |
-
</div>
|
1350 |
-
</div>
|
1351 |
-
<div id="fv_flowplayer_end_of_video" class="postbox " >
|
1352 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: End of Video</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>End of Video</span></h2>
|
1353 |
-
<div class="inside">
|
1354 |
-
<table class="form-table2" style="margin: 5px; ">
|
1355 |
-
<tr>
|
1356 |
-
<td style="width:150px;vertical-align:top;line-height:2.4em;"><label for="popups_default">Default Popup:</label></td>
|
1357 |
-
<td>
|
1358 |
-
|
1359 |
-
<p class="description"> <select id="popups_default" name="popups_default">
|
1360 |
-
<option selected value="no">None</option>
|
1361 |
-
<option value="random">Random</option>
|
1362 |
-
<option value="email-1">email-1 - Subscribe to list one</option> </select>
|
1363 |
-
You can set a default popup here and then skip it for individual videos.</p>
|
1364 |
-
</td>
|
1365 |
-
</tr>
|
1366 |
-
<tr>
|
1367 |
-
<td colspan="4">
|
1368 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1369 |
-
</td>
|
1370 |
-
</tr>
|
1371 |
-
</table>
|
1372 |
-
</div>
|
1373 |
-
</div>
|
1374 |
-
<div id="fv_flowplayer_popups" class="postbox " >
|
1375 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Custom Popups</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Custom Popups</span></h2>
|
1376 |
-
<div class="inside">
|
1377 |
-
<p>Add any popups here which you would like to use with multiple videos.</p>
|
1378 |
-
<table class="form-table2" style="margin: 5px; ">
|
1379 |
-
<tr>
|
1380 |
-
<td>
|
1381 |
-
<table id="fv-player-popups-settings">
|
1382 |
-
<thead>
|
1383 |
-
<tr>
|
1384 |
-
<td>ID</td>
|
1385 |
-
<td></td>
|
1386 |
-
<td>Status</td>
|
1387 |
-
</tr>
|
1388 |
-
</thead>
|
1389 |
-
<tbody>
|
1390 |
-
<tr class='data' id="fv-player-popup-item-1">
|
1391 |
-
<td class='id'>1</td>
|
1392 |
-
<td>
|
1393 |
-
<table class='fv-player-popup-formats'>
|
1394 |
-
<tr>
|
1395 |
-
<td><label>Name:</label></td>
|
1396 |
-
<td><input type='text' maxlength="40" name='popups[1][name]' value='' placeholder='' /></td>
|
1397 |
-
</tr>
|
1398 |
-
<tr>
|
1399 |
-
<td><label>HTML:</label></td>
|
1400 |
-
<td><textarea class="large-text code" type='text' name='popups[1][html]' placeholder=''></textarea></td>
|
1401 |
-
</tr>
|
1402 |
-
<tr>
|
1403 |
-
<td><label>Custom<br />CSS:</label></td>
|
1404 |
-
<td><textarea class="large-text code" type='text' name='popups[1][css]' placeholder='.fv_player_popup-1 { }'></textarea></td>
|
1405 |
-
</tr>
|
1406 |
-
</table>
|
1407 |
-
</td>
|
1408 |
-
<td>
|
1409 |
-
<input type='hidden' name='popups[1][disabled]' value='0' />
|
1410 |
-
<input id='PopupAdDisabled-1' type='checkbox' name='popups[1][disabled]' value='1' />
|
1411 |
-
<label for='PopupAdDisabled-1'>Disable</label><br />
|
1412 |
-
<a class='fv-player-popup-remove' href=''>Remove</a></td>
|
1413 |
-
</tr>
|
1414 |
-
</tbody>
|
1415 |
-
</table>
|
1416 |
-
</td>
|
1417 |
-
</tr>
|
1418 |
-
<tr>
|
1419 |
-
<td>
|
1420 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1421 |
-
<input type="button" value="Add more Popups" class="button" id="fv-player-popups-add" />
|
1422 |
-
</td>
|
1423 |
-
</tr>
|
1424 |
-
</table>
|
1425 |
-
|
1426 |
-
<script>
|
1427 |
-
|
1428 |
-
jQuery('#fv-player-popups-add').click( function() {
|
1429 |
-
var fv_player_popup_index = (parseInt( jQuery('#fv-player-popups-settings tr.data:last .id').html() ) || 0 ) + 1;
|
1430 |
-
jQuery('#fv-player-popups-settings').append(jQuery('#fv-player-popups-settings tr.data:first').prop('outerHTML').replace(/#fv_popup_dummy_key#/gi,fv_player_popup_index + ""));
|
1431 |
-
jQuery('#fv-player-popup-item-'+fv_player_popup_index).show();
|
1432 |
-
return false;
|
1433 |
-
} );
|
1434 |
-
|
1435 |
-
jQuery(document).on('click','.fv-player-popup-remove', false, function() {
|
1436 |
-
if( confirm('Are you sure you want to remove the popup ad?') ){
|
1437 |
-
jQuery(this).parents('.data').remove();
|
1438 |
-
if(jQuery('#fv-player-popups-settings .data').length === 1) {
|
1439 |
-
jQuery('#fv-player-popups-add').trigger('click');
|
1440 |
-
}
|
1441 |
-
}
|
1442 |
-
return false;
|
1443 |
-
} );
|
1444 |
-
</script>
|
1445 |
-
</div>
|
1446 |
-
</div>
|
1447 |
-
<div id="fv_flowplayer_email_lists" class="postbox " >
|
1448 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Email Popups</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Email Popups</span></h2>
|
1449 |
-
<div class="inside">
|
1450 |
-
<p>Lists defined here can be used for subscription box for each video or for Default Popup above.</p>
|
1451 |
-
<table class="form-table2" style="margin: 5px; ">
|
1452 |
-
<tr>
|
1453 |
-
<td>
|
1454 |
-
<table id="fv-player-email_lists-settings">
|
1455 |
-
<thead>
|
1456 |
-
<tr>
|
1457 |
-
<td>ID</td>
|
1458 |
-
<td style="width: 40%">Properties</td>
|
1459 |
-
<td>Export</td>
|
1460 |
-
<td>Options</td>
|
1461 |
-
<td>Status</td>
|
1462 |
-
<td></td>
|
1463 |
-
</tr>
|
1464 |
-
</thead>
|
1465 |
-
<tbody>
|
1466 |
-
<tr class='data' id="fv-player-list-item-#fv_list_dummy_key#"style="display:none">
|
1467 |
-
<td class='id'>#fv_list_dummy_key#</td>
|
1468 |
-
<td>
|
1469 |
-
<table>
|
1470 |
-
<tr>
|
1471 |
-
<td style="width:16%"><label>Header</label></td>
|
1472 |
-
<td><input type='text' name='email_lists[#fv_list_dummy_key#][title]' value='' /></td>
|
1473 |
-
</tr>
|
1474 |
-
<tr>
|
1475 |
-
<td><label>Message</label></td>
|
1476 |
-
<td><input type='text' name='email_lists[#fv_list_dummy_key#][description]' value='' /></td>
|
1477 |
-
</tr>
|
1478 |
-
</table>
|
1479 |
-
</td>
|
1480 |
-
<td>
|
1481 |
-
<a class='fv-player-list-export' href='http://example.org/wp-admin/options-general.php?page=fvplayer&fv-email-export=#fv_list_dummy_key#' target="_blank" >Download CSV</a>
|
1482 |
-
<br />
|
1483 |
-
<a class='fv-player-list-export' href='http://example.org/wp-admin/options-general.php?page=fvplayer&fv-email-export-screen=#fv_list_dummy_key#' target="_blank" >View list</a>
|
1484 |
-
</td>
|
1485 |
-
<td>
|
1486 |
-
<input type='hidden' name='email_lists[#fv_list_dummy_key#][first_name]' value='0' />
|
1487 |
-
<input id='list-first-name-#fv_list_dummy_key#' title="first name" type='checkbox' name='email_lists[#fv_list_dummy_key#][first_name]' value='1' />
|
1488 |
-
<label for='list-first-name-#fv_list_dummy_key#'>First Name</label>
|
1489 |
-
<br />
|
1490 |
-
<input type='hidden' name='email_lists[#fv_list_dummy_key#][last_name]' value='0' />
|
1491 |
-
<input id='list-last-name-#fv_list_dummy_key#' title="last name" type='checkbox' name='email_lists[#fv_list_dummy_key#][last_name]' value='1' />
|
1492 |
-
<label for='list-last-name-#fv_list_dummy_key#'>Last Name</label>
|
1493 |
-
</td>
|
1494 |
-
<td>
|
1495 |
-
<input type='hidden' name='email_lists[#fv_list_dummy_key#][disabled]' value='0' />
|
1496 |
-
<input id='ListAdDisabled-#fv_list_dummy_key#' type='checkbox' title="disable" name='email_lists[#fv_list_dummy_key#][disabled]' value='1' />
|
1497 |
-
<label for='ListAdDisabled-#fv_list_dummy_key#'>Disable</label>
|
1498 |
-
<br />
|
1499 |
-
<a class='fv-player-list-remove' href=''>Remove</a>
|
1500 |
-
</td>
|
1501 |
-
<td>
|
1502 |
-
<input type="button" style="visibility: hidden" class="fv_player_email_list_save button" value="Save & Preview" />
|
1503 |
-
</td>
|
1504 |
-
</tr>
|
1505 |
-
<tr class='data' id="fv-player-list-item-1">
|
1506 |
-
<td class='id'>1</td>
|
1507 |
-
<td>
|
1508 |
-
<table>
|
1509 |
-
<tr>
|
1510 |
-
<td style="width:16%"><label>Header</label></td>
|
1511 |
-
<td><input type='text' name='email_lists[1][title]' value='Subscribe to list one' /></td>
|
1512 |
-
</tr>
|
1513 |
-
<tr>
|
1514 |
-
<td><label>Message</label></td>
|
1515 |
-
<td><input type='text' name='email_lists[1][description]' value='Two good reasons to subscribe right now' /></td>
|
1516 |
-
</tr>
|
1517 |
-
</table>
|
1518 |
-
</td>
|
1519 |
-
<td>
|
1520 |
-
<a class='fv-player-list-export' href='http://example.org/wp-admin/options-general.php?page=fvplayer&fv-email-export=1' target="_blank" >Download CSV</a>
|
1521 |
-
<br />
|
1522 |
-
<a class='fv-player-list-export' href='http://example.org/wp-admin/options-general.php?page=fvplayer&fv-email-export-screen=1' target="_blank" >View list</a>
|
1523 |
-
</td>
|
1524 |
-
<td>
|
1525 |
-
<input type='hidden' name='email_lists[1][first_name]' value='0' />
|
1526 |
-
<input id='list-first-name-1' title="first name" type='checkbox' name='email_lists[1][first_name]' value='1' checked="checked" />
|
1527 |
-
<label for='list-first-name-1'>First Name</label>
|
1528 |
-
<br />
|
1529 |
-
<input type='hidden' name='email_lists[1][last_name]' value='0' />
|
1530 |
-
<input id='list-last-name-1' title="last name" type='checkbox' name='email_lists[1][last_name]' value='1' />
|
1531 |
-
<label for='list-last-name-1'>Last Name</label>
|
1532 |
-
</td>
|
1533 |
-
<td>
|
1534 |
-
<input type='hidden' name='email_lists[1][disabled]' value='0' />
|
1535 |
-
<input id='ListAdDisabled-1' type='checkbox' title="disable" name='email_lists[1][disabled]' value='1' />
|
1536 |
-
<label for='ListAdDisabled-1'>Disable</label>
|
1537 |
-
<br />
|
1538 |
-
<a class='fv-player-list-remove' href=''>Remove</a>
|
1539 |
-
</td>
|
1540 |
-
<td>
|
1541 |
-
<input type="button" style="visibility: hidden" class="fv_player_email_list_save button" value="Save & Preview" />
|
1542 |
-
</td>
|
1543 |
-
</tr>
|
1544 |
-
</tbody>
|
1545 |
-
</table>
|
1546 |
-
</td>
|
1547 |
-
</tr>
|
1548 |
-
<tr>
|
1549 |
-
<td>
|
1550 |
-
<input type="button" value="Add More Lists" class="button" id="fv-player-email_lists-add" />
|
1551 |
-
</td>
|
1552 |
-
</tr>
|
1553 |
-
</table>
|
1554 |
-
|
1555 |
-
<script>
|
1556 |
-
jQuery('#fv-player-email_lists-add').click( function() {
|
1557 |
-
var fv_player_list_index = (parseInt( jQuery('#fv-player-email_lists-settings tr.data:last .id').html() ) || 0 ) + 1;
|
1558 |
-
jQuery('#fv-player-email_lists-settings').append(jQuery('#fv-player-email_lists-settings tr.data:first').prop('outerHTML').replace(/#fv_list_dummy_key#/gi,fv_player_list_index + ""));
|
1559 |
-
jQuery('#fv-player-list-item-' + fv_player_list_index).show();
|
1560 |
-
return false;
|
1561 |
-
} );
|
1562 |
-
|
1563 |
-
jQuery(document).on('click','.fv-player-list-remove', false, function() {
|
1564 |
-
if( confirm('Are you sure you want to remove the list?') ){
|
1565 |
-
jQuery(this).parents('.data').remove();
|
1566 |
-
if(jQuery('#fv-player-email_lists-settings .data').length === 1) {
|
1567 |
-
jQuery('#fv-player-email_lists-add').trigger('click');
|
1568 |
-
}
|
1569 |
-
}
|
1570 |
-
return false;
|
1571 |
-
} );
|
1572 |
-
|
1573 |
-
jQuery(document).on('keydown change', '#fv-player-email_lists-settings', function(e) {
|
1574 |
-
var row = jQuery(e.target).parents('[id^="fv-player-list-item-"]');
|
1575 |
-
row.find('.fv_player_email_list_save').css('visibility','visible');
|
1576 |
-
});
|
1577 |
-
jQuery(document).on('click', '#fv-player-email_lists-settings input[type=checkbox]', function(e) {
|
1578 |
-
var row = jQuery(e.target).parents('[id^="fv-player-list-item-"]');
|
1579 |
-
row.find('.fv_player_email_list_save').css('visibility','visible');
|
1580 |
-
});
|
1581 |
-
|
1582 |
-
jQuery(document).on('click', '.fv_player_email_list_save', function() {
|
1583 |
-
var button = jQuery(this);
|
1584 |
-
var row = button.parents('[id^="fv-player-list-item-"]');
|
1585 |
-
var aInputs = row.find('input, select');
|
1586 |
-
var key = row.attr('id').replace(/fv-player-list-item-/,'');
|
1587 |
-
|
1588 |
-
fv_player_open_preview_window(null,640,360+100);
|
1589 |
-
|
1590 |
-
button.prop('disabled',true);
|
1591 |
-
jQuery.ajax( {
|
1592 |
-
type: "POST",
|
1593 |
-
url: ajaxurl,
|
1594 |
-
data: aInputs.serialize()+'&key='+key+'&action=fv_player_email_subscription_save&_wpnonce=71bf337548',
|
1595 |
-
success: function(response) {
|
1596 |
-
button.css('visibility','hidden');
|
1597 |
-
button.prop('disabled', false);
|
1598 |
-
|
1599 |
-
row.replaceWith( jQuery('#'+row.attr('id'),response) );
|
1600 |
-
|
1601 |
-
var shortcode = '[fvplayer src="https://player.vimeo.com/external/196881410.hd.mp4?s=24645ecff21ff60079fc5b7715a97c00f90c6a18&profile_id=174&oauth2_token_id=3501005" splash="https://i.vimeocdn.com/video/609485450_1280.jpg" preroll="no" postroll="no" subtitles="http://example.org/wp-content/plugins/fv-wordpress-flowplayer/images/test-subtitles.vtt" end_popup_preview="true" popup="email-#key#" caption="This is how the popup will appear at the end of a video"]';
|
1602 |
-
shortcode = shortcode.replace(/#key#/,key);
|
1603 |
-
|
1604 |
-
var url = 'http://example.org?fv_player_embed=1&fv_player_preview=' + b64EncodeUnicode(shortcode);
|
1605 |
-
fv_player_open_preview_window(url);
|
1606 |
-
},
|
1607 |
-
error: function() {
|
1608 |
-
button.val('Error saving!');
|
1609 |
-
}
|
1610 |
-
} );
|
1611 |
-
});
|
1612 |
-
</script>
|
1613 |
-
</div>
|
1614 |
-
</div>
|
1615 |
-
<div id="fv_flowplayer_email_integration" class="postbox " >
|
1616 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Email Integration</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Email Integration</span></h2>
|
1617 |
-
<div class="inside">
|
1618 |
-
<p>Enter your service API key and then assign it to a list which you create above.</p>
|
1619 |
-
<table class="form-table2" style="margin: 5px; ">
|
1620 |
-
<tr>
|
1621 |
-
<td style="width: 250px"><label for="mailchimp_api">Mailchimp API key:</label></td>
|
1622 |
-
<td>
|
1623 |
-
<p class="description">
|
1624 |
-
<input type="text" name="mailchimp_api" id="mailchimp_api" value="" />
|
1625 |
-
</p>
|
1626 |
-
</td>
|
1627 |
-
</tr>
|
1628 |
-
<tr>
|
1629 |
-
<td></td>
|
1630 |
-
<td>
|
1631 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1632 |
-
</td>
|
1633 |
-
</tr>
|
1634 |
-
</table>
|
1635 |
-
</div>
|
1636 |
-
</div>
|
1637 |
-
<div id="fv_flowplayer_ads" class="postbox " >
|
1638 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Ads</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Ads</span></h2>
|
1639 |
-
<div class="inside">
|
1640 |
-
<table class="form-table2">
|
1641 |
-
<tr>
|
1642 |
-
<td colspan="2">
|
1643 |
-
<label for="ad">Default Ad Code:</label><br />
|
1644 |
-
<textarea id="ad" name="ad" class="large-text code"></textarea>
|
1645 |
-
</td>
|
1646 |
-
</tr>
|
1647 |
-
<tr>
|
1648 |
-
<td colspan="2"><label for="ad_width">Default set size [px]:</label>
|
1649 |
-
<label for="ad_width">W:</label> <input type="text" name="ad_width" id="ad_width" value="0" class="small" />
|
1650 |
-
<label for="ad_height">H:</label> <input type="text" name="ad_height" id="ad_height" value="0" class="small" />
|
1651 |
-
<label for="adTextColor">Ad text</label> <input class="color small" type="text" name="adTextColor" id="adTextColor" value="#888" />
|
1652 |
-
<label for="adLinksColor">Ad links</label> <input class="color small" type="text" name="adLinksColor" id="adLinksColor" value="#ff3333" />
|
1653 |
-
</td>
|
1654 |
-
</tr>
|
1655 |
-
<tr>
|
1656 |
-
<td>
|
1657 |
-
<label for="ad_show_after">Show After [s]:</label> <input type="text" name="ad_show_after" id="ad_show_after" value="0" class="small" />
|
1658 |
-
</td>
|
1659 |
-
</tr>
|
1660 |
-
<tr>
|
1661 |
-
<td colspan="2">
|
1662 |
-
<label for="ad_css_select">Ad CSS:</label>
|
1663 |
-
<a href="#" onclick="jQuery('.ad_css_wrap').show(); jQuery(this).hide(); return false">Show styling options</a>
|
1664 |
-
<div class="ad_css_wrap" style="display: none; ">
|
1665 |
-
<select id="ad_css_select">
|
1666 |
-
<option value="">Select your preset</option>
|
1667 |
-
<option value=".wpfp_custom_ad { position: absolute; bottom: 10%; z-index: 20; width: 100%; }
|
1668 |
-
.wpfp_custom_ad_content { background: white; margin: 0 auto; position: relative }" selected="selected">Default (white, centered above the control bar)</option>
|
1669 |
-
<option value=".wpfp_custom_ad { position: absolute; bottom: 0; z-index: 20; width: 100%; }
|
1670 |
-
.wpfp_custom_ad_content { background: white; margin: 0 auto; position: relative }">White, centered at the bottom of the video</option>
|
1671 |
-
</select>
|
1672 |
-
<br />
|
1673 |
-
<textarea rows="5" name="ad_css" id="ad_css" class="large-text code">.wpfp_custom_ad { position: absolute; bottom: 10%; z-index: 20; width: 100%; }
|
1674 |
-
.wpfp_custom_ad_content { background: white; margin: 0 auto; position: relative }</textarea>
|
1675 |
-
<p class="description">(Hint: put .wpfp_custom_ad_content before your own CSS selectors)</p>
|
1676 |
-
<script type="text/javascript">
|
1677 |
-
jQuery('#ad_css_select').change( function() {
|
1678 |
-
if( jQuery('#ad_css_select option:selected').val().length > 0 && jQuery('#ad_css_select option:selected').val() != jQuery('#ad_css').val() && confirm('Are you sure you want to apply the preset?') ) {
|
1679 |
-
jQuery('#ad_css').val( jQuery('#ad_css_select option:selected').val() );
|
1680 |
-
}
|
1681 |
-
} );
|
1682 |
-
</script>
|
1683 |
-
</div>
|
1684 |
-
</td>
|
1685 |
-
</tr>
|
1686 |
-
<tr>
|
1687 |
-
<td colspan="4">
|
1688 |
-
<input type="submit" name="fv-wp-flowplayer-submit" class="button-primary" value="Save All Changes" />
|
1689 |
-
</td>
|
1690 |
-
</tr>
|
1691 |
-
</table>
|
1692 |
-
</div>
|
1693 |
-
</div>
|
1694 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
1695 |
-
</div>
|
1696 |
-
<div id='postbox-container-tab_video_intelligence' class='postbox-container' style="">
|
1697 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_video_intelligence" class="postbox " >
|
1698 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: video intelligence</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>video intelligence</span></h2>
|
1699 |
-
<div class="inside">
|
1700 |
-
<style>
|
1701 |
-
#fv_flowplayer_video_intelligence_revival { display: none }
|
1702 |
-
</style>
|
1703 |
-
<input type="hidden" id="nonce_fv_player_vi_install" name="nonce_fv_player_vi_install" value="d9672c9ed6" /><input type="hidden" name="_wp_http_referer" value="" />
|
1704 |
-
<table class="form-table2" style="margin: 5px; ">
|
1705 |
-
<tbody>
|
1706 |
-
<tr>
|
1707 |
-
<td class="first">
|
1708 |
-
<img src="http://example.org/wp-content/plugins/fv-wordpress-flowplayer/images/vi-logo.svg" alt="video intelligence logo" />
|
1709 |
-
<a href="https://vi.ai/publisher-video-monetization/?aid=foliovision&email=&url=http://example.org&invtype=3#publisher_signup" target="_blank" class="button vi-register">Learn More</a>
|
1710 |
-
</td>
|
1711 |
-
<td>
|
1712 |
-
<p>Video content and video advertising – powered by <strong>video intelligence</strong></p>
|
1713 |
-
<p>Advertisers pay more for video advertising when it's matched with video content. This new video player will insert both on your page. It increases time on site, and commands a higher CPM than display advertising.</p>
|
1714 |
-
<p>You'll see video content that is matched to your sites keywords straight away. A few days after activation you'll begin to receive revenue from advertising served before this video content.</p>
|
1715 |
-
<ul>
|
1716 |
-
<li>The set up takes only a few minutes</li>
|
1717 |
-
<li>Up to 10x higher CPM than traditional display advertising</li>
|
1718 |
-
<li>Users spend longer on your site thanks to professional video content</li>
|
1719 |
-
</ul>
|
1720 |
-
</td>
|
1721 |
-
</tr>
|
1722 |
-
<tr>
|
1723 |
-
<td></td>
|
1724 |
-
<td>
|
1725 |
-
<p>By clicking sign up you agree to send your current domain, email and affiliate ID to video intelligence.</p>
|
1726 |
-
<a href="https://vi.ai/publisher-video-monetization/?aid=foliovision&email=&url=http://example.org&invtype=3#publisher_signup" target="_blank" class="button vi-register">Learn More or Create an Account</a>
|
1727 |
-
</td>
|
1728 |
-
</tr>
|
1729 |
-
</tbody>
|
1730 |
-
</table>
|
1731 |
-
|
1732 |
-
</div>
|
1733 |
-
</div>
|
1734 |
-
<div id="fv_flowplayer_video_intelligence_account" class="postbox " >
|
1735 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Account</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Account</span></h2>
|
1736 |
-
<div class="inside">
|
1737 |
-
<input type="hidden" id="nonce_fv_player_vi_install" name="nonce_fv_player_vi_install" value="d9672c9ed6" /><input type="hidden" name="_wp_http_referer" value="" />
|
1738 |
-
<table class="form-table2" style="margin: 5px; ">
|
1739 |
-
<tbody>
|
1740 |
-
<tr>
|
1741 |
-
<td class="first"><label for="vi_login">Login:</label></td>
|
1742 |
-
<td>
|
1743 |
-
<p class="description">
|
1744 |
-
<input type="text" name="vi_login" id="vi_login" class="medium" />
|
1745 |
-
</p>
|
1746 |
-
</td>
|
1747 |
-
</tr>
|
1748 |
-
<tr>
|
1749 |
-
<td><label for="vi_pass">Password:</label></td>
|
1750 |
-
<td>
|
1751 |
-
<p class="description">
|
1752 |
-
<input type="password" name="vi_pass" id="vi_pass" class="medium" />
|
1753 |
-
</p>
|
1754 |
-
</td>
|
1755 |
-
</tr>
|
1756 |
-
<tr>
|
1757 |
-
<td>
|
1758 |
-
</td>
|
1759 |
-
<td>
|
1760 |
-
<input type="submit" name="fv_player_vi_install" value="Sign in" class="button-primary">
|
1761 |
-
</td>
|
1762 |
-
</tr>
|
1763 |
-
<tr>
|
1764 |
-
<td></td>
|
1765 |
-
<td>
|
1766 |
-
<p><a href="mailto:support@vi.ai?Subject=Issues%20with%20account%20activation%20for%20http%3A%2F%2Fexample.org">I'm having issues with the account activation</a></p>
|
1767 |
-
</td>
|
1768 |
-
</tr>
|
1769 |
-
</tbody>
|
1770 |
-
</table>
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
</div>
|
1775 |
-
</div>
|
1776 |
-
<div id="fv_flowplayer_video_intelligence_hide" class="postbox " >
|
1777 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Hide vi Ads</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Hide vi Ads</span></h2>
|
1778 |
-
<div class="inside">
|
1779 |
-
<input id="fv-player-vi-remove" type="checkbox"> <label for="fv-player-vi-remove">Hide the vi Ads tab</label>
|
1780 |
-
<script>
|
1781 |
-
jQuery( function($) {
|
1782 |
-
$('#fv-player-vi-remove').click( function() {
|
1783 |
-
$.post(ajaxurl, {action:'fv-player-vi-remove'}, function() {
|
1784 |
-
$('#fv-player-vi-give-back').prop('checked',false);
|
1785 |
-
$('[href=#postbox-container-tab_video_intelligence]').hide();
|
1786 |
-
$('#fv_flowplayer_video_intelligence').hide();
|
1787 |
-
$('[href=#postbox-container-tab_video_ads]').click();
|
1788 |
-
$('#fv_flowplayer_video_intelligence_revival').show();
|
1789 |
-
});
|
1790 |
-
|
1791 |
-
});
|
1792 |
-
});
|
1793 |
-
</script>
|
1794 |
-
</div>
|
1795 |
-
</div>
|
1796 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
1797 |
-
</div>
|
1798 |
-
<div id='postbox-container-tab_help' class='postbox-container' style="">
|
1799 |
-
<div id="normal-sortables" class="meta-box-sortables"><div id="fv_flowplayer_usage" class="postbox " >
|
1800 |
-
<button type="button" class="handlediv" aria-expanded="true"><span class="screen-reader-text">Toggle panel: Usage</span><span class="toggle-indicator" aria-hidden="true"></span></button><h2 class="hndle"><span>Usage</span></h2>
|
1801 |
-
<div class="inside">
|
1802 |
-
<table class="form-table">
|
1803 |
-
<tr>
|
1804 |
-
<td colspan="4">
|
1805 |
-
<div class="column">
|
1806 |
-
<div class="icon32" id="icon-users"><br></div>
|
1807 |
-
<p>Illustrated user guides:</p>
|
1808 |
-
<div class="clear"></div>
|
1809 |
-
<ul>
|
1810 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/start-up-guide#insert-videos">Inserting videos</a>
|
1811 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/start-up-guide">License key and custom logo</a></li>
|
1812 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/creating-playlists">How to create a playlist</a></li>
|
1813 |
-
<li><a target="_blank" href="https://foliovision.com/player/ads">Using ads</a></li>
|
1814 |
-
<li><a target="_blank" href="https://foliovision.com/player/ads/incorporating-google-adsense">Using Google Ads</a></li>
|
1815 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/securing-your-video/rtmp-streams">RTMP streams</a></li>
|
1816 |
-
<li><a target="_blank" href="https://foliovision.com/player/advanced/subtitles">Subtitles</a></li>
|
1817 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/secure-amazon-s3-guide">Amazon S3 secure content guide</a></li>
|
1818 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/securing-your-video/hls-stream">How to setup a HLS stream</a></li>
|
1819 |
-
<li><a target="_blank" href="https://foliovision.com/player/advanced/google-analytics-flowplayer">Google Analytics support</a></li>
|
1820 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/using-lightbox">Video lightbox</a></li>
|
1821 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/youtube-with-fv-player">YouTube integration</a></li>
|
1822 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/setting-quality-switching">Quality Switching</a></li>
|
1823 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/how-to-use-vimeo">Vimeo integration</a></li>
|
1824 |
-
<li><a target="_blank" href="https://foliovision.com/player/ads/using-preroll-postroll-ads">Custom video ads</a></li>
|
1825 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/serving-private-cloudfront">CloudFront CDN - protected video downloads</a></li>
|
1826 |
-
</ul>
|
1827 |
-
</div>
|
1828 |
-
<div class="column">
|
1829 |
-
<div class="icon32" id="icon-tools"><br></div>
|
1830 |
-
<p>Troubleshooting:</p>
|
1831 |
-
<div class="clear"></div>
|
1832 |
-
<ul>
|
1833 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/installation">Automated checks</a></li>
|
1834 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/encoding">Video encoding tips</a></li>
|
1835 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/encoding#flash-only">Video formats to avoid</a></li>
|
1836 |
-
<li><a target="_blank" href="https://foliovision.com/player/video-hosting/secure-amazon-s3-guide/fix-amazon-mime-type">Fixing mime type on Amazon S3</a></li>
|
1837 |
-
<li><a target="_blank" href="https://foliovision.com/player/basic-setup/faq">Plugin FAQ</a></li>
|
1838 |
-
<li><a target="_blank" href="http://foliovision.com/support/fv-wordpress-flowplayer/">Support forums</a></li>
|
1839 |
-
</ul>
|
1840 |
-
</div>
|
1841 |
-
<div class="clear"></div>
|
1842 |
-
<!--<p>
|
1843 |
-
To embed video "example.mp4", simply include the following code inside any post or page:
|
1844 |
-
<code>[fvplayer src=example.mp4]</code>
|
1845 |
-
</p>
|
1846 |
-
<p>
|
1847 |
-
<code>src</code> is the only compulsory parameter, specifying the video file. Its value can be either a full URL of the file,
|
1848 |
-
or just a filename (if it is located in the /videos/ directory in the root of the web).
|
1849 |
-
</p>
|
1850 |
-
<p>When user uploads are allowed, uploading or selecting video from WP Media Library is available. To insert selected video, simply use the 'Insert into Post' button.</p>
|
1851 |
-
<h4>Optional parameters:</h4>
|
1852 |
-
<ul style="text-align: left;">
|
1853 |
-
<li><code><strong>width</strong></code> and <code><strong>height</strong></code> specify the dimensions of played video in pixels. If they are not set, the default size is 320x240.<br />
|
1854 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' width=640 height=480]</code></li>
|
1855 |
-
<li><code><strong>splash</strong></code> parameter can be used to display a custom splash image before the video starts. Just like in case of <code>src</code>
|
1856 |
-
parameter, its value can be either complete URL, or filename of an image located in /videos/ folder.<br />
|
1857 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' splash=image.jpg]</code></li>
|
1858 |
-
<li><code><strong>splashend</strong></code> parameter can be used to display a custom splash image after the video ends.<br />
|
1859 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' splashend=show]</code></li>
|
1860 |
-
<li><code><strong>autoplay</strong></code> parameter specify wheter the video should start to play automaticaly after the page is loaded. This parameter overrides the default autoplay setting above. Its value can be either true or false.<br />
|
1861 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' autoplay=true]</code></li>
|
1862 |
-
<li><code><strong>loop</strong></code> parameter specify wheter the video starts again from the beginning when the video ends. Its value can be either true or false.<br />
|
1863 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' loop=true]</code></li>
|
1864 |
-
<li><code><strong>popup</strong></code> parameter can be used to display any HTML code after the video finishes (ideal for advertisment or links to similar videos).
|
1865 |
-
Content you want to display must be between simple quotes (<code>''</code>).<br />
|
1866 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' popup='<p>some HTML content</p>']</code></li>
|
1867 |
-
<li><code><strong>redirect</strong></code> parameter can be used to redirect to another page (in a new tab) after the video ends.<br />
|
1868 |
-
<i>Example</i>: <code>[fvplayer src='example.mp4' redirect='http://www.site.com']</code></li>
|
1869 |
-
</ul>-->
|
1870 |
-
</td>
|
1871 |
-
<td></td>
|
1872 |
-
</tr>
|
1873 |
-
</table>
|
1874 |
-
</div>
|
1875 |
-
</div>
|
1876 |
-
</div><input type="hidden" id="closedpostboxesnonce" name="closedpostboxesnonce" value="d28516cc79" /><input type="hidden" id="meta-box-order-nonce" name="meta-box-order-nonce" value="3edef551d9" />
|
1877 |
-
</div>
|
1878 |
-
<div style="clear: both"></div>
|
1879 |
-
</div>
|
1880 |
-
<input type="hidden" id="fv_flowplayer_settings_nonce" name="fv_flowplayer_settings_nonce" value="6efb8df58f" /><input type="hidden" name="_wp_http_referer" value="" /> </form>
|
1881 |
-
|
1882 |
-
</div>
|
1883 |
-
<script type="text/javascript" >
|
1884 |
-
function flowplayer_conversion_script() {
|
1885 |
-
jQuery('#fv-flowplayer-loader').show();
|
1886 |
-
|
1887 |
-
var data = {
|
1888 |
-
action: 'flowplayer_conversion_script',
|
1889 |
-
run: true
|
1890 |
-
};
|
1891 |
-
|
1892 |
-
jQuery.post(ajaxurl, data, function(response) {
|
1893 |
-
jQuery('#fv-flowplayer-loader').hide();
|
1894 |
-
jQuery('#conversion-results').html(response);
|
1895 |
-
jQuery('#fvwpflowplayer_conversion_notice').hide();
|
1896 |
-
});
|
1897 |
-
}
|
1898 |
-
|
1899 |
-
function fv_flowplayer_ajax_check( type ) {
|
1900 |
-
jQuery('.'+type+'-spin').show();
|
1901 |
-
var ajaxurl = 'http://example.org/wp-admin/admin-ajax.php';
|
1902 |
-
jQuery.post( ajaxurl, { action: type }, function( response ) {
|
1903 |
-
response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
|
1904 |
-
response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
|
1905 |
-
try {
|
1906 |
-
var obj = (jQuery.parseJSON( response ) );
|
1907 |
-
var css_class = '';
|
1908 |
-
jQuery('#fv_flowplayer_admin_notices').html('');
|
1909 |
-
if( obj.errors && obj.errors.length > 0 ) {
|
1910 |
-
jQuery('#fv_flowplayer_admin_notices').append( '<div class="error"><p>'+obj.errors.join('</p><p>')+'</p></div>' );
|
1911 |
-
} else {
|
1912 |
-
css_class = ' green';
|
1913 |
-
}
|
1914 |
-
|
1915 |
-
if( obj.ok && obj.ok.length > 0 ) {
|
1916 |
-
jQuery('#fv_flowplayer_admin_notices').append( '<div class="updated'+css_class+'"><p>'+obj.ok.join('</p><p>')+'</p></div>' );
|
1917 |
-
}
|
1918 |
-
|
1919 |
-
} catch(err) {
|
1920 |
-
jQuery('#fv_flowplayer_admin_notices').append( jQuery('#wpbody', response ) );
|
1921 |
-
|
1922 |
-
}
|
1923 |
-
|
1924 |
-
jQuery('.'+type+'-spin').hide();
|
1925 |
-
} );
|
1926 |
-
}
|
1927 |
-
|
1928 |
-
var fv_flowplayer_amazon_s3_count = 0;
|
1929 |
-
jQuery('#amazon-s3-add').click( function() {
|
1930 |
-
var new_inputs = jQuery('tr.amazon-s3-first').clone();
|
1931 |
-
new_inputs.find('input').attr('value','');
|
1932 |
-
new_inputs.attr('class', new_inputs.attr('class') + '-' + fv_flowplayer_amazon_s3_count );
|
1933 |
-
new_inputs.insertBefore('.amazon-s3-last');
|
1934 |
-
fv_flowplayer_amazon_s3_count++;
|
1935 |
-
return false;
|
1936 |
-
} );
|
1937 |
-
|
1938 |
-
function fv_fp_amazon_s3_remove(a) {
|
1939 |
-
jQuery( '.'+jQuery(a).parents('tr').attr('class') ).remove();
|
1940 |
-
}
|
1941 |
-
</script>
|
1942 |
-
|
1943 |
-
|
1944 |
-
<script type="text/javascript">
|
1945 |
-
//<![CDATA[
|
1946 |
-
jQuery(document).ready( function($) {
|
1947 |
-
// close postboxes that should be closed
|
1948 |
-
$('.if-js-closed').removeClass('if-js-closed').addClass('closed');
|
1949 |
-
// postboxes setup
|
1950 |
-
postboxes.add_postbox_toggles('fv_flowplayer_settings');
|
1951 |
-
|
1952 |
-
jQuery('.fv_wp_flowplayer_activate_extension').click( function() { // todo: block multiple clicks
|
1953 |
-
var button = jQuery(this);
|
1954 |
-
button.siblings('img').eq(0).show();
|
1955 |
-
|
1956 |
-
jQuery.post( ajaxurl, { action: 'fv_wp_flowplayer_activate_extension', nonce: 'a3b037f3a9', plugin: jQuery(this).attr("data-plugin") }, function( response ) {
|
1957 |
-
button.siblings('img').eq(0).hide();
|
1958 |
-
|
1959 |
-
var obj;
|
1960 |
-
try {
|
1961 |
-
response = response.replace( /[\s\S]*<FVFLOWPLAYER>/, '' );
|
1962 |
-
response = response.replace( /<\/FVFLOWPLAYER>[\s\S]*/, '' );
|
1963 |
-
obj = jQuery.parseJSON( response );
|
1964 |
-
|
1965 |
-
button.removeClass('fv_wp_flowplayer_activate_extension');
|
1966 |
-
button.attr('value',obj.message);
|
1967 |
-
|
1968 |
-
if( typeof(obj.error) == "undefined" ) {
|
1969 |
-
//window.location.hash = '#'+jQuery(button).attr("data-plugin");
|
1970 |
-
//window.location.reload(true);
|
1971 |
-
window.location.href = window.location.href;
|
1972 |
-
}
|
1973 |
-
} catch(e) { // todo: what if there is "<p>Plugin install failed.</p>"
|
1974 |
-
button.after('<p>Error parsing JSON</p>');
|
1975 |
-
return;
|
1976 |
-
}
|
1977 |
-
|
1978 |
-
} ).error(function() {
|
1979 |
-
button.siblings('img').eq(0).hide();
|
1980 |
-
button.after('<p>Error!</p>');
|
1981 |
-
});
|
1982 |
-
} );
|
1983 |
-
|
1984 |
-
jQuery('.fv-flowplayer-admin-addon-installed').click( function() {
|
1985 |
-
jQuery('html, body').animate({
|
1986 |
-
scrollTop: jQuery("#"+jQuery(this).attr("data-plugin") ).offset().top
|
1987 |
-
}, 1000);
|
1988 |
-
} );
|
1989 |
-
|
1990 |
-
jQuery('.show-more').click( function(e) {
|
1991 |
-
e.preventDefault();
|
1992 |
-
|
1993 |
-
var more = jQuery('.more', jQuery(this).parents('tr') ).length ? jQuery('.more', jQuery(this).parents('tr') ) : jQuery(this).parent().siblings('.more');
|
1994 |
-
|
1995 |
-
more.toggle();
|
1996 |
-
|
1997 |
-
if( jQuery(':visible', more ).length > 0 ) {
|
1998 |
-
jQuery(this).attr('data-original-help-text', jQuery(this).html() );
|
1999 |
-
jQuery(this).html('(hide)');
|
2000 |
-
} else {
|
2001 |
-
jQuery(this).html( jQuery(this).attr('data-original-help-text') );
|
2002 |
-
}
|
2003 |
-
} );
|
2004 |
-
|
2005 |
-
/*
|
2006 |
-
* Coor Picker Default
|
2007 |
-
*/
|
2008 |
-
jQuery('.playlistFontColor-show').click(function(e){
|
2009 |
-
e.preventDefault();
|
2010 |
-
jQuery(e.target).hide();
|
2011 |
-
jQuery('.playlistFontColor-hide').show();
|
2012 |
-
|
2013 |
-
jQuery('#playlistFontColor-proxy').show().val(jQuery('#playlistFontColor-proxy').data('previous'));
|
2014 |
-
jQuery('#playlistFontColor').val(jQuery('#playlistFontColor-proxy').data('previous'));
|
2015 |
-
});
|
2016 |
-
|
2017 |
-
jQuery('.playlistFontColor-hide').click(function(e){
|
2018 |
-
e.preventDefault();
|
2019 |
-
jQuery(e.target).hide();
|
2020 |
-
jQuery('.playlistFontColor-show').show();
|
2021 |
-
|
2022 |
-
jQuery('#playlistFontColor-proxy').data('previous',jQuery('#playlistFontColor-proxy').hide().val()).val('');
|
2023 |
-
jQuery('#playlistFontColor').val('');
|
2024 |
-
});
|
2025 |
-
|
2026 |
-
jQuery('#playlistFontColor-proxy').on('change',function(e){
|
2027 |
-
jQuery('#playlistFontColor').val(jQuery(e.target).val());
|
2028 |
-
});
|
2029 |
-
});
|
2030 |
-
//]]>
|
2031 |
-
</script>
|
2032 |
-
|
2033 |
-
<script>
|
2034 |
-
/* TABS */
|
2035 |
-
jQuery(document).ready(function(){
|
2036 |
-
jQuery('#fv_player_js_warning').hide();
|
2037 |
-
|
2038 |
-
var anchor = window.location.hash.substring(1);
|
2039 |
-
if( !anchor || !anchor.match(/tab_/) ) {
|
2040 |
-
anchor = 'postbox-container-tab_basic';
|
2041 |
-
}
|
2042 |
-
|
2043 |
-
jQuery('#fv_flowplayer_admin_tabs .nav-tab').removeClass('nav-tab-active');
|
2044 |
-
jQuery('[href=#'+anchor+']').addClass('nav-tab-active');
|
2045 |
-
jQuery('#dashboard-widgets .postbox-container').hide();
|
2046 |
-
jQuery('#' + anchor).show();
|
2047 |
-
});
|
2048 |
-
jQuery('#fv_flowplayer_admin_tabs a').on('click',function(e){
|
2049 |
-
e.preventDefault();
|
2050 |
-
window.location.hash = e.target.hash;
|
2051 |
-
var anchor = jQuery(this).attr('href').substring(1);
|
2052 |
-
jQuery('#fv_flowplayer_admin_tabs .nav-tab').removeClass('nav-tab-active');
|
2053 |
-
jQuery('[href=#'+anchor+']').addClass('nav-tab-active');
|
2054 |
-
jQuery('#dashboard-widgets .postbox-container').hide();
|
2055 |
-
jQuery('#' + anchor).show();
|
2056 |
-
});
|
2057 |
-
|
2058 |
-
|
2059 |
-
jQuery('a.fv-settings-anchor').on('click',function(e){
|
2060 |
-
var id = jQuery(this).attr('href');
|
2061 |
-
if( id.match(/^#./) ){
|
2062 |
-
var el = jQuery(id);
|
2063 |
-
if(el.length){
|
2064 |
-
var tab = el.parents('.postbox-container').attr('id');
|
2065 |
-
jQuery('#fv_flowplayer_admin_tabs').find('a[href=#'+tab+']').click()
|
2066 |
-
}
|
2067 |
-
}
|
2068 |
-
});
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/backend/videointelligenceInstallTest.php
DELETED
@@ -1,80 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_videointelligenceInstallTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
var $directory = WP_CONTENT_DIR.'/plugins/fv-player-video-intelligence';
|
12 |
-
|
13 |
-
// we need to convince it is showing the FV Player settings screen!
|
14 |
-
public static function wpSetUpBeforeClass() {
|
15 |
-
set_current_screen( 'settings_page_fvplayer' );
|
16 |
-
|
17 |
-
parent::wpSetUpBeforeClass();
|
18 |
-
|
19 |
-
remove_action( 'admin_init', 'wp_admin_headers' );
|
20 |
-
do_action( 'admin_init' );
|
21 |
-
}
|
22 |
-
|
23 |
-
public function setUp() {
|
24 |
-
parent::setUp();
|
25 |
-
|
26 |
-
// add new user and create last saved position metadata for this new user
|
27 |
-
$this->userID = $this->factory->user->create(array(
|
28 |
-
'role' => 'admin'
|
29 |
-
));
|
30 |
-
|
31 |
-
}
|
32 |
-
|
33 |
-
public function testInstall() {
|
34 |
-
|
35 |
-
$this->assertTrue( defined('FV_PLAYER_VI_USER') && defined('FV_PLAYER_VI_PASS') );
|
36 |
-
|
37 |
-
// we need to submit a valid vi Ads login with an admin user capable of installing plugins
|
38 |
-
global $current_user;
|
39 |
-
wp_set_current_user($this->userID);
|
40 |
-
$current_user->add_cap( 'install_plugins' );
|
41 |
-
|
42 |
-
$_POST['vi_login'] = FV_PLAYER_VI_USER;
|
43 |
-
$_POST['vi_pass'] = FV_PLAYER_VI_PASS;
|
44 |
-
$_POST['fv_player_vi_install'] = true;
|
45 |
-
$_REQUEST['nonce_fv_player_vi_install'] = wp_create_nonce('fv_player_vi_install'); // notice the nonce goes into $_REQUEST
|
46 |
-
|
47 |
-
$this->assertFalse( file_exists($this->directory) );
|
48 |
-
|
49 |
-
do_action( 'admin_menu' );
|
50 |
-
|
51 |
-
$this->assertEquals( "FV Player video intelligence extension installed successfully!", get_option('fv_wordpress_flowplayer_deferred_notices') );
|
52 |
-
|
53 |
-
$this->assertFileExists( $this->directory );
|
54 |
-
|
55 |
-
do_action( 'admin_menu' );
|
56 |
-
|
57 |
-
$this->assertEquals( "FV Player video intelligence extension upgraded successfully!", get_option('fv_wordpress_flowplayer_deferred_notices') );
|
58 |
-
}
|
59 |
-
|
60 |
-
public function tearDown() {
|
61 |
-
unset($_POST['vi_login']);
|
62 |
-
unset($_POST['vi_pass']);
|
63 |
-
unset($_POST['fv_player_vi_install']);
|
64 |
-
unset($_REQUEST['nonce_fv_player_vi_install']);
|
65 |
-
|
66 |
-
if( strlen($this->directory) > 10 ) {
|
67 |
-
$this->removeDirectory($this->directory);
|
68 |
-
}
|
69 |
-
}
|
70 |
-
|
71 |
-
private function removeDirectory($path) {
|
72 |
-
$files = glob($path . '/*');
|
73 |
-
foreach ($files as $file) {
|
74 |
-
is_dir($file) ? $this->removeDirectory($file) : unlink($file);
|
75 |
-
}
|
76 |
-
rmdir($path);
|
77 |
-
return;
|
78 |
-
}
|
79 |
-
|
80 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/bootstrap.php
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Bootstrap the plugin unit testing environment.
|
4 |
-
*
|
5 |
-
* Edit 'active_plugins' setting below to point to your main plugin file.
|
6 |
-
*
|
7 |
-
* @package wordpress-plugin-tests
|
8 |
-
*/
|
9 |
-
|
10 |
-
/**
|
11 |
-
* PLEASE NOTE - before this can be used, please checkout the latest WP TestSuite
|
12 |
-
* by using "svn checkout http://develop.svn.wordpress.org/trunk/ testSuite" and rename
|
13 |
-
* files "wp-config-sample.php" and "wp-tests-config-sample.php" by removing the "-sample"
|
14 |
-
* part from it. Then update those files to contain an EMPTY database and login information,
|
15 |
-
* as these tests will create a NEW WP INSTALLATION AND WIPE OUT EVERYTHING THERE IS IN THE DB.
|
16 |
-
*
|
17 |
-
* Also, please make sure to update the value of "WP_PHP_BINARY" constant to point to your PHP binary.
|
18 |
-
*/
|
19 |
-
|
20 |
-
// let whoever is listening know we're in test mode
|
21 |
-
define('PHPUnitTestMode', true);
|
22 |
-
|
23 |
-
// Activates this plugin in WordPress so it can be tested.
|
24 |
-
$GLOBALS['wp_tests_options'] = array(
|
25 |
-
'active_plugins' => array(
|
26 |
-
'fv-wordpress-flowplayer/flowplayer.php',
|
27 |
-
)
|
28 |
-
);
|
29 |
-
|
30 |
-
// If the develop repo location is defined (as WP_DEVELOP_DIR), use that
|
31 |
-
// location. Otherwise, we'll just assume that this plugin is installed in a
|
32 |
-
// WordPress develop SVN checkout.
|
33 |
-
|
34 |
-
if( false !== getenv( 'WP_DEVELOP_DIR' ) ) {
|
35 |
-
require getenv( 'WP_DEVELOP_DIR' ) . '/tests/phpunit/includes/bootstrap.php';
|
36 |
-
} else {
|
37 |
-
require '../testSuite/tests/phpunit/includes/bootstrap.php';
|
38 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/1-shortcodesTest.php
DELETED
@@ -1,52 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_ShortcodeTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
public function setUp() {
|
12 |
-
parent::setUp();
|
13 |
-
|
14 |
-
// create a post with playlist shortcode
|
15 |
-
$this->post_id_SimpleShortcode = $this->factory->post->create( array(
|
16 |
-
'post_title' => 'Simple Shortcode',
|
17 |
-
'post_content' => '[fvplayer src="https://cdn.site.com/video.mp4"]'
|
18 |
-
) );
|
19 |
-
|
20 |
-
/*global $fv_fp;
|
21 |
-
|
22 |
-
include_once "../../../fv-wordpress-flowplayer/models/flowplayer.php";
|
23 |
-
include_once "../../../fv-wordpress-flowplayer/models/flowplayer-frontend.php";
|
24 |
-
$fv_fp = new flowplayer_frontend();
|
25 |
-
|
26 |
-
include_once "../../beta/fv-player-pro.class.php";
|
27 |
-
$this->fvPlayerProInstance = new FV_Player_Pro();*/
|
28 |
-
}
|
29 |
-
|
30 |
-
public function testSimpleShortcode() {
|
31 |
-
global $post;
|
32 |
-
$post = get_post( $this->post_id_SimpleShortcode );
|
33 |
-
$post->ID = 1234;
|
34 |
-
|
35 |
-
remove_action('wp_head', 'wp_generator');
|
36 |
-
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
37 |
-
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
38 |
-
add_filter( 'wp_resource_hints', '__return_empty_array' );
|
39 |
-
|
40 |
-
wp_deregister_script( 'wp-embed' );
|
41 |
-
|
42 |
-
// note that you can only use wp_head() or wp_footer() once!
|
43 |
-
ob_start();
|
44 |
-
wp_head();
|
45 |
-
echo apply_filters( 'the_content', $post->post_content );
|
46 |
-
wp_footer();
|
47 |
-
$output = ob_get_clean();
|
48 |
-
|
49 |
-
$this->assertEquals( $this->fix_newlines(file_get_contents(dirname(__FILE__).'/testSimpleShortcode.html')), $this->fix_newlines($output) );
|
50 |
-
}
|
51 |
-
|
52 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/dbTest.php
DELETED
@@ -1,121 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_DBTest extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
public function setUp() {
|
12 |
-
parent::setUp();
|
13 |
-
|
14 |
-
global $FV_Player_Db;
|
15 |
-
$FV_Player_Db->import_player_data( false, false, json_decode( file_get_contents(dirname(__FILE__).'/player-data.json'), true) );
|
16 |
-
|
17 |
-
// create a post with playlist shortcode
|
18 |
-
$this->post_id_testEndActions= $this->factory->post->create( array(
|
19 |
-
'post_title' => 'End Action Test',
|
20 |
-
'post_content' => '[fvplayer src="https://cdn.site.com/video.mp4"]'
|
21 |
-
) );
|
22 |
-
|
23 |
-
// if we don't load something with a [fvplayer] shortcode in it it won't know to load CSS in header!
|
24 |
-
global $post;
|
25 |
-
$post = get_post( $this->post_id_testEndActions );
|
26 |
-
$post->ID = 1234;
|
27 |
-
|
28 |
-
// we remove header stuff which we don't want to test
|
29 |
-
remove_action('wp_head', 'wp_generator');
|
30 |
-
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
31 |
-
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
32 |
-
add_filter( 'wp_resource_hints', '__return_empty_array' );
|
33 |
-
wp_deregister_script( 'wp-embed' );
|
34 |
-
|
35 |
-
}
|
36 |
-
|
37 |
-
public function testDBShortcode() {
|
38 |
-
|
39 |
-
$output = apply_filters( 'the_content', '[fvplayer id="1"]' );
|
40 |
-
|
41 |
-
$sample = <<< HTML
|
42 |
-
<div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
|
43 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
44 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
45 |
-
|
46 |
-
</div>
|
47 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
|
48 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}],"id":1}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
|
49 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"id":2,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
|
50 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"id":3,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
|
51 |
-
</div>
|
52 |
-
HTML;
|
53 |
-
|
54 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
55 |
-
}
|
56 |
-
|
57 |
-
public function testDBShortcodeWithSort() {
|
58 |
-
|
59 |
-
$output = apply_filters( 'the_content', '[fvplayer id="1" sort="oldest"]' );
|
60 |
-
|
61 |
-
$sample = <<< HTML
|
62 |
-
<div id="wpfp_034c92b7716ddbcf3a90a3a26440386e" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg);" data-ratio="0.5625">
|
63 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
64 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
65 |
-
|
66 |
-
</div>
|
67 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_034c92b7716ddbcf3a90a3a26440386e">
|
68 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}],"id":1}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
|
69 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"id":2,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
|
70 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"id":3,"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
|
71 |
-
</div>
|
72 |
-
HTML;
|
73 |
-
|
74 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
75 |
-
|
76 |
-
$output = apply_filters( 'the_content', '[fvplayer id="1" sort="newest"]' );
|
77 |
-
|
78 |
-
$sample = <<< HTML
|
79 |
-
<div id="wpfp_abbc39b8f78820ec7d8d7a8e34d43856" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
|
80 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
81 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
82 |
-
|
83 |
-
</div>
|
84 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_abbc39b8f78820ec7d8d7a8e34d43856">
|
85 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
|
86 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
|
87 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
|
88 |
-
</div>
|
89 |
-
HTML;
|
90 |
-
|
91 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
92 |
-
|
93 |
-
$output = apply_filters( 'the_content', '[fvplayer id="1" sort="title"]' );
|
94 |
-
|
95 |
-
$sample = <<< HTML
|
96 |
-
<div id="wpfp_4836d78a28ea12e5df615a50be31878f" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png);" data-ratio="0.5625">
|
97 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
98 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
99 |
-
|
100 |
-
</div>
|
101 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_4836d78a28ea12e5df615a50be31878f">
|
102 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Carly-Simon-Anticipation-1971.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/images\/2014\/01\/carly-simon-1971-anticipation.vtt"}]}'><div style='background-image: url("https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png")'></div><h4><span>Carly Simon</span></h4></a>
|
103 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/dominika-960-31.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg")'></div><h4><span>Fire</span></h4></a>
|
104 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/foliovision.com\/videos\/Paypal-video-on-home-page.mp4","type":"video\/mp4"}],"subtitles":[{"srclang":"en","label":"English","src":"https:\/\/foliovision.com\/videos\/paypal-splash.vtt"}]}'><div style='background-image: url("https://foliovision.com/videos/paypal-splash.jpg")'></div><h4><span>PayPal Background Video</span></h4></a>
|
105 |
-
</div>
|
106 |
-
HTML;
|
107 |
-
|
108 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
109 |
-
}
|
110 |
-
|
111 |
-
public function testDBExport() {
|
112 |
-
global $FV_Player_Db;
|
113 |
-
$output = json_encode( $FV_Player_Db->export_player_data(false,false,1), JSON_UNESCAPED_SLASHES );
|
114 |
-
$this->assertEquals( file_get_contents(dirname(__FILE__).'/player-data.json'), $output );
|
115 |
-
}
|
116 |
-
|
117 |
-
public function tearDown() {
|
118 |
-
delete_option('fv_player_popups');
|
119 |
-
}
|
120 |
-
|
121 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/endActionsTest.php
DELETED
@@ -1,164 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_EndActionsTest extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
public function setUp() {
|
12 |
-
parent::setUp();
|
13 |
-
|
14 |
-
// create a post with playlist shortcode
|
15 |
-
$this->post_id_testEndActions= $this->factory->post->create( array(
|
16 |
-
'post_title' => 'End Action Test',
|
17 |
-
'post_content' => '[fvplayer src="https://cdn.site.com/video.mp4"]'
|
18 |
-
) );
|
19 |
-
|
20 |
-
// if we don't load something with a [fvplayer] shortcode in it it won't know to load CSS in header!
|
21 |
-
global $post;
|
22 |
-
$post = get_post( $this->post_id_testEndActions );
|
23 |
-
$post->ID = 1234;
|
24 |
-
|
25 |
-
// we remove header stuff which we don't want to test
|
26 |
-
remove_action('wp_head', 'wp_generator');
|
27 |
-
remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
|
28 |
-
remove_action( 'wp_print_styles', 'print_emoji_styles' );
|
29 |
-
add_filter( 'wp_resource_hints', '__return_empty_array' );
|
30 |
-
wp_deregister_script( 'wp-embed' );
|
31 |
-
|
32 |
-
// the test data
|
33 |
-
update_option('fv_player_popups', array( 1 => array (
|
34 |
-
'name' => '',
|
35 |
-
'html' => '<a href="https://foliovision.com/2018/07/panamax"><img src="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg" class="alignleft post-image entry-image lazyloaded " alt="PanamaX" itemprop="image" sizes="(max-width: 400px) 100vw, 400px" srcset="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg 400w, https://cdn.foliovision.com/images/2018/07/PanamaX-5.jpg 1128w" width="400" height="239"></a>',
|
36 |
-
'css' => '',
|
37 |
-
'disabled' => '0',
|
38 |
-
) ) );
|
39 |
-
}
|
40 |
-
|
41 |
-
public function testEndActionsEmailCollection() {
|
42 |
-
|
43 |
-
// triggering the default email list creation
|
44 |
-
global $FV_Player_Email_Subscription;
|
45 |
-
$FV_Player_Email_Subscription->init_options();
|
46 |
-
|
47 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="email-1"]' );
|
48 |
-
|
49 |
-
$sample = <<< HTML
|
50 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
|
51 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
52 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
53 |
-
</div>
|
54 |
-
HTML;
|
55 |
-
|
56 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
57 |
-
|
58 |
-
// is the email popup there?
|
59 |
-
wp_deregister_script('flowplayer');
|
60 |
-
flowplayer_prepare_scripts();
|
61 |
-
|
62 |
-
global $wp_scripts;
|
63 |
-
$this->assertTrue( stripos( $this->fix_newlines($wp_scripts->registered['flowplayer']->extra['data']), $this->fix_newlines('var fv_flowplayer_popup = {"wpfp_282c498132552aaa754164072eaaa0d0":{"html":"<div class=\"fv_player_popup fv_player_popup-1 wpfp_custom_popup_content\"><h3>Subscribe to list one<\/h3><p>Two good reasons to subscribe right now<\/p><form class=\"mailchimp-form mailchimp-form-2\"><input type=\"hidden\" name=\"list\" value=\"1\" \/><input type=\"email\" placeholder=\"Email Address\" name=\"email\"\/><input type=\"text\" placeholder=\"First Name\" name=\"first_name\" required\/><input type=\"submit\" value=\"Subscribe\"\/><\/form><\/div>","pause":false}}') ) !== false );
|
64 |
-
|
65 |
-
global $fv_fp;
|
66 |
-
$fv_fp->aPopups = array();
|
67 |
-
}
|
68 |
-
|
69 |
-
public function testEndActionsLoop() {
|
70 |
-
|
71 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" loop="true"]' );
|
72 |
-
|
73 |
-
$sample = <<< HTML
|
74 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_loop="1">
|
75 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
76 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
77 |
-
</div>
|
78 |
-
HTML;
|
79 |
-
|
80 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
81 |
-
}
|
82 |
-
|
83 |
-
public function testEndActionsPopupNumber() {
|
84 |
-
|
85 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" popup="1" share="no" embed="false"]' );
|
86 |
-
|
87 |
-
$sample = <<< HTML
|
88 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
|
89 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
90 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
91 |
-
</div>
|
92 |
-
HTML;
|
93 |
-
|
94 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
95 |
-
|
96 |
-
// are the popups ready?
|
97 |
-
wp_deregister_script('flowplayer');
|
98 |
-
flowplayer_prepare_scripts();
|
99 |
-
|
100 |
-
global $wp_scripts;
|
101 |
-
$this->assertTrue( stripos( $this->fix_newlines($wp_scripts->registered['flowplayer']->extra['data']), $this->fix_newlines('var fv_flowplayer_popup = {"wpfp_40dd5c9f6426b9d96be06d43e9224af8":{"html":"<div class=\"fv_player_popup fv_player_popup-1 wpfp_custom_popup_content\"><a href=\"https:\/\/foliovision.com\/2018\/07\/panamax\"><img src=\"https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5-400x239.jpg\" class=\"alignleft post-image entry-image lazyloaded \" alt=\"PanamaX\" itemprop=\"image\" sizes=\"(max-width: 400px) 100vw, 400px\" srcset=\"https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5-400x239.jpg 400w, https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5.jpg 1128w\" width=\"400\" height=\"239\"><\/a><\/div>","pause":false}};') ) !== false );
|
102 |
-
|
103 |
-
global $fv_fp;
|
104 |
-
$fv_fp->aPopups = array();
|
105 |
-
}
|
106 |
-
|
107 |
-
public function testEndActionsPopupHTML() {
|
108 |
-
|
109 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" popup="'.addslashes('<a href="https://foliovision.com/2018/07/panamax"><img src="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg" class="alignleft post-image entry-image lazyloaded " alt="PanamaX" itemprop="image" sizes="(max-width: 400px) 100vw, 400px" srcset="https://cdn.foliovision.com/images/2018/07/PanamaX-5-400x239.jpg 400w, https://cdn.foliovision.com/images/2018/07/PanamaX-5.jpg 1128w" width="400" height="239"></a>').'"]' );
|
110 |
-
|
111 |
-
$sample = <<< HTML
|
112 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
|
113 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
114 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
115 |
-
</div>
|
116 |
-
HTML;
|
117 |
-
|
118 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
119 |
-
|
120 |
-
// are the popups ready?
|
121 |
-
wp_deregister_script('flowplayer');
|
122 |
-
flowplayer_prepare_scripts();
|
123 |
-
|
124 |
-
global $wp_scripts;
|
125 |
-
$this->assertTrue( stripos( $this->fix_newlines($wp_scripts->registered['flowplayer']->extra['data']), $this->fix_newlines('var fv_flowplayer_popup = {"wpfp_40dd5c9f6426b9d96be06d43e9224af8":{"html":"<div class=\"fv_player_popup fv_player_popup-1 wpfp_custom_popup_content\"><a href=\"https:\/\/foliovision.com\/2018\/07\/panamax\"><img src=\"https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5-400x239.jpg\" class=\"alignleft post-image entry-image lazyloaded \" alt=\"PanamaX\" itemprop=\"image\" sizes=\"(max-width: 400px) 100vw, 400px\" srcset=\"https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5-400x239.jpg 400w, https:\/\/cdn.foliovision.com\/images\/2018\/07\/PanamaX-5.jpg 1128w\" width=\"400\" height=\"239\"><\/a><\/div>","pause":false}};') ) !== false );
|
126 |
-
|
127 |
-
global $fv_fp;
|
128 |
-
$fv_fp->aPopups = array();
|
129 |
-
}
|
130 |
-
|
131 |
-
public function testEndActionsRedirect() {
|
132 |
-
|
133 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" share="no" embed="false" redirect="https://foliovision.com"]' );
|
134 |
-
|
135 |
-
$sample = <<< HTML
|
136 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625" data-fv_redirect="https://foliovision.com">
|
137 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
138 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
139 |
-
</div>
|
140 |
-
HTML;
|
141 |
-
|
142 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
143 |
-
}
|
144 |
-
|
145 |
-
public function testEndActionsSplashEnd() {
|
146 |
-
|
147 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video.mp4" splash="https://cdn.site.com/video.jpg" share="no" embed="false" splashend="show"]' );
|
148 |
-
|
149 |
-
$sample = <<< HTML
|
150 |
-
<div id="wpfp_2534ca47632437a90737cb5c0e27b461" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video.jpg);" data-ratio="0.5625">
|
151 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
152 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
153 |
-
<div id="wpfp_ebf1dd081f973cd9a2b19499445705f2_custom_background" class="wpfp_custom_background" style="position: absolute; background: url('https://cdn.site.com/video.jpg') no-repeat center center; background-size: contain; width: 100%; height: 100%; z-index: 1;"></div>
|
154 |
-
</div>
|
155 |
-
HTML;
|
156 |
-
|
157 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
158 |
-
}
|
159 |
-
|
160 |
-
public function tearDown() {
|
161 |
-
delete_option('fv_player_popups');
|
162 |
-
}
|
163 |
-
|
164 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/player-data.json
DELETED
@@ -1 +0,0 @@
|
|
1 |
-
{"ab":"","ad":"","ad_height":"","ad_width":"","ad_skip":"","align":"","autoplay":"","controlbar":"","copy_text":"","embed":"off","end_actions":"","end_action_value":"","height":"","hflip":"","lightbox":"","lightbox_caption":"","lightbox_height":"","lightbox_width":"","player_name":"MP4 Test Playlist","player_slug":"","playlist":"","playlist_advance":"","qsel":"","share":"no","share_title":"","share_url":"","speed":"","sticky":"","video_ads":"","video_ads_post":"","width":"","videos":[{"caption":"Fire","end":"","mobile":"","rtmp":"","rtmp_path":"","splash":"https://foliovision.com/video/burning-hula-hoop-girl-dominika.jpg","splash_text":"","src":"https://foliovision.com/videos/dominika-960-31.mp4","src1":"","src2":"","start":"","meta":[]},{"caption":"PayPal Background Video","end":"","mobile":"","rtmp":"","rtmp_path":"","splash":"https://foliovision.com/videos/paypal-splash.jpg","splash_text":"","src":"https://foliovision.com/videos/Paypal-video-on-home-page.mp4","src1":"","src2":"","start":"","meta":[{"meta_key":"subtitles_en","meta_value":"https://foliovision.com/videos/paypal-splash.vtt"}]},{"caption":"Carly Simon","end":"","mobile":"","rtmp":"","rtmp_path":"","splash":"https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.png","splash_text":"","src":"https://foliovision.com/videos/Carly-Simon-Anticipation-1971.mp4","src1":"","src2":"","start":"","meta":[{"meta_key":"subtitles_en","meta_value":"https://foliovision.com/images/2014/01/carly-simon-1971-anticipation.vtt"}]}]}
|
|
test/integration/frontend/shortcodesLightboxTest.php
DELETED
@@ -1,168 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_ShortcodeLightboxTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
var $shortcode_body = 'src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" playlist="https://cdn.site.com/video2.mp4,https://cdn.site.com/video2.jpg;https://cdn.site.com/video3.mp4,https://cdn.site.com/video3.jpg" caption="Video 1;Video 2;Video 3" share="no" embed="false"';
|
12 |
-
|
13 |
-
public function testSimple() {
|
14 |
-
|
15 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true" share="no" embed="false"]' );
|
16 |
-
|
17 |
-
$sample = <<< HTML
|
18 |
-
<div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
|
19 |
-
<div class='fv_player_lightbox_hidden' style='display: none'>
|
20 |
-
<div id="some-test-hash" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
21 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
22 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
23 |
-
</div>
|
24 |
-
</div>
|
25 |
-
HTML;
|
26 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
27 |
-
}
|
28 |
-
|
29 |
-
|
30 |
-
public function testCaption() {
|
31 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;Video 1" share="no" embed="false"]' );
|
32 |
-
|
33 |
-
$sample = <<< HTML
|
34 |
-
<div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' title='Video 1' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
|
35 |
-
<div class='fv_player_lightbox_hidden' style='display: none'>
|
36 |
-
<div id="some-test-hash" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
37 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
38 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
39 |
-
</div>
|
40 |
-
</div>
|
41 |
-
HTML;
|
42 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
43 |
-
}
|
44 |
-
|
45 |
-
|
46 |
-
public function testCaptionAndDimensions() {
|
47 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" lightbox="true;320;240;Video 1" share="no" embed="false"]' );
|
48 |
-
$sample = <<< HTML
|
49 |
-
<div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_f1f51bb87ed9702bd91ac63990cee57b_lightbox_starter' title='Video 1' href='#wpfp_f1f51bb87ed9702bd91ac63990cee57b' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 320px; max-height: 240px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.75"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 75%"></div></div>
|
50 |
-
<div class='fv_player_lightbox_hidden' style='display: none'>
|
51 |
-
<div id="some-test-hash" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
52 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
53 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
54 |
-
</div>
|
55 |
-
</div>
|
56 |
-
HTML;
|
57 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
58 |
-
}
|
59 |
-
|
60 |
-
|
61 |
-
public function testText() {
|
62 |
-
$output = apply_filters( 'the_content', '[fvplayer src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" caption="Video 1" lightbox="true;text" share="no" embed="false"]' );
|
63 |
-
$sample = <<< HTML
|
64 |
-
<a data-fancybox='gallery' data-options='{"touch":false}' id='fv_flowplayer_2f9724515033ace3d660707b426f527c_lightbox_starter' title='Video 1' class='fv-player-lightbox-link' href="#" data-src='#wpfp_2f9724515033ace3d660707b426f527c'>Video 1</a>
|
65 |
-
HTML;
|
66 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
67 |
-
|
68 |
-
|
69 |
-
ob_start();
|
70 |
-
do_action('wp_footer');
|
71 |
-
$footer = ob_get_clean();
|
72 |
-
|
73 |
-
$sample = <<< HTML
|
74 |
-
<div style='display: none'>
|
75 |
-
<div id="wpfp_11361d379334c11f2eaa75f6aacd8386" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
76 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
77 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
78 |
-
|
79 |
-
</div>
|
80 |
-
<p class='fp-caption'>Video 1</p></div>
|
81 |
-
<!-- lightboxed players -->
|
82 |
-
HTML;
|
83 |
-
|
84 |
-
$this->assertTrue( stripos( $this->fix_newlines($footer),$this->fix_newlines($sample) ) !== false ); // is the lightboxed players in the footer?
|
85 |
-
|
86 |
-
global $FV_Player_lightbox;
|
87 |
-
$this->assertTrue( $FV_Player_lightbox->bLoad ); // is the flag to load lightbox JS set?
|
88 |
-
}
|
89 |
-
|
90 |
-
|
91 |
-
public function testPlaylist() {
|
92 |
-
$output = apply_filters( 'the_content', '[fvplayer '.$this->shortcode_body.' lightbox="true"]' );
|
93 |
-
|
94 |
-
$sample = <<< HTML
|
95 |
-
<div data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video1.jpg"}' id='fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter' href='#wpfp_5d2ac904592b20b5bf87a2a85df7ace7' class='flowplayer lightbox-starter is-splash no-svg is-paused skin-slim fp-slim fp-edgy' style="max-width: 640px; max-height: 360px; background-image: url('https://cdn.site.com/video1.jpg')" data-ratio="0.5625"><div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div><div class="fp-ratio" style="padding-top: 56.25%"></div></div>
|
96 |
-
<div class='fv_player_lightbox_hidden' style='display: none'>
|
97 |
-
<div id="wpfp_5d2ac904592b20b5bf87a2a85df7ace7" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
98 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
99 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
100 |
-
|
101 |
-
</div>
|
102 |
-
<p class='fp-caption'>Video 1</p></div><div class='fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions'><a id='fv_flowplayer_lightbox_placeholder' href='#' onclick='document.getElementById("fv_flowplayer_5d2ac904592b20b5bf87a2a85df7ace7_lightbox_starter").click(); return false'><div style="background-image: url('https://cdn.site.com/video1.jpg')"></div><h4><span>Video 1</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video2.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_e802b17ebbace952275cd50709bf549b'><div style="background-image: url('https://cdn.site.com/video2.jpg')"></div><h4><span>Video 2</span></h4></a><a data-fancybox='gallery' data-options='{"touch":false,"thumb":"https:\/\/cdn.site.com\/video3.jpg"}' id='fv_flowplayer_lightbox_starter' class='fv-player-lightbox-link' href='#' data-src='#wpfp_2ffbd4e84c1ecf2e00db5edf98996de3'><div style="background-image: url('https://cdn.site.com/video3.jpg')"></div><h4><span>Video 3</span></h4></a></div><div class='fv_player_lightbox_hidden' style='display: none'>
|
103 |
-
<div id="wpfp_e802b17ebbace952275cd50709bf549b" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
|
104 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
105 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
106 |
-
|
107 |
-
</div>
|
108 |
-
<p class='fp-caption'>Video 2</p></div><div class='fv_player_lightbox_hidden' style='display: none'>
|
109 |
-
<div id="wpfp_2ffbd4e84c1ecf2e00db5edf98996de3" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
|
110 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
111 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
112 |
-
|
113 |
-
</div>
|
114 |
-
<p class='fp-caption'>Video 3</p></div>
|
115 |
-
HTML;
|
116 |
-
|
117 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
118 |
-
|
119 |
-
// setting liststyle shouldn't affect anything!
|
120 |
-
$output = apply_filters( 'the_content', '[fvplayer '.$this->shortcode_body.' lightbox="true" liststyle="slider"]' );
|
121 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
122 |
-
}
|
123 |
-
|
124 |
-
|
125 |
-
public function testPlaylistText() {
|
126 |
-
$output = apply_filters( 'the_content', '[fvplayer '.$this->shortcode_body.' lightbox="true;text"]' );
|
127 |
-
$sample = <<< HTML
|
128 |
-
<ul><li><a data-fancybox='gallery' data-options='{"touch":false}' id='fv_flowplayer_b721d6e309a0b856f27cc5ffe3f64c19_lightbox_starter' title='Video 1' class='fv-player-lightbox-link' href="#" data-src='#wpfp_b721d6e309a0b856f27cc5ffe3f64c19'>Video 1</a></li><li><a data-fancybox='gallery' data-options='{"touch":false}' id='fv_flowplayer_lightbox_starter' title='Video 2' class='fv-player-lightbox-link' href='#' data-src='#wpfp_f7e1bf7ee8d12a2bf3bc4f148cdd718c'>Video 2</a></li><li><a data-fancybox='gallery' data-options='{"touch":false}' id='fv_flowplayer_lightbox_starter' title='Video 3' class='fv-player-lightbox-link' href='#' data-src='#wpfp_d0ecb746d43cfeca15296bd46c0dee3c'>Video 3</a></li></div></ul>
|
129 |
-
HTML;
|
130 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
131 |
-
|
132 |
-
|
133 |
-
ob_start();
|
134 |
-
do_action('wp_footer');
|
135 |
-
$footer = ob_get_clean();
|
136 |
-
|
137 |
-
$sample = <<< HTML
|
138 |
-
<div style='display: none'>
|
139 |
-
<div id="wpfp_41dd59eae18defa2521bb63946885f69" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
140 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
141 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
142 |
-
|
143 |
-
</div>
|
144 |
-
<p class='fp-caption'>Video 1</p></div>
|
145 |
-
<div style='display: none'>
|
146 |
-
<div id="wpfp_c189727d02321b2388ebc844c1fdc0c7" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
|
147 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
148 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
149 |
-
|
150 |
-
</div>
|
151 |
-
<p class='fp-caption'>Video 2</p></div>
|
152 |
-
<div style='display: none'>
|
153 |
-
<div id="wpfp_51771d567d4dd88882f65b4b89fc81d6" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}" class="flowplayer lightboxed no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy has-caption" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
|
154 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
155 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
156 |
-
|
157 |
-
</div>
|
158 |
-
<p class='fp-caption'>Video 3</p></div>
|
159 |
-
<!-- lightboxed players -->
|
160 |
-
HTML;
|
161 |
-
|
162 |
-
$this->assertTrue( stripos( $this->fix_newlines($footer),$this->fix_newlines($sample) ) !== false ); // are the lightboxed players in the footer?
|
163 |
-
|
164 |
-
global $FV_Player_lightbox;
|
165 |
-
$this->assertTrue( $FV_Player_lightbox->bLoad ); // is the flag to load lightbox JS set?
|
166 |
-
}
|
167 |
-
|
168 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/shortcodesPlaylistTest.php
DELETED
@@ -1,156 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_ShortcodePlaylistTestCase extends FV_Player_UnitTestCase {
|
10 |
-
|
11 |
-
public function setUp() {
|
12 |
-
parent::setUp();
|
13 |
-
|
14 |
-
$shortcode_body = 'src="https://cdn.site.com/video1.mp4" splash="https://cdn.site.com/video1.jpg" playlist="https://cdn.site.com/video2.mp4,https://cdn.site.com/video2.jpg;https://cdn.site.com/video3.mp4,https://cdn.site.com/video3.jpg" caption="Video 1;Video 2; Video 3" share="no" embed="false"';
|
15 |
-
|
16 |
-
// create a post with playlist shortcode
|
17 |
-
$this->playlist_default = $this->factory->post->create( array(
|
18 |
-
'post_content' => '[fvplayer '.$shortcode_body.']'
|
19 |
-
) );
|
20 |
-
|
21 |
-
$this->playlist_vertical = $this->factory->post->create( array(
|
22 |
-
'post_content' => '[fvplayer '.$shortcode_body.' liststyle="vertical"]'
|
23 |
-
) );
|
24 |
-
|
25 |
-
$this->playlist_tabs = $this->factory->post->create( array(
|
26 |
-
'post_content' => '[fvplayer '.$shortcode_body.' liststyle="tabs"]'
|
27 |
-
) );
|
28 |
-
|
29 |
-
$this->playlist_prevnext = $this->factory->post->create( array(
|
30 |
-
'post_content' => '[fvplayer '.$shortcode_body.' liststyle="prevnext"]'
|
31 |
-
) );
|
32 |
-
|
33 |
-
$this->playlist_slider = $this->factory->post->create( array(
|
34 |
-
'post_content' => '[fvplayer '.$shortcode_body.' liststyle="slider"]'
|
35 |
-
) );
|
36 |
-
|
37 |
-
}
|
38 |
-
|
39 |
-
public function testPlaylistStyleShortcode() {
|
40 |
-
global $post;
|
41 |
-
|
42 |
-
$post = get_post( $this->playlist_default );
|
43 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
44 |
-
|
45 |
-
$sample = <<< HTML
|
46 |
-
<div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
47 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
48 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
49 |
-
</div>
|
50 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
|
51 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
|
52 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video2.jpg")'></div><h4><span>Video 2</span></h4></a>
|
53 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video3.jpg")'></div><h4><span> Video 3</span></h4></a>
|
54 |
-
</div>
|
55 |
-
HTML;
|
56 |
-
|
57 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
58 |
-
|
59 |
-
|
60 |
-
$post = get_post( $this->playlist_vertical );
|
61 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
62 |
-
|
63 |
-
$sample = <<< HTML
|
64 |
-
<div class="fp-playlist-vertical-wrapper"><div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
65 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
66 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
67 |
-
</div>
|
68 |
-
<div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-vertical fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
|
69 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
|
70 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video2.jpg")'></div><h4><span>Video 2</span></h4></a>
|
71 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video3.jpg")'></div><h4><span> Video 3</span></h4></a>
|
72 |
-
</div>
|
73 |
-
</div>
|
74 |
-
HTML;
|
75 |
-
|
76 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
77 |
-
|
78 |
-
|
79 |
-
$post = get_post( $this->playlist_prevnext );
|
80 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
81 |
-
|
82 |
-
$sample = <<< HTML
|
83 |
-
<div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
84 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
85 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
86 |
-
<a class="fp-prev" title="prev"></a><a class="fp-next" title="next"></a></div>
|
87 |
-
<div style="display: none" class="fp-playlist-external fv-playlist-design-2017 fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916">
|
88 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
|
89 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video2.jpg")'></div><h4><span>Video 2</span></h4></a>
|
90 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video3.jpg")'></div><h4><span> Video 3</span></h4></a>
|
91 |
-
</div>
|
92 |
-
HTML;
|
93 |
-
|
94 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
95 |
-
|
96 |
-
|
97 |
-
$post = get_post( $this->playlist_slider );
|
98 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
99 |
-
|
100 |
-
$sample = <<< HTML
|
101 |
-
<div id="wpfp_10ecd1d835d0db002906d6666d27a916" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 100%; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
102 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
103 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
104 |
-
</div>
|
105 |
-
<div class='fv-playlist-slider-wrapper'><div class="fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal fp-playlist-has-captions" rel="wpfp_10ecd1d835d0db002906d6666d27a916" style="width: 750px">
|
106 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video1.jpg")'></div><h4><span>Video 1</span></h4></a>
|
107 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video2.jpg")'></div><h4><span>Video 2</span></h4></a>
|
108 |
-
<a href='#' onclick='return false' data-item='{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}'><div style='background-image: url("https://cdn.site.com/video3.jpg")'></div><h4><span> Video 3</span></h4></a>
|
109 |
-
</div>
|
110 |
-
</div>
|
111 |
-
HTML;
|
112 |
-
|
113 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
114 |
-
}
|
115 |
-
|
116 |
-
public function testPlaylistTabsShortcode() {
|
117 |
-
global $post;
|
118 |
-
|
119 |
-
$post = get_post( $this->playlist_tabs );
|
120 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
121 |
-
|
122 |
-
$sample = <<< HTML
|
123 |
-
<script>document.body.className += " fv_flowplayer_tabs_hide";</script><div class="fv_flowplayer_tabs tabs woocommerce-tabs" style="max-width: 640px"><div id="tabs-10-1" class="fv_flowplayer_tabs_content"><ul><li><a href="#tabs-10-1-0">Video 1</a></li><li><a href="#tabs-10-1-1">Video 2</a></li><li><a href="#tabs-10-1-2"> Video 3</a></li></ul><div class="fv_flowplayer_tabs_cl"></div><div id="tabs-10-1-0" class="fv_flowplayer_tabs_first"><div id="wpfp_5d697f461a6a69e41882ec0212d63d1f" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video1.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video1.jpg);" data-ratio="0.5625">
|
124 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
125 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
126 |
-
|
127 |
-
</div>
|
128 |
-
</div><div id="tabs-10-1-1"><div id="wpfp_f31738e686c3bdae67dfd7e57dec3d8c" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video2.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video2.jpg);" data-ratio="0.5625">
|
129 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
130 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
131 |
-
|
132 |
-
</div>
|
133 |
-
</div><div id="tabs-10-1-2"><div id="wpfp_0dfbb08c099beb557be57907b1c01eb2" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video3.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" data-embed="false" style="max-width: 640px; max-height: 360px; background-image: url(https://cdn.site.com/video3.jpg);" data-ratio="0.5625">
|
134 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
135 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
136 |
-
|
137 |
-
</div>
|
138 |
-
</div><div class="fv_flowplayer_tabs_cl"></div><div class="fv_flowplayer_tabs_cr"></div></div></div>
|
139 |
-
HTML;
|
140 |
-
|
141 |
-
$this->assertEquals( $this->fix_newlines($sample), $this->fix_newlines($output) );
|
142 |
-
|
143 |
-
|
144 |
-
global $fv_fp;
|
145 |
-
$this->assertTrue( $fv_fp->load_tabs );
|
146 |
-
}
|
147 |
-
|
148 |
-
public function tearDown() {
|
149 |
-
global $fv_fp, $FV_Player_lightbox;
|
150 |
-
$fv_fp->load_tabs = false;
|
151 |
-
$FV_Player_lightbox = new FV_Player_lightbox(); // reset the lightbox loading flag and footer lightboxed players HTML
|
152 |
-
|
153 |
-
parent::tearDown();
|
154 |
-
}
|
155 |
-
|
156 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/testSimpleShortcode.html
DELETED
@@ -1,83 +0,0 @@
|
|
1 |
-
<title>Test Blog</title>
|
2 |
-
<link rel='stylesheet' id='fv_flowplayer-css' href='http://example.org/wp-content/plugins/fv-wordpress-flowplayer/css/flowplayer.css?ver=1.2.3' type='text/css' media='all' />
|
3 |
-
<link rel='https://api.w.org/' href='http://example.org/index.php?rest_route=/' />
|
4 |
-
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://example.org/xmlrpc.php?rsd" />
|
5 |
-
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://example.org/wp-includes/wlwmanifest.xml" />
|
6 |
-
<style type="text/css">.recentcomments a{display:inline !important;padding:0 !important;margin:0 !important;}</style>
|
7 |
-
<style type="text/css">
|
8 |
-
.flowplayer.skin-slim { background-color: #000000 !important; }
|
9 |
-
.flowplayer.skin-slim .fp-color, .flowplayer.skin-slim .fp-selected { background-color: #bb0000 !important; }
|
10 |
-
.flowplayer.skin-slim .fp-color-fill .svg-color, .flowplayer.skin-slim .fp-color-fill svg.fvp-icon, .flowplayer.skin-slim .fp-color-fill { fill: #bb0000 !important; color: #bb0000 !important; }
|
11 |
-
.flowplayer.skin-slim .fp-controls, .fv-player-buttons a:active, .fv-player-buttons a { background-color: transparent !important; }
|
12 |
-
.flowplayer.skin-slim .fp-elapsed, .flowplayer.skin-slim .fp-duration, .flowplayer.skin-slim .noUI-time-in, .flowplayer.skin-slim .noUI-time-out { color: #ffffff !important; }
|
13 |
-
.flowplayer.skin-slim .fv-wp-flowplayer-notice-small { color: #ffffff !important; }
|
14 |
-
.flowplayer.skin-slim .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #bb0000 !important; }
|
15 |
-
#content .flowplayer.skin-slim, .flowplayer.skin-slim { font-family: Tahoma, Geneva, sans-serif; }
|
16 |
-
.flowplayer.skin-slim .fp-dropdown li.active { background-color: #bb0000 !important }
|
17 |
-
.flowplayer.skin-youtuby { background-color: #000000 !important; }
|
18 |
-
.flowplayer.skin-youtuby .fp-color, .flowplayer.skin-youtuby .fp-selected { background-color: #bb0000 !important; }
|
19 |
-
.flowplayer.skin-youtuby .fp-color-fill .svg-color, .flowplayer.skin-youtuby .fp-color-fill svg.fvp-icon, .flowplayer.skin-youtuby .fp-color-fill { fill: #bb0000 !important; color: #bb0000 !important; }
|
20 |
-
.flowplayer.skin-youtuby .fp-controls, .fv-player-buttons a:active, .fv-player-buttons a { background-color: rgba(0, 0, 0, 0.5) !important; }
|
21 |
-
.flowplayer.skin-youtuby .fp-elapsed, .flowplayer.skin-youtuby .fp-duration, .flowplayer.skin-youtuby .noUI-time-in, .flowplayer.skin-youtuby .noUI-time-out { color: #ffffff !important; }
|
22 |
-
.flowplayer.skin-youtuby .fv-wp-flowplayer-notice-small { color: #ffffff !important; }
|
23 |
-
.flowplayer.skin-youtuby .fv-ab-loop { background-color: rgba(0, 0, 0, 0.5) !important; }
|
24 |
-
.flowplayer.skin-youtuby .fv-ab-loop .noUi-handle { color: rgba(0, 0, 0, 0.5) !important; }
|
25 |
-
.flowplayer.skin-youtuby .fv_player_popup, .fvfp_admin_error_content { background: rgba(0, 0, 0, 0.5); }
|
26 |
-
.flowplayer.skin-youtuby .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #bb0000 !important; }
|
27 |
-
#content .flowplayer.skin-youtuby, .flowplayer.skin-youtuby { font-family: Tahoma, Geneva, sans-serif; }
|
28 |
-
.flowplayer.skin-youtuby .fp-dropdown li.active { background-color: #bb0000 !important }
|
29 |
-
.flowplayer.skin-custom { background-color: #000000 !important; }
|
30 |
-
.flowplayer.skin-custom .fp-color, .flowplayer.skin-custom .fp-selected { background-color: #bb0000 !important; }
|
31 |
-
.flowplayer.skin-custom .fp-color-fill .svg-color, .flowplayer.skin-custom .fp-color-fill svg.fvp-icon, .flowplayer.skin-custom .fp-color-fill { fill: #bb0000 !important; color: #bb0000 !important; }
|
32 |
-
.flowplayer.skin-custom .fp-controls, .fv-player-buttons a:active, .fv-player-buttons a { background-color: #333333 !important; }
|
33 |
-
.flowplayer.skin-custom a.fp-play, .flowplayer.skin-custom a.fp-mute, .flowplayer.skin-custom .fp-controls, .flowplayer.skin-custom .fv-ab-loop, .fv-player-buttons a:active, .fv-player-buttons a { color: #eeeeee !important; }
|
34 |
-
.flowplayer.skin-custom .fv-fp-prevbtn:before, .flowplayer.skin-custom .fv-fp-nextbtn:before { border-color: #eeeeee !important; }
|
35 |
-
.flowplayer.skin-custom .fvfp_admin_error, .flowplayer.skin-custom .fvfp_admin_error a, #content .flowplayer.skin-custom .fvfp_admin_error a { color: #eeeeee; }
|
36 |
-
.flowplayer.skin-custom .fp-volumeslider, .flowplayer.skin-custom .fp-buffer, .flowplayer.skin-custom .noUi-background, .flowplayer.skin-custom .fv-ab-loop .noUi-handle { background-color: #eeeeee !important; }
|
37 |
-
.flowplayer.skin-custom .fp-elapsed, .flowplayer.skin-custom .fp-duration, .flowplayer.skin-custom .noUI-time-in, .flowplayer.skin-custom .noUI-time-out { color: #eeeeee !important; }
|
38 |
-
.flowplayer.skin-custom .fv-wp-flowplayer-notice-small { color: #eeeeee !important; }
|
39 |
-
.flowplayer.skin-custom .fv-ab-loop { background-color: #333333 !important; }
|
40 |
-
.flowplayer.skin-custom .fv-ab-loop .noUi-handle { color: #333333 !important; }
|
41 |
-
.flowplayer.skin-custom .fv_player_popup, .fvfp_admin_error_content { background: #333333; }
|
42 |
-
.flowplayer.skin-custom .fv-ab-loop .noUi-connect, .fv-player-buttons a.current { background-color: #bb0000 !important; }
|
43 |
-
#content .flowplayer.skin-custom, .flowplayer.skin-custom { font-family: Tahoma, Geneva, sans-serif; }
|
44 |
-
.flowplayer.skin-custom .fp-dropdown li.active { background-color: #bb0000 !important }
|
45 |
-
|
46 |
-
.wpfp_custom_background { display: none; }
|
47 |
-
.wpfp_custom_popup { position: absolute; top: 10%; z-index: 20; text-align: center; width: 100%; color: #fff; }
|
48 |
-
.wpfp_custom_popup h1, .wpfp_custom_popup h2, .wpfp_custom_popup h3, .wpfp_custom_popup h4 { color: #fff; }
|
49 |
-
.is-finished .wpfp_custom_background { display: block; }
|
50 |
-
|
51 |
-
.wpfp_custom_ad { position: absolute; bottom: 10%; z-index: 20; width: 100%; }
|
52 |
-
.wpfp_custom_ad_content { background: white; margin: 0 auto; position: relative } .wpfp_custom_ad { color: #888; z-index: 20 !important; }
|
53 |
-
.wpfp_custom_ad a { color: #ff3333 }
|
54 |
-
|
55 |
-
.fp-playlist-external > a > span { background-color:#808080; }
|
56 |
-
.fp-playlist-external > a.is-active > span { border-color:#bb0000; }
|
57 |
-
.fp-playlist-external.fv-playlist-design-2014 a.is-active,.fp-playlist-external.fv-playlist-design-2014 a.is-active h4,.fp-playlist-external.fp-playlist-only-captions a.is-active,.fp-playlist-external.fv-playlist-design-2014 a.is-active h4, .fp-playlist-external.fp-playlist-only-captions a.is-active h4 { color:#bb0000; }
|
58 |
-
.fp-playlist-vertical { background-color:#808080; }
|
59 |
-
.flowplayer .fp-captions p { font-size: 16px; } .flowplayer .fp-logo { bottom: 30px; left: 15px }
|
60 |
-
.flowplayer .fp-captions p { background-color: rgba(0,0,0,0.5) }
|
61 |
-
|
62 |
-
</style>
|
63 |
-
<div id="wpfp_1fd794010fde2df80985efba80286197" data-item="{"sources":[{"src":"https:\/\/cdn.site.com\/video.mp4","type":"video\/mp4"}]}" class="flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy" style="max-width: 640px; max-height: 360px; " data-ratio="0.5625">
|
64 |
-
<div class="fp-ratio" style="padding-top: 56.25%"></div>
|
65 |
-
<div class="fp-ui"><div class="fp-play fp-visible"><a class="fp-icon fp-playbtn"></a></div></div>
|
66 |
-
<div class='fvp-share-bar'><ul class="fvp-sharing">
|
67 |
-
<li><a class="sharing-facebook" href="https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
|
68 |
-
<li><a class="sharing-twitter" href="https://twitter.com/home?status=Test+Blog+http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
|
69 |
-
<li><a class="sharing-google" href="https://plus.google.com/share?url=http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li>
|
70 |
-
<li><a class="sharing-email" href="mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20http%3A%2F%2Fexample.org%2F%3Fp%3D1234" target="_blank"></a></li></ul><div><a class="sharing-link" href="http://example.org/?p=1234" target="_blank">Link</a></div><div><label><a class="embed-code-toggle" href="#"><strong>Embed</strong></a></label></div><div class="embed-code"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
|
71 |
-
</div>
|
72 |
-
|
73 |
-
<script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script>
|
74 |
-
<script type='text/javascript' src='http://example.org/wp-includes/js/jquery/jquery-migrate.js?ver=1.4.1'></script>
|
75 |
-
<script type='text/javascript'>
|
76 |
-
/* <![CDATA[ */
|
77 |
-
var fv_flowplayer_conf = {"fullscreen":"1","swf":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.swf?ver=1.2.3","swfHls":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayerhls.swf?ver=1.2.3","embed":{"library":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/fv-flowplayer.min.js","script":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/embed.min.js","skin":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/css\/flowplayer.css","swf":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.swf?ver=1.2.3","swfHls":"\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayerhls.swf?ver=1.2.3"},"speeds":[0.25,0.5,0.75,1,1.25,1.5,1.75,2],"video_hash_links":"1","safety_resize":"1","volume":"0.7","sticky_video":"","sticky_place":"right-bottom","sticky_width":"380","script_hls_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/hls.min.js?ver=1.2.3","script_dash_js":"http:\/\/example.org\/wp-content\/plugins\/fv-wordpress-flowplayer\/flowplayer\/flowplayer.dashjs.min.js?ver=1.2.3","script_dash_js_version":"2.7","hlsjs":{"startLevel":-1,"fragLoadingMaxRetry":3,"levelLoadingMaxRetry":3,"capLevelToPlayerSize":true}};
|
78 |
-
var fv_flowplayer_translations = {"0":"","1":"Video loading aborted","2":"Network error","3":"Video not properly encoded","4":"Video file not found","5":"Unsupported video","6":"Skin not found","7":"SWF file not found","8":"Subtitles not found","9":"Invalid RTMP URL","10":"Unsupported video format. Try installing Adobe Flash.","11":"Click to watch the video","12":"[This post contains video, click to play]","video_expired":"<h2>Video file expired.<br \/>Please reload the page and play it again.<\/h2>","unsupported_format":"<h2>Unsupported video format.<br \/>Please use a Flash compatible device.<\/h2>","mobile_browser_detected_1":"Mobile browser detected, serving low bandwidth video.","mobile_browser_detected_2":"Click here","mobile_browser_detected_3":"for full quality.","live_stream_failed":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","live_stream_failed_2":"<h2>Live stream load failed.<\/h2><h3>Please try again later, perhaps the stream is currently offline.<\/h3>","what_is_wrong":"Please tell us what is wrong :","full_sentence":"Please give us more information (a full sentence) so we can help you better","error_JSON":"Admin: Error parsing JSON","no_support_IE9":"Admin: Video checker doesn't support IE 9.","check_failed":"Admin: Check failed.","playlist_current":"Now Playing","video_issues":"Video Issues","video_reload":"Video loading has stalled, click to reload","link_copied":"Video Link Copied to Clipboard","embed_copied":"Embed Code Copied to Clipboard","subtitles_disabled":"Subtitles disabled","subtitles_switched":"Subtitles switched to ","warning_iphone_subs":"This video has subtitles, that are not supported on your device.","warning_unstable_android":"You are using an old Android device. If you experience issues with the video please use <a href=\"https:\/\/play.google.com\/store\/apps\/details?id=org.mozilla.firefox\">Firefox<\/a>. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>","warning_samsungbrowser":"You are using the Samsung Browser which is an older and buggy version of Google Chrome. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser.","warning_old_safari":"You are using an old Safari browser. If you experience issues with the video please use <a href=\"https:\/\/www.mozilla.org\/en-US\/firefox\/new\/\">Firefox<\/a> or other modern browser. <a target=\"_blank\" href=\"https:\/\/foliovision.com\/2017\/05\/issues-with-vimeo-on-android\">Why?<\/a>"};
|
79 |
-
var fv_fp_ajaxurl = "http:\/\/example.org\/wp-admin\/admin-ajax.php";
|
80 |
-
var fv_flowplayer_playlists = [];
|
81 |
-
/* ]]> */
|
82 |
-
</script>
|
83 |
-
<script type='text/javascript' src='http://example.org/wp-content/plugins/fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver=1.2.3'></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/frontend/videoPositionSavingTest.php
DELETED
@@ -1,151 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
require_once( dirname(__FILE__).'/../fv-player-ajax-unittest-case.php');
|
4 |
-
|
5 |
-
/**
|
6 |
-
* Tests WordPress integration of playlists without any advertisements present
|
7 |
-
* in the HTML markup.
|
8 |
-
*/
|
9 |
-
final class FV_Player_videoPositionSavingTestCase extends FV_Player_Ajax_UnitTestCase {
|
10 |
-
|
11 |
-
var $postID = -1;
|
12 |
-
var $userID = -1;
|
13 |
-
|
14 |
-
protected $backupGlobals = false;
|
15 |
-
|
16 |
-
public function setUp() {
|
17 |
-
parent::setUp();
|
18 |
-
|
19 |
-
// create a post with playlist shortcode
|
20 |
-
$this->postID = $this->factory->post->create( array(
|
21 |
-
'post_title' => 'Playlist with Ads',
|
22 |
-
'post_content' => '[fvplayer src="https://cdn.site.com/1.mp4" playlist="https://cdn.site.com/2.mp4;https://cdn.site.com/3.mp4" saveposition="yes"]'
|
23 |
-
) );
|
24 |
-
|
25 |
-
global $fv_fp;
|
26 |
-
|
27 |
-
include_once "../../../fv-wordpress-flowplayer/models/flowplayer.php";
|
28 |
-
include_once "../../../fv-wordpress-flowplayer/models/flowplayer-frontend.php";
|
29 |
-
$fv_fp = new flowplayer_frontend();
|
30 |
-
|
31 |
-
// add new user and create last saved position metadata for this new user
|
32 |
-
$this->userID = $this->factory->user->create(array(
|
33 |
-
'role' => 'admin'
|
34 |
-
));
|
35 |
-
|
36 |
-
/*add_user_meta($this->userID, 'fv_wp_flowplayer_position_watch?v=1XiHhpGUmQg', '12');
|
37 |
-
var_export(get_user_meta($this->userID, 'fv_wp_flowplayer_position_watch?v=1XiHhpGUmQg', true ));*/
|
38 |
-
|
39 |
-
}
|
40 |
-
|
41 |
-
public function testNoSaveForNotLoggedInUsers() {
|
42 |
-
// is anybody listening out there?
|
43 |
-
$this->assertTrue( has_action('wp_ajax_fv_wp_flowplayer_video_position_save') );
|
44 |
-
|
45 |
-
// Spoof the nonce in the POST superglobal
|
46 |
-
//$_POST['_wpnonce'] = wp_create_nonce( 'anything-here-if-needed' );
|
47 |
-
|
48 |
-
// set up POST data for video resume times
|
49 |
-
$_POST['action'] = 'fv_wp_flowplayer_video_position_save';
|
50 |
-
$_POST['videoTimes'] = array(
|
51 |
-
array(
|
52 |
-
'name' => 'https://cdn.site.com/2.mp4',
|
53 |
-
'position' => 12
|
54 |
-
)
|
55 |
-
);
|
56 |
-
|
57 |
-
// call the AJAX which
|
58 |
-
try {
|
59 |
-
$this->_handleAjax( 'fv_wp_flowplayer_video_position_save' );
|
60 |
-
} catch ( WPAjaxDieContinueException $e ) {
|
61 |
-
$response = json_decode( $this->_last_response );
|
62 |
-
$this->assertInternalType( 'object', $response );
|
63 |
-
$this->assertObjectHasAttribute( 'success', $response );
|
64 |
-
$this->assertFalse( $response->success );
|
65 |
-
}
|
66 |
-
|
67 |
-
// check for clear playlist HTML without last player position data items
|
68 |
-
$post = get_post( $this->postID );
|
69 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
70 |
-
|
71 |
-
$expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
|
72 |
-
<div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
|
73 |
-
<div class=\"fp-ui\"><div class=\"fp-play fp-visible\"><a class=\"fp-icon fp-playbtn\"></a></div></div>
|
74 |
-
<div class='fvp-share-bar'><ul class=\"fvp-sharing\">
|
75 |
-
<li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
|
76 |
-
<li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
|
77 |
-
<li><a class=\"sharing-google\" href=\"https://plus.google.com/share?url=\" target=\"_blank\"></a></li>
|
78 |
-
<li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
|
79 |
-
</div>
|
80 |
-
<div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
|
81 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/1.mp4\",\"type\":\"video\/mp4\"}]}'><div></div></a>
|
82 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/2.mp4\",\"type\":\"video\/mp4\"}]}'><div></div></a>
|
83 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/3.mp4\",\"type\":\"video\/mp4\"}]}'><div></div></a>
|
84 |
-
</div>
|
85 |
-
|
86 |
-
";
|
87 |
-
|
88 |
-
$this->assertEquals( $this->fix_newlines($expect), $this->fix_newlines($output) );
|
89 |
-
}
|
90 |
-
|
91 |
-
public function testSaveAndPlaylistHTMLForLoggedInUsers() {
|
92 |
-
// is anybody listening out there?
|
93 |
-
$this->assertTrue( has_action('wp_ajax_fv_wp_flowplayer_video_position_save') );
|
94 |
-
|
95 |
-
// Spoof the nonce in the POST superglobal
|
96 |
-
//$_POST['_wpnonce'] = wp_create_nonce( 'anything-here-if-needed' );
|
97 |
-
|
98 |
-
// set this user as the active one
|
99 |
-
global $current_user;
|
100 |
-
$restore_user = $current_user;
|
101 |
-
wp_set_current_user($this->userID);
|
102 |
-
|
103 |
-
// set up POST data for video resume times
|
104 |
-
$_POST['action'] = 'fv_wp_flowplayer_video_position_save';
|
105 |
-
$_POST['videoTimes'] = array(
|
106 |
-
array(
|
107 |
-
'name' => 'https://cdn.site.com/2.mp4',
|
108 |
-
'position' => 12
|
109 |
-
)
|
110 |
-
);
|
111 |
-
|
112 |
-
// call the AJAX which
|
113 |
-
try {
|
114 |
-
$this->_handleAjax( 'fv_wp_flowplayer_video_position_save' );
|
115 |
-
} catch ( WPAjaxDieContinueException $e ) {
|
116 |
-
$response = json_decode( $this->_last_response );
|
117 |
-
$this->assertInternalType( 'object', $response );
|
118 |
-
$this->assertObjectHasAttribute( 'success', $response );
|
119 |
-
$this->assertTrue( $response->success );
|
120 |
-
}
|
121 |
-
|
122 |
-
// check if metadata was saved correctly
|
123 |
-
$this->assertEquals(12, get_user_meta($this->userID, 'fv_wp_flowplayer_position_2', true ));
|
124 |
-
|
125 |
-
// check that the playlist HTML is being generated correctly, with the last player position taken into consideration
|
126 |
-
$post = get_post( $this->postID );
|
127 |
-
$output = apply_filters( 'the_content', $post->post_content );
|
128 |
-
|
129 |
-
$expect = "<div id=\"some-test-hash\" class=\"flowplayer no-brand is-splash no-svg is-paused skin-slim fp-slim fp-edgy\" style=\"max-width: 100%; \" data-ratio=\"0.5625\" data-save-position=\"yes\">
|
130 |
-
<div class=\"fp-ratio\" style=\"padding-top: 56.25%\"></div>
|
131 |
-
<div class=\"fp-ui\"><div class=\"fp-play fp-visible\"><a class=\"fp-icon fp-playbtn\"></a></div></div>
|
132 |
-
<div class='fvp-share-bar'><ul class=\"fvp-sharing\">
|
133 |
-
<li><a class=\"sharing-facebook\" href=\"https://www.facebook.com/sharer/sharer.php?u=\" target=\"_blank\"></a></li>
|
134 |
-
<li><a class=\"sharing-twitter\" href=\"https://twitter.com/home?status=Test+Blog+\" target=\"_blank\"></a></li>
|
135 |
-
<li><a class=\"sharing-google\" href=\"https://plus.google.com/share?url=\" target=\"_blank\"></a></li>
|
136 |
-
<li><a class=\"sharing-email\" href=\"mailto:?body=Check%20out%20the%20amazing%20video%20here%3A%20\" target=\"_blank\"></a></li></ul><div><label><a class=\"embed-code-toggle\" href=\"#\"><strong>Embed</strong></a></label></div><div class=\"embed-code\"><label>Copy and paste this HTML code into your webpage to embed.</label><textarea></textarea></div></div>
|
137 |
-
</div>
|
138 |
-
<div class=\"fp-playlist-external fv-playlist-design-2017 fp-playlist-horizontal\" rel=\"some-test-hash\">
|
139 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/1.mp4\",\"type\":\"video\/mp4\"}]}'><div></div></a>
|
140 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/2.mp4\",\"type\":\"video\/mp4\",\"position\":\"12\"}]}'><div></div></a>
|
141 |
-
<a href='#' onclick='return false' data-item='{\"sources\":[{\"src\":\"https:\/\/cdn.site.com\/3.mp4\",\"type\":\"video\/mp4\"}]}'><div></div></a>
|
142 |
-
</div>
|
143 |
-
|
144 |
-
";
|
145 |
-
|
146 |
-
$this->assertEquals( $this->fix_newlines($expect), $this->fix_newlines($output) );
|
147 |
-
|
148 |
-
$current_user;
|
149 |
-
}
|
150 |
-
|
151 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/fv-player-ajax-unittest-case.php
DELETED
@@ -1,67 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class FV_Player_Ajax_UnitTestCase extends WP_Ajax_UnitTestCase {
|
4 |
-
|
5 |
-
protected $backupGlobals = false;
|
6 |
-
|
7 |
-
public function setUp() {
|
8 |
-
parent::setUp();
|
9 |
-
|
10 |
-
global $fv_fp;
|
11 |
-
$this->restore = $fv_fp->conf;
|
12 |
-
|
13 |
-
// somehow this got hooked in again after being removed in WP_Ajax_UnitTestCase::setUpBeforeClass() already
|
14 |
-
remove_action( 'admin_init', '_maybe_update_core' );
|
15 |
-
remove_action( 'admin_init', '_maybe_update_plugins' );
|
16 |
-
remove_action( 'admin_init', '_maybe_update_themes' );
|
17 |
-
}
|
18 |
-
|
19 |
-
public function fix_newlines( $html ) {
|
20 |
-
$html = preg_replace( '/"wpfp_[0-9a-z]+"/', '"some-test-hash"', $html);
|
21 |
-
$html = preg_replace( '~<input type="hidden" id="([^"]*?)nonce" name="([^"]*?)nonce" value="([^"]*?)" />~', '<input type="hidden" id="$1nonce" name="$2nonce" value="XYZ" />', $html);
|
22 |
-
$html = preg_replace( "~nonce: '([^']*?)'~", "nonce: 'XYZ'", $html);
|
23 |
-
|
24 |
-
// testProfileScreen
|
25 |
-
$html = preg_replace( '~fv_ytplayer_[a-z0-9]+~', 'fv_ytplayer_XYZ', $html);
|
26 |
-
$html = preg_replace( '~fv_vimeo_[a-z0-9]+~', 'fv_vimeo_XYZ', $html);
|
27 |
-
$html = preg_replace( '~<input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="[^"]*?" />~', '<input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="XYZ" />', $html);
|
28 |
-
|
29 |
-
$html = preg_replace( '~convert_jwplayer=[a-z0-9]+~', 'convert_jwplayer=XYZ', $html);
|
30 |
-
$html = preg_replace( '~_wpnonce=[a-z0-9]+~', '_wpnonce=XYZ', $html);
|
31 |
-
|
32 |
-
$html = explode("\n",$html);
|
33 |
-
foreach( $html AS $k => $v ) {
|
34 |
-
if( trim($v) == '' ) unset($html[$k]);
|
35 |
-
}
|
36 |
-
$html = implode( "\n", array_map('trim',$html) );
|
37 |
-
|
38 |
-
$html = preg_replace( '~\t~', '', $html );
|
39 |
-
return $html;
|
40 |
-
}
|
41 |
-
|
42 |
-
// we need to set up PRO player with an appropriate key, or the PRO player won't work
|
43 |
-
public static function wpSetUpBeforeClass() {
|
44 |
-
global $fv_fp;
|
45 |
-
|
46 |
-
// without this included, fv_wp_flowplayer_delete_extensions_transients() would not be found
|
47 |
-
//include_once "../../../fv-wordpress-flowplayer/controller/backend.php";
|
48 |
-
|
49 |
-
// include the flowplayer loader
|
50 |
-
include_once "../../../fv-wordpress-flowplayer/flowplayer.php";
|
51 |
-
|
52 |
-
// include the PRO plugin class, so it can intercept data saving
|
53 |
-
// and update the ads structure as needed for saving
|
54 |
-
//include_once "../../beta/fv-player-pro.class.php";
|
55 |
-
|
56 |
-
// save initial settings
|
57 |
-
//$fv_fp->_set_conf();
|
58 |
-
}
|
59 |
-
|
60 |
-
public function tearDown() {
|
61 |
-
parent::tearDown();
|
62 |
-
|
63 |
-
global $fv_fp;
|
64 |
-
$fv_fp->conf = $this->restore;
|
65 |
-
}
|
66 |
-
|
67 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/fv-player-unittest-case.php
DELETED
@@ -1,76 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
abstract class FV_Player_UnitTestCase extends WP_UnitTestCase {
|
4 |
-
|
5 |
-
protected $backupGlobals = false;
|
6 |
-
|
7 |
-
public function setUp() {
|
8 |
-
parent::setUp();
|
9 |
-
|
10 |
-
global $fv_fp;
|
11 |
-
$this->restore = $fv_fp->conf;
|
12 |
-
}
|
13 |
-
|
14 |
-
public function fix_newlines( $html ) {
|
15 |
-
$html = preg_replace( '/"wpfp_[0-9a-z]+"/', '"some-test-hash"', $html);
|
16 |
-
$html = preg_replace( '~<input type="hidden" id="([^"]*?)nonce" name="([^"]*?)nonce" value="([^"]*?)" />~', '<input type="hidden" id="$1nonce" name="$2nonce" value="XYZ" />', $html);
|
17 |
-
$html = preg_replace( '~<input type="hidden" id="nonce_([^"]*?)" name="nonce_([^"]*?)" value="([^"]*?)" />~', '<input type="hidden" id="nonce_$1" name="nonce_$2" value="XYZ" />', $html);
|
18 |
-
$html = preg_replace( "~nonce: '([^']*?)'~", "nonce: 'XYZ'", $html);
|
19 |
-
|
20 |
-
// testProfileScreen
|
21 |
-
$html = preg_replace( '~fv_ytplayer_[a-z0-9]+~', 'fv_ytplayer_XYZ', $html);
|
22 |
-
$html = preg_replace( '~fv_vimeo_[a-z0-9]+~', 'fv_vimeo_XYZ', $html);
|
23 |
-
$html = preg_replace( '~<input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="[^"]*?" />~', '<input type="hidden" id="fv-player-custom-videos-_fv_player_user_video-0" name="fv-player-custom-videos-_fv_player_user_video-0" value="XYZ" />', $html);
|
24 |
-
|
25 |
-
$html = preg_replace( '~convert_jwplayer=[a-z0-9]+~', 'convert_jwplayer=XYZ', $html);
|
26 |
-
$html = preg_replace( '~_wpnonce=[a-z0-9]+~', '_wpnonce=XYZ', $html);
|
27 |
-
|
28 |
-
$html = explode("\n",$html);
|
29 |
-
foreach( $html AS $k => $v ) {
|
30 |
-
if( trim($v) == '' ) unset($html[$k]);
|
31 |
-
}
|
32 |
-
$html = implode( "\n", array_map('trim',$html) );
|
33 |
-
|
34 |
-
$html = preg_replace( '~\t~', '', $html );
|
35 |
-
|
36 |
-
// playlist in lightbox test
|
37 |
-
$html = preg_replace( "/(href|data-fv-lightbox|data-src)='#wpfp_[^']+'/", "$1='#some-test-hash'", $html);
|
38 |
-
$html = preg_replace( '~fv_flowplayer_[a-z0-9]+_lightbox_starter~', 'fv_flowplayer_XYZ_lightbox_starter', $html);
|
39 |
-
|
40 |
-
// tabbed playlist test
|
41 |
-
$html = preg_replace( '~tabs-\d+~', 'tabs-1', $html);
|
42 |
-
|
43 |
-
// splash end
|
44 |
-
$html = preg_replace( '~wpfp_[a-z0-9]+_custom_background~', 'wpfp_XYZ_custom_background', $html);
|
45 |
-
|
46 |
-
$html = preg_replace( '~\?ver=[0-9\.]+~', '?ver=1.2.3', $html);
|
47 |
-
|
48 |
-
return $html;
|
49 |
-
}
|
50 |
-
|
51 |
-
// we need to set up PRO player with an appropriate key, or the PRO player won't work
|
52 |
-
public static function wpSetUpBeforeClass() {
|
53 |
-
global $fv_fp;
|
54 |
-
|
55 |
-
// without this included, fv_wp_flowplayer_delete_extensions_transients() would not be found
|
56 |
-
//include_once "../../../fv-wordpress-flowplayer/controller/backend.php";
|
57 |
-
|
58 |
-
// include the flowplayer loader
|
59 |
-
include "../../../fv-wordpress-flowplayer/flowplayer.php";
|
60 |
-
|
61 |
-
// include the PRO plugin class, so it can intercept data saving
|
62 |
-
// and update the ads structure as needed for saving
|
63 |
-
//include_once "../../beta/fv-player-pro.class.php";
|
64 |
-
|
65 |
-
// save initial settings
|
66 |
-
//$fv_fp->_set_conf();
|
67 |
-
}
|
68 |
-
|
69 |
-
public function tearDown() {
|
70 |
-
parent::tearDown();
|
71 |
-
|
72 |
-
global $fv_fp;
|
73 |
-
$fv_fp->conf = $this->restore;
|
74 |
-
}
|
75 |
-
|
76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/integration/phpunit.xml
DELETED
@@ -1,8 +0,0 @@
|
|
1 |
-
<phpunit bootstrap="bootstrap.php">
|
2 |
-
<testsuites>
|
3 |
-
<testsuite name="FVPlayer">
|
4 |
-
<directory suffix="Test.php">frontend</directory>
|
5 |
-
<directory suffix="Test.php">backend</directory>
|
6 |
-
</testsuite>
|
7 |
-
</testsuites>
|
8 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/unit/bootstrap.php
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
include_once('../../vendor/autoload.php');
|
3 |
-
include_once "../wp-global-empty-mocks.php";
|
|
|
|
|
|
test/unit/controller/frontendTest.php
DELETED
@@ -1,209 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
use PHPUnit\Framework\TestCase;
|
3 |
-
|
4 |
-
final class FV_Player_Controller extends PHPUnit_Framework_TestCase {
|
5 |
-
|
6 |
-
private $fvPlayerProInstance;
|
7 |
-
|
8 |
-
// playlist items
|
9 |
-
private $playlist_items = array(
|
10 |
-
0 =>
|
11 |
-
array (
|
12 |
-
'sources' =>
|
13 |
-
array (
|
14 |
-
0 =>
|
15 |
-
array (
|
16 |
-
'src' => 'https://youtu.be/7uY0Ab5HlZ0',
|
17 |
-
'type' => 'video/youtube'
|
18 |
-
)
|
19 |
-
)
|
20 |
-
),
|
21 |
-
1 =>
|
22 |
-
array (
|
23 |
-
'sources' =>
|
24 |
-
array (
|
25 |
-
0 =>
|
26 |
-
array (
|
27 |
-
'src' => 'https://www.youtube.com/watch?v=1XiHhpGUmQg',
|
28 |
-
'type' => 'video/youtube'
|
29 |
-
)
|
30 |
-
)
|
31 |
-
),
|
32 |
-
2 =>
|
33 |
-
array (
|
34 |
-
'sources' =>
|
35 |
-
array (
|
36 |
-
0 =>
|
37 |
-
array (
|
38 |
-
'src' => 'https://www.youtube.com/watch?v=Q1eR8pUM5iY',
|
39 |
-
'type' => 'video/youtube'
|
40 |
-
)
|
41 |
-
)
|
42 |
-
)
|
43 |
-
);
|
44 |
-
|
45 |
-
// ads
|
46 |
-
private $adsMock = array(
|
47 |
-
array(
|
48 |
-
'videos' => array(
|
49 |
-
'mp4' => 'https://www.youtube.com/watch?v=tPEE9ZwTmy0'
|
50 |
-
),
|
51 |
-
'disabled' => '0',
|
52 |
-
'name' => 'cat preroll',
|
53 |
-
'click' => 'http://www.pobox.sk'
|
54 |
-
),
|
55 |
-
array(
|
56 |
-
'videos' => array(
|
57 |
-
'mp4' => 'https://www.youtube.com/watch?v=bCGmUCDj4Nc'
|
58 |
-
),
|
59 |
-
'disabled' => '1',
|
60 |
-
'name' => 'kids postroll',
|
61 |
-
'click' => 'http://www.foliovision.com'
|
62 |
-
),
|
63 |
-
array(
|
64 |
-
'videos' => array(
|
65 |
-
'mp4' => 'https://www.youtube.com/watch?v=OsAVRDo9znQ'
|
66 |
-
),
|
67 |
-
'disabled' => '0',
|
68 |
-
'name' => 'funny whatroll',
|
69 |
-
'click' => 'http://www.google.com'
|
70 |
-
)
|
71 |
-
);
|
72 |
-
|
73 |
-
public function setUp() {
|
74 |
-
// set an empty global return value to be used
|
75 |
-
// in all the mocked global WordPress functions
|
76 |
-
// like add_action() and the such
|
77 |
-
global $testReturnValue;
|
78 |
-
$testReturnValue = '';
|
79 |
-
|
80 |
-
include_once "../../models/flowplayer.php";
|
81 |
-
global $fv_fp;
|
82 |
-
$fv_fp = new flowplayer();
|
83 |
-
|
84 |
-
// todo: fix in core perhaps
|
85 |
-
$fv_fp->aAds = array();
|
86 |
-
$fv_fp->aPopups = array();
|
87 |
-
|
88 |
-
include_once "../../controller/frontend.php";
|
89 |
-
}
|
90 |
-
|
91 |
-
public function tearDown() {
|
92 |
-
Mockery::close();
|
93 |
-
}
|
94 |
-
|
95 |
-
public function test_flowplayer_prepare_scripts_js_everywhere() {
|
96 |
-
global $fv_fp;
|
97 |
-
$fv_fp->conf['js-everywhere'] = true;
|
98 |
-
|
99 |
-
ob_start();
|
100 |
-
flowplayer_prepare_scripts();
|
101 |
-
$output = ob_get_clean();
|
102 |
-
|
103 |
-
$expected = "Registering jquery-ui-tabs for ?ver=1.2.3.4 footer? 1
|
104 |
-
Registering fv_flowplayer for fv-wordpress-flowplayer/css/flowplayer.css?ver=1.2.3.4
|
105 |
-
Registering flowplayer for fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js?ver=1.2.3.4 footer? 1
|
106 |
-
Registering flowplayer-hlsjs for fv-wordpress-flowplayer/flowplayer/hls.min.js?ver=1.2.3.4 footer? 1
|
107 |
-
Localizing flowplayer with fv_flowplayer_conf = Array
|
108 |
-
(
|
109 |
-
[fullscreen] => 1
|
110 |
-
[swf] => fv-wordpress-flowplayer/flowplayer/flowplayer.swf?ver=1.2.3.4
|
111 |
-
[swfHls] => fv-wordpress-flowplayer/flowplayer/flowplayerhls.swf?ver=1.2.3.4
|
112 |
-
[embed] => Array
|
113 |
-
(
|
114 |
-
[library] => fv-wordpress-flowplayer/flowplayer/fv-flowplayer.min.js
|
115 |
-
[script] => fv-wordpress-flowplayer/flowplayer/embed.min.js
|
116 |
-
[skin] => fv-wordpress-flowplayer/css/flowplayer.css
|
117 |
-
[swf] => fv-wordpress-flowplayer/flowplayer/flowplayer.swf?ver=1.2.3.4
|
118 |
-
[swfHls] => fv-wordpress-flowplayer/flowplayer/flowplayerhls.swf?ver=1.2.3.4
|
119 |
-
)
|
120 |
-
|
121 |
-
[speeds] => Array
|
122 |
-
(
|
123 |
-
[0] => 0.25
|
124 |
-
[1] => 0.5
|
125 |
-
[2] => 0.75
|
126 |
-
[3] => 1
|
127 |
-
[4] => 1.25
|
128 |
-
[5] => 1.5
|
129 |
-
[6] => 1.75
|
130 |
-
[7] => 2
|
131 |
-
)
|
132 |
-
|
133 |
-
[video_hash_links] => 1
|
134 |
-
[safety_resize] => 1
|
135 |
-
[volume] => 0.7
|
136 |
-
[sticky_video] =>
|
137 |
-
[sticky_place] => right-bottom
|
138 |
-
[sticky_width] => 380
|
139 |
-
[script_hls_js] => fv-wordpress-flowplayer/flowplayer/hls.min.js?ver=1.2.3.4
|
140 |
-
[script_dash_js] => fv-wordpress-flowplayer/flowplayer/flowplayer.dashjs.min.js?ver=1.2.3.4
|
141 |
-
[script_dash_js_version] => 2.7
|
142 |
-
[hlsjs] => Array
|
143 |
-
(
|
144 |
-
[startLevel] => -1
|
145 |
-
[fragLoadingMaxRetry] => 3
|
146 |
-
[levelLoadingMaxRetry] => 3
|
147 |
-
[capLevelToPlayerSize] => 1
|
148 |
-
)
|
149 |
-
|
150 |
-
)
|
151 |
-
|
152 |
-
Localizing flowplayer with fv_flowplayer_translations = Array
|
153 |
-
(
|
154 |
-
[0] =>
|
155 |
-
[1] => Video loading aborted
|
156 |
-
[2] => Network error
|
157 |
-
[3] => Video not properly encoded
|
158 |
-
[4] => Video file not found
|
159 |
-
[5] => Unsupported video
|
160 |
-
[6] => Skin not found
|
161 |
-
[7] => SWF file not found
|
162 |
-
[8] => Subtitles not found
|
163 |
-
[9] => Invalid RTMP URL
|
164 |
-
[10] => Unsupported video format. Try installing Adobe Flash.
|
165 |
-
[11] => Click to watch the video
|
166 |
-
[12] => [This post contains video, click to play]
|
167 |
-
[video_expired] => <h2>Video file expired.<br />Please reload the page and play it again.</h2>
|
168 |
-
[unsupported_format] => <h2>Unsupported video format.<br />Please use a Flash compatible device.</h2>
|
169 |
-
[mobile_browser_detected_1] => Mobile browser detected, serving low bandwidth video.
|
170 |
-
[mobile_browser_detected_2] => Click here
|
171 |
-
[mobile_browser_detected_3] => for full quality.
|
172 |
-
[live_stream_failed] => <h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>
|
173 |
-
[live_stream_failed_2] => <h2>Live stream load failed.</h2><h3>Please try again later, perhaps the stream is currently offline.</h3>
|
174 |
-
[what_is_wrong] => Please tell us what is wrong :
|
175 |
-
[full_sentence] => Please give us more information (a full sentence) so we can help you better
|
176 |
-
[error_JSON] => Admin: Error parsing JSON
|
177 |
-
[no_support_IE9] => Admin: Video checker doesn't support IE 9.
|
178 |
-
[check_failed] => Admin: Check failed.
|
179 |
-
[playlist_current] => Now Playing
|
180 |
-
[video_issues] => Video Issues
|
181 |
-
[video_reload] => Video loading has stalled, click to reload
|
182 |
-
[link_copied] => Video Link Copied to Clipboard
|
183 |
-
[embed_copied] => Embed Code Copied to Clipboard
|
184 |
-
[subtitles_disabled] => Subtitles disabled
|
185 |
-
[subtitles_switched] => Subtitles switched to
|
186 |
-
[warning_iphone_subs] => This video has subtitles, that are not supported on your device.
|
187 |
-
[warning_unstable_android] => You are using an old Android device. If you experience issues with the video please use <a href=\"https://play.google.com/store/apps/details?id=org.mozilla.firefox\">Firefox</a>. <a target=\"_blank\" href=\"https://foliovision.com/2017/05/issues-with-vimeo-on-android\">Why?</a>
|
188 |
-
[warning_samsungbrowser] => You are using the Samsung Browser which is an older and buggy version of Google Chrome. If you experience issues with the video please use <a href=\"https://www.mozilla.org/en-US/firefox/new/\">Firefox</a> or other modern browser.
|
189 |
-
[warning_old_safari] => You are using an old Safari browser. If you experience issues with the video please use <a href=\"https://www.mozilla.org/en-US/firefox/new/\">Firefox</a> or other modern browser. <a target=\"_blank\" href=\"https://foliovision.com/2017/05/issues-with-vimeo-on-android\">Why?</a>
|
190 |
-
)
|
191 |
-
|
192 |
-
Localizing flowplayer with fv_fp_ajaxurl = https://site.com/wp//wp-admin/admin-ajax.php
|
193 |
-
Localizing flowplayer with fv_flowplayer_playlists = Array
|
194 |
-
(
|
195 |
-
)
|
196 |
-
|
197 |
-
";
|
198 |
-
|
199 |
-
/*$aOut = explode( "\n", preg_replace( '~\r\n~', "\n", $output) );
|
200 |
-
$aExpected = explode( "\n", preg_replace( '~\r\n~', "\n", $expected ) );
|
201 |
-
|
202 |
-
foreach( $aOut AS $k => $v ) {
|
203 |
-
$this->assertEquals( $v, $aExpected[$k] );
|
204 |
-
}*/
|
205 |
-
|
206 |
-
$this->assertEquals( preg_replace( '~\r\n~', "\n", $expected ), preg_replace( '~\r\n~', "\n", $output) );
|
207 |
-
}
|
208 |
-
|
209 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/unit/phpunit.xml
DELETED
@@ -1,7 +0,0 @@
|
|
1 |
-
<phpunit bootstrap="bootstrap.php">
|
2 |
-
<testsuites>
|
3 |
-
<testsuite name="controller">
|
4 |
-
<directory suffix="Test.php">controller</directory>
|
5 |
-
</testsuite>
|
6 |
-
</testsuites>
|
7 |
-
</phpunit>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test/wp-global-empty-mocks.php
DELETED
@@ -1,225 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
// let whoever is listening know we're in test mode
|
4 |
-
define('PHPUnitTestMode', true);
|
5 |
-
|
6 |
-
// whatever classes we define and mock here, we'll make a list
|
7 |
-
// of these programmatically, so as nobody will forget to add
|
8 |
-
// new classed to the list of mocked ones if it was hard-coded here
|
9 |
-
function file_get_php_classes($filepath) {
|
10 |
-
$php_code = file_get_contents($filepath);
|
11 |
-
$classes = get_php_classes($php_code);
|
12 |
-
return $classes;
|
13 |
-
}
|
14 |
-
|
15 |
-
// complementary function to the one above
|
16 |
-
function get_php_classes($php_code) {
|
17 |
-
$classes = array();
|
18 |
-
$tokens = token_get_all($php_code);
|
19 |
-
$count = count($tokens);
|
20 |
-
for ($i = 2; $i < $count; $i++) {
|
21 |
-
if ( $tokens[$i - 2][0] == T_CLASS
|
22 |
-
&& $tokens[$i - 1][0] == T_WHITESPACE
|
23 |
-
&& $tokens[$i][0] == T_STRING) {
|
24 |
-
|
25 |
-
$class_name = $tokens[$i][1];
|
26 |
-
$classes[] = $class_name;
|
27 |
-
}
|
28 |
-
}
|
29 |
-
return $classes;
|
30 |
-
}
|
31 |
-
|
32 |
-
global $mocked_classes;
|
33 |
-
$mocked_classes = file_get_php_classes(__FILE__);
|
34 |
-
|
35 |
-
function get_calling_class() {
|
36 |
-
global $mocked_classes;
|
37 |
-
|
38 |
-
//get the trace
|
39 |
-
$trace = debug_backtrace();
|
40 |
-
|
41 |
-
// Get the class that is asking for who awoke it
|
42 |
-
// note: edited to say "$trace[3]" instead of "$trace[1]",
|
43 |
-
// since we're additionally going through
|
44 |
-
// get_calling_class() function as well as
|
45 |
-
// the checkAndReturnRequestedValue() function
|
46 |
-
// all the way to the actually mocked global function (add_action())
|
47 |
-
// note2: if we're coming from a class name in this mock file, we should handle that as well
|
48 |
-
|
49 |
-
// we're calling a method of a class in this mock file, handle it as such
|
50 |
-
if (isset($trace[2]['class']) && in_array($trace[2]['class'], $mocked_classes)) {
|
51 |
-
$class = $trace[4]['class'];
|
52 |
-
} else if (isset($trace[3]['class'])){
|
53 |
-
$class = $trace[3]['class'];
|
54 |
-
} else {
|
55 |
-
$class = false;
|
56 |
-
}
|
57 |
-
|
58 |
-
// +1 to i cos we have to account for calling this function
|
59 |
-
for ( $i=1; $i<count( $trace ); $i++ ) {
|
60 |
-
if ( isset( $trace[$i] ) ) { // is it set?
|
61 |
-
if ( isset( $trace[ $i ]['class'] ) && $class != $trace[ $i ]['class'] ) { // is it a different class
|
62 |
-
return $trace[ $i ]['class'];
|
63 |
-
}
|
64 |
-
}
|
65 |
-
}
|
66 |
-
}
|
67 |
-
|
68 |
-
function get_calling_mocked_global_function() {
|
69 |
-
global $mocked_classes;
|
70 |
-
|
71 |
-
$trace = debug_backtrace();
|
72 |
-
// we're calling a method of a class in this mock file, handle it as such
|
73 |
-
if (isset($trace[2]['class']) && in_array($trace[2]['class'], $mocked_classes)) {
|
74 |
-
return $trace[2]['class'].'::'.$trace[2]['function'];
|
75 |
-
} else {
|
76 |
-
return $trace[2]['function'];
|
77 |
-
}
|
78 |
-
}
|
79 |
-
|
80 |
-
function checkAndReturnRequestedValue() {
|
81 |
-
global $mocked_classes;
|
82 |
-
$cclass = get_calling_class();
|
83 |
-
|
84 |
-
// no need to do anything special for non-tested classes,
|
85 |
-
// just return nothing for them
|
86 |
-
// note: we still want to check for return values for methods
|
87 |
-
// called from mocked classes located in this file
|
88 |
-
if (substr($cclass, -4) !== 'Test' && !in_array($cclass, $mocked_classes)) {
|
89 |
-
return;
|
90 |
-
}
|
91 |
-
|
92 |
-
global $testReturnValue;
|
93 |
-
|
94 |
-
// if $testReturnValue is an array, check if we have a return value
|
95 |
-
// at the index of the calling class's function
|
96 |
-
if (is_array($testReturnValue)) {
|
97 |
-
$calling_function = get_calling_mocked_global_function();
|
98 |
-
if (isset($testReturnValue[$calling_function])) {
|
99 |
-
$retValue = $testReturnValue[$calling_function];
|
100 |
-
} else {
|
101 |
-
$retValue = '';
|
102 |
-
}
|
103 |
-
} else {
|
104 |
-
$retValue = $testReturnValue;
|
105 |
-
}
|
106 |
-
|
107 |
-
return $retValue;
|
108 |
-
}
|
109 |
-
|
110 |
-
function add_action() {
|
111 |
-
return checkAndReturnRequestedValue();
|
112 |
-
}
|
113 |
-
|
114 |
-
function add_filter() {
|
115 |
-
return checkAndReturnRequestedValue();
|
116 |
-
}
|
117 |
-
|
118 |
-
function apply_filters( $hook, $value ) {
|
119 |
-
return $value;
|
120 |
-
}
|
121 |
-
|
122 |
-
function current_user_can( $capability ) {
|
123 |
-
return false;
|
124 |
-
}
|
125 |
-
|
126 |
-
function get_option() {
|
127 |
-
return checkAndReturnRequestedValue();
|
128 |
-
}
|
129 |
-
|
130 |
-
function home_url( $url = false ) {
|
131 |
-
return 'https://site.com/'.$url;
|
132 |
-
}
|
133 |
-
|
134 |
-
function is_multisite() {
|
135 |
-
return false;
|
136 |
-
}
|
137 |
-
|
138 |
-
function is_user_logged_in() {
|
139 |
-
return false;
|
140 |
-
}
|
141 |
-
|
142 |
-
function sanitize_title( $title ) {
|
143 |
-
return preg_replace( '~[^a-z0-9_-]~', '-', $title );
|
144 |
-
}
|
145 |
-
|
146 |
-
function site_url( $url = false ) {
|
147 |
-
return 'https://site.com/wp/'.$url;
|
148 |
-
}
|
149 |
-
|
150 |
-
function wp_enqueue_script( $handle, $src = '', $deps = array(), $ver = false, $in_footer ) {
|
151 |
-
echo "Registering $handle for $src?ver=$ver footer? $in_footer\n";
|
152 |
-
}
|
153 |
-
|
154 |
-
function wp_enqueue_style( $handle, $src = '', $deps = array(), $ver = false, $media = 'all' ) {
|
155 |
-
echo "Registering $handle for $src?ver=$ver\n";
|
156 |
-
}
|
157 |
-
|
158 |
-
function wp_localize_script( $handle, $name, $data ) {
|
159 |
-
echo "Localizing $handle with $name = ".print_r($data,true)."\n";
|
160 |
-
}
|
161 |
-
|
162 |
-
function wp_remote_get() {
|
163 |
-
return checkAndReturnRequestedValue();
|
164 |
-
}
|
165 |
-
|
166 |
-
function is_wp_error() {
|
167 |
-
return checkAndReturnRequestedValue();
|
168 |
-
}
|
169 |
-
|
170 |
-
function add_shortcode() {
|
171 |
-
return checkAndReturnRequestedValue();
|
172 |
-
}
|
173 |
-
|
174 |
-
function is_admin() {
|
175 |
-
return checkAndReturnRequestedValue();
|
176 |
-
}
|
177 |
-
|
178 |
-
function plugins_url( $value, $file = false ) {
|
179 |
-
return $value;
|
180 |
-
}
|
181 |
-
|
182 |
-
function update_option() {
|
183 |
-
return checkAndReturnRequestedValue();
|
184 |
-
}
|
185 |
-
|
186 |
-
function wp_parse_args() {
|
187 |
-
return checkAndReturnRequestedValue();
|
188 |
-
}
|
189 |
-
|
190 |
-
function __($txt) {
|
191 |
-
// always return what was given for the translation function
|
192 |
-
return $txt;
|
193 |
-
}
|
194 |
-
|
195 |
-
function _e($txt) {
|
196 |
-
// always echo what was given for the translation function
|
197 |
-
echo $txt;
|
198 |
-
}
|
199 |
-
|
200 |
-
function esc_attr($value) {
|
201 |
-
// always return what was given for the attribute escaping function
|
202 |
-
return $value;
|
203 |
-
}
|
204 |
-
|
205 |
-
// mocks for the WPDB WordPress database manipulation class
|
206 |
-
class wpdb {
|
207 |
-
|
208 |
-
public $prefix = '';
|
209 |
-
|
210 |
-
public function get_charset_collate() {
|
211 |
-
return checkAndReturnRequestedValue();
|
212 |
-
}
|
213 |
-
|
214 |
-
public function query() {
|
215 |
-
return checkAndReturnRequestedValue();
|
216 |
-
}
|
217 |
-
}
|
218 |
-
|
219 |
-
global $wpdb;
|
220 |
-
$wpdb = new wpdb();
|
221 |
-
|
222 |
-
global $fv_wp_flowplayer_ver;
|
223 |
-
$fv_wp_flowplayer_ver = '1.2.3.4';
|
224 |
-
|
225 |
-
define( 'WP_CONTENT_URL', 'https://site.com/wp-content' );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|