Changeset 2260164
- Timestamp:
- 03/12/2020 09:11:31 PM (6 years ago)
- Location:
- switch-video-quality
- Files:
-
- 3 edited
- 4 copied
-
tags/1.5.3 (copied) (copied from switch-video-quality/trunk)
-
tags/1.5.3/css/svq-mejs-v4.css (copied) (copied from switch-video-quality/trunk/css/svq-mejs-v4.css)
-
tags/1.5.3/js/svq_admin.js (modified) (3 diffs)
-
tags/1.5.3/readme.txt (copied) (copied from switch-video-quality/trunk/readme.txt)
-
tags/1.5.3/switch_video_quality.php (copied) (copied from switch-video-quality/trunk/switch_video_quality.php) (2 diffs)
-
trunk/js/svq_admin.js (modified) (3 diffs)
-
trunk/switch_video_quality.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
switch-video-quality/tags/1.5.3/js/svq_admin.js
r1770526 r2260164 220 220 var fileType = url.split('.').pop(); 221 221 switch (fileType) { 222 case 'mp4':223 return 'video/mp4';224 break;225 222 case 'webm': 226 223 return 'video/webm'; … … 230 227 break; 231 228 default: 232 return ' invalid';229 return 'video/mp4'; 233 230 } 234 231 } … … 242 239 if ($.trim(url).length > 0) { 243 240 var fileType = getFileType(url); 244 if (fileType == 'invalid'){ 245 wrapper.append('<p class="svq_error">'+svq_admin_l10n.urlError+'</p>'); 246 } else { 247 getVideoHeight(wrapper, url, function(h,d){ 248 wrapper.find('.video_quality_order').val(h); 249 wrapper.find('.video_quality_label').val(h + 'p'); 250 var hours = Math.floor(d / 3600); 251 var minutes = Math.floor(d % 3600 / 60); 252 var seconds = Math.round(d % 60); 253 var duration = (hours > 0 ? hours + ':' : '') + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds); 254 wrapper.find('.video_quality_duration').val(duration); 255 }); 256 wrapper.find('input.video_quality_mime').val(fileType); 257 } 241 getVideoHeight(wrapper, url, function(h,d){ 242 wrapper.find('.video_quality_order').val(h); 243 wrapper.find('.video_quality_label').val(h + 'p'); 244 var hours = Math.floor(d / 3600); 245 var minutes = Math.floor(d % 3600 / 60); 246 var seconds = Math.round(d % 60); 247 var duration = (hours > 0 ? hours + ':' : '') + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds); 248 wrapper.find('.video_quality_duration').val(duration); 249 }); 250 wrapper.find('input.video_quality_mime').val(fileType); 258 251 } 259 252 }); -
switch-video-quality/tags/1.5.3/switch_video_quality.php
r2255308 r2260164 3 3 Plugin Name: Switch Video Quality 4 4 Description: Switch Video Quality adds quality switch functionality to the wordpress video player to let you choose between different resolutions of a (self-hosted) html5-compatible video. 5 Version: 1.5. 25 Version: 1.5.3 6 6 Author: Timo Klemm (team-ok) 7 7 Text Domain: switch-video-quality … … 26 26 } 27 27 //Switch Video Quality Version Number 28 define( 'SVQ_VERSION', '1.5. 2' );28 define( 'SVQ_VERSION', '1.5.3' ); 29 29 30 30 add_action( 'load-post.php', 'switch_video_quality_settings' ); -
switch-video-quality/trunk/js/svq_admin.js
r1770526 r2260164 220 220 var fileType = url.split('.').pop(); 221 221 switch (fileType) { 222 case 'mp4':223 return 'video/mp4';224 break;225 222 case 'webm': 226 223 return 'video/webm'; … … 230 227 break; 231 228 default: 232 return ' invalid';229 return 'video/mp4'; 233 230 } 234 231 } … … 242 239 if ($.trim(url).length > 0) { 243 240 var fileType = getFileType(url); 244 if (fileType == 'invalid'){ 245 wrapper.append('<p class="svq_error">'+svq_admin_l10n.urlError+'</p>'); 246 } else { 247 getVideoHeight(wrapper, url, function(h,d){ 248 wrapper.find('.video_quality_order').val(h); 249 wrapper.find('.video_quality_label').val(h + 'p'); 250 var hours = Math.floor(d / 3600); 251 var minutes = Math.floor(d % 3600 / 60); 252 var seconds = Math.round(d % 60); 253 var duration = (hours > 0 ? hours + ':' : '') + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds); 254 wrapper.find('.video_quality_duration').val(duration); 255 }); 256 wrapper.find('input.video_quality_mime').val(fileType); 257 } 241 getVideoHeight(wrapper, url, function(h,d){ 242 wrapper.find('.video_quality_order').val(h); 243 wrapper.find('.video_quality_label').val(h + 'p'); 244 var hours = Math.floor(d / 3600); 245 var minutes = Math.floor(d % 3600 / 60); 246 var seconds = Math.round(d % 60); 247 var duration = (hours > 0 ? hours + ':' : '') + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds); 248 wrapper.find('.video_quality_duration').val(duration); 249 }); 250 wrapper.find('input.video_quality_mime').val(fileType); 258 251 } 259 252 }); -
switch-video-quality/trunk/switch_video_quality.php
r2255308 r2260164 3 3 Plugin Name: Switch Video Quality 4 4 Description: Switch Video Quality adds quality switch functionality to the wordpress video player to let you choose between different resolutions of a (self-hosted) html5-compatible video. 5 Version: 1.5. 25 Version: 1.5.3 6 6 Author: Timo Klemm (team-ok) 7 7 Text Domain: switch-video-quality … … 26 26 } 27 27 //Switch Video Quality Version Number 28 define( 'SVQ_VERSION', '1.5. 2' );28 define( 'SVQ_VERSION', '1.5.3' ); 29 29 30 30 add_action( 'load-post.php', 'switch_video_quality_settings' );
Note: See TracChangeset
for help on using the changeset viewer.