Changeset 3402264
- Timestamp:
- 11/25/2025 07:33:00 AM (4 months ago)
- Location:
- wpstream
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/4.9.2 (copied) (copied from wpstream/trunk)
-
tags/4.9.2/admin/class-wpstream-admin.php (modified) (3 diffs)
-
tags/4.9.2/includes/class-wpstream-player.php (modified) (1 diff)
-
tags/4.9.2/public/css/wpstream_style.css (modified) (2 diffs)
-
tags/4.9.2/public/js/start_streaming.js (modified) (5 diffs)
-
tags/4.9.2/public/js/wpstream-player.js (modified) (4 diffs)
-
tags/4.9.2/public/js/wpstream-user-quota.js (added)
-
tags/4.9.2/readme.txt (modified) (2 diffs)
-
tags/4.9.2/wpstream.php (modified) (2 diffs)
-
trunk/admin/class-wpstream-admin.php (modified) (3 diffs)
-
trunk/includes/class-wpstream-player.php (modified) (1 diff)
-
trunk/public/css/wpstream_style.css (modified) (2 diffs)
-
trunk/public/js/start_streaming.js (modified) (5 diffs)
-
trunk/public/js/wpstream-player.js (modified) (4 diffs)
-
trunk/public/js/wpstream-user-quota.js (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wpstream.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstream/tags/4.9.2/admin/class-wpstream-admin.php
r3394979 r3402264 308 308 ); 309 309 } 310 311 if ( in_array( $current_screen->base, ['toplevel_page_wpstream_credentials', 'wpstream_page_wpstream_live_channels', 'wpstream_page_wpstream_recordings', 'wpstream_page_wpstream_onboard'] ) ) { 312 wp_enqueue_script( 'wpstream-user-quota-update', plugin_dir_url( __DIR__ ) . '/admin/js/wpstream-user-quota.js', array(), WPSTREAM_PLUGIN_VERSION, true ); 313 wp_localize_script( 'wpstream-user-quota-update', 'wpstream_user_quota_vars', array( 314 'admin_url' => get_admin_url() 315 )); 316 } 310 317 311 318 // Add localized variables for broadcaster … … 3124 3131 $days_since_release = ( time() - strtotime( $release_date ) ) / DAY_IN_SECONDS; 3125 3132 3126 if ( $days_since_release > 30 ) { 3127 return; // update is older than 30 days, do not show notice 3133 // if there's an update newer than 7 days, do not show the notice 3134 if ( $days_since_release < 7 ) { 3135 return; 3128 3136 } 3129 3137 } … … 3134 3142 3135 3143 echo '<div class="notice notice-warning is-dismissible">'; 3136 echo '<p><strong>' . __('W PStream Plugin Update Available', 'wpstream') . '</strong></p>';3144 echo '<p><strong>' . __('WpStream Plugin Update Available', 'wpstream') . '</strong></p>'; 3137 3145 echo '<p>' . sprintf( 3138 3146 __('Version %s is available. Please update to the latest version for new features and security improvements.', 'wpstream'), -
wpstream/tags/4.9.2/includes/class-wpstream-player.php
r3390939 r3402264 480 480 } 481 481 echo' 482 <video id="wpstream-video'.$now.'" '.$poster_data.' class="video-js vjs-default-skin vjs-fluid vjs-wpstream ' . esc_attr($has_trailer_class) . ' ' . $player_theme . ' ' . $player_logo_position_class . ' ' . $player_logo_horizontal_position . '" playsinline="true" '.$is_muted_str." ".$autoplay_str.'> 483 484 </video>'; 482 <div class="wpstream-video-container"> 483 <div id="wpstream-pre-load-spinner" class="wpstream-pre-load-spinner"></div> 484 <video id="wpstream-video'.$now.'" '.$poster_data.' class="video-js vjs-default-skin vjs-fluid vjs-wpstream ' . esc_attr($has_trailer_class) . ' ' . $player_theme . ' ' . $player_logo_position_class . ' ' . $player_logo_horizontal_position . '" playsinline="true" '.$is_muted_str." ".$autoplay_str.'> 485 </video> 486 </div>'; 485 487 if ($video_trailer){ 486 488 print '<div class="wpstream_theme_trailer_wrapper">'; -
wpstream/tags/4.9.2/public/css/wpstream_style.css
r3390939 r3402264 77 77 } 78 78 79 .wpstream-video-container { 80 position: relative; 81 } 82 .wpstream-pre-load-spinner { 83 position: absolute; 84 top: 50%; 85 left: 50%; 86 width: 30px; 87 height: 30px; 88 margin: -25px 0 0 -25px; 89 opacity: 0.85; 90 border-radius: 25px; 91 border: 6px solid rgba(43, 51, 63, 0.7); 92 border-top-color: white; 93 animation: wpstream-spinner-spin 1.1s linear infinite; 94 z-index: 1000; 95 } 96 97 @keyframes wpstream-spinner-spin { 98 0% { transform: rotate(0deg); } 99 100% { transform: rotate(360deg); } 100 } 79 101 80 102 .wpstream_not_live_mess_mess{ … … 229 251 .video-js.vjs-has-started .vjs-logo-content img { 230 252 height: auto; 253 } 254 255 @media only screen and (max-width: 768px) { 256 .vjs-logo-content > img { 257 width: 50%; 258 } 231 259 } 232 260 -
wpstream/tags/4.9.2/public/js/start_streaming.js
r3394809 r3402264 1 1 /*global $, jQuery, wpstream_start_streaming_vars*/ 2 2 var counters={}; 3 var quotaUpdateInterval = null;4 3 5 4 // post_type can be FTV or PPV channel or VOD … … 24 23 wpstream_adjust_settings_general(); 25 24 26 wpstream_update_quota_data();27 25 }); 28 29 jQuery(window).on('beforeunload', wpstream_cleanup_quota_interval );30 jQuery(window).on('visibilitychange', function() {31 if ( document.hidden ) {32 wpstream_cleanup_quota_interval();33 } else {34 wpstream_update_quota_data();35 }36 })37 38 26 39 27 function wpstream_safe_track_onboarding(action, step, element_type = 'button', element_name = '') { … … 497 485 parent.find('.wpstream_show_settings').addClass('wpstream_inactive_icon'); 498 486 const channelStatus = parent.find('.wpstream_channel_status'); 499 if ( channelStatus.css('display', 'none') ) { 500 channelStatus.text(wpstream_start_streaming_vars.channel_on); 501 channelStatus.fadeIn(200); 502 } 503 487 channelStatus.each(function( index, element ) { 488 if ( !jQuery(element).hasClass('not_ready_to_stream') && jQuery(element).css('display', 'none') ) { 489 console.log('put back channel on'); 490 jQuery(element).text(wpstream_start_streaming_vars.channel_on); 491 jQuery(element).fadeIn(200); 492 } 493 if ( jQuery(element).hasClass('not_ready_to_stream') ) { 494 console.log('hide the element'); 495 jQuery(element).hide(); 496 } 497 }); 498 const stopEventButton = parent.find('.wpstream_stop_event'); 499 if ( stopEventButton.css('display', 'none') ) { 500 stopEventButton.fadeIn(200); 501 } 504 502 var webcasterUrl = parent.find('.start_webcaster').attr('data-webcaster-url'); 505 503 if (webcasterUrl === ""){ … … 1033 1031 } 1034 1032 1035 function wpstream_update_quota_data(){1036 wpstream_cleanup_quota_interval();1037 1038 var ajaxurl = wpstream_start_streaming_vars.admin_url + 'admin-ajax.php';1039 var nonce = jQuery('#wpstream_notice_nonce').val();1040 1041 function updateQuota() {1042 jQuery.ajax({1043 type: 'POST',1044 dataType: 'json',1045 url: ajaxurl,1046 timeout: 3000000,1047 1048 data: {1049 'action': 'wpstream_get_live_quota_data',1050 'security': nonce,1051 },1052 success: function (data) {1053 if (data.success === true) {1054 console.log(data)1055 jQuery('#wpstream_available_data').text(wpstream_convert_mb_to_gb( data.data.available_data_mb ) + ' GB');1056 jQuery('#wpstream_available_storage').text( wpstream_convert_mb_to_gb( data.data.available_storage_mb ) + ' GB');1057 }1058 },1059 error: function (jqXHR, textStatus, errorThrown) {1060 console.log(jqXHR, textStatus, errorThrown);1061 }1062 })1063 }1064 1065 if ( quotaUpdateInterval ) {1066 clearInterval( quotaUpdateInterval );1067 }1068 1069 quotaUpdateInterval = setInterval( updateQuota, 60000 );1070 }1071 1072 1033 function wpstream_convert_mb_to_gb(megabits) { 1073 1034 let gigabit = megabits / 1000; … … 1080 1041 return gigabit; 1081 1042 } 1082 1083 function wpstream_cleanup_quota_interval() {1084 if (quotaUpdateInterval) {1085 clearInterval(quotaUpdateInterval);1086 quotaUpdateInterval = null;1087 }1088 } -
wpstream/tags/4.9.2/public/js/wpstream-player.js
r3388690 r3402264 139 139 if (data == 0) { 140 140 owner.setState("stopped"); 141 removeSpinner(3); 141 142 } else if (data.started == "no") { 142 143 owner.setState("notstarted"); … … 187 188 this.liveMessage.showMessage('stopped'); 188 189 this.playback.pauseContent(); 190 removeSpinner(1); 189 191 break; 190 192 case "started": … … 1071 1073 }; 1072 1074 this.ws.onmessage = function (message) { 1075 removeSpinner( 2); 1073 1076 console.log("onmessage: ", connectAttempt, message.data); 1074 1077 owner.processMessage(message.data); … … 1470 1473 return /ll[a-z]+\.m3u8/.test(url); 1471 1474 } 1475 1476 function removeSpinner( place ) { 1477 const spinnerId = 'wpstream-pre-load-spinner'; 1478 const spinner = document.getElementById(spinnerId); 1479 spinner.style.display = 'none'; 1480 } -
wpstream/tags/4.9.2/readme.txt
r3394979 r3402264 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4.9. 17 Stable tag: 4.9.2 8 8 License: GPL 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 136 136 == Changelog == 137 137 138 = 4.9.2 = 139 * Enhancement - Add loading spinner to the video player when loading 140 * Enhancement - Improve the quota to periodically update the data 141 * Fix - Channel status on the dashboard 142 * Fix - Logo size on mobile devices 143 138 144 = 4.9.1 = 139 145 * Fix - External Streaming App modal not showing -
wpstream/tags/4.9.2/wpstream.php
r3394979 r3402264 4 4 * Plugin URI: http://wpstream.net 5 5 * Description: WpStream is a platform that allows you to live stream, create Video-on-Demand, and offer Pay-Per-View videos. We provide an affordable and user-friendly way for businesses, non-profits, and public institutions to broadcast their content and monetize their work. 6 * Version: 4.9. 16 * Version: 4.9.2 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4.9. 1');17 define('WPSTREAM_PLUGIN_VERSION', '4.9.2'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https'); -
wpstream/trunk/admin/class-wpstream-admin.php
r3394979 r3402264 308 308 ); 309 309 } 310 311 if ( in_array( $current_screen->base, ['toplevel_page_wpstream_credentials', 'wpstream_page_wpstream_live_channels', 'wpstream_page_wpstream_recordings', 'wpstream_page_wpstream_onboard'] ) ) { 312 wp_enqueue_script( 'wpstream-user-quota-update', plugin_dir_url( __DIR__ ) . '/admin/js/wpstream-user-quota.js', array(), WPSTREAM_PLUGIN_VERSION, true ); 313 wp_localize_script( 'wpstream-user-quota-update', 'wpstream_user_quota_vars', array( 314 'admin_url' => get_admin_url() 315 )); 316 } 310 317 311 318 // Add localized variables for broadcaster … … 3124 3131 $days_since_release = ( time() - strtotime( $release_date ) ) / DAY_IN_SECONDS; 3125 3132 3126 if ( $days_since_release > 30 ) { 3127 return; // update is older than 30 days, do not show notice 3133 // if there's an update newer than 7 days, do not show the notice 3134 if ( $days_since_release < 7 ) { 3135 return; 3128 3136 } 3129 3137 } … … 3134 3142 3135 3143 echo '<div class="notice notice-warning is-dismissible">'; 3136 echo '<p><strong>' . __('W PStream Plugin Update Available', 'wpstream') . '</strong></p>';3144 echo '<p><strong>' . __('WpStream Plugin Update Available', 'wpstream') . '</strong></p>'; 3137 3145 echo '<p>' . sprintf( 3138 3146 __('Version %s is available. Please update to the latest version for new features and security improvements.', 'wpstream'), -
wpstream/trunk/includes/class-wpstream-player.php
r3390939 r3402264 480 480 } 481 481 echo' 482 <video id="wpstream-video'.$now.'" '.$poster_data.' class="video-js vjs-default-skin vjs-fluid vjs-wpstream ' . esc_attr($has_trailer_class) . ' ' . $player_theme . ' ' . $player_logo_position_class . ' ' . $player_logo_horizontal_position . '" playsinline="true" '.$is_muted_str." ".$autoplay_str.'> 483 484 </video>'; 482 <div class="wpstream-video-container"> 483 <div id="wpstream-pre-load-spinner" class="wpstream-pre-load-spinner"></div> 484 <video id="wpstream-video'.$now.'" '.$poster_data.' class="video-js vjs-default-skin vjs-fluid vjs-wpstream ' . esc_attr($has_trailer_class) . ' ' . $player_theme . ' ' . $player_logo_position_class . ' ' . $player_logo_horizontal_position . '" playsinline="true" '.$is_muted_str." ".$autoplay_str.'> 485 </video> 486 </div>'; 485 487 if ($video_trailer){ 486 488 print '<div class="wpstream_theme_trailer_wrapper">'; -
wpstream/trunk/public/css/wpstream_style.css
r3390939 r3402264 77 77 } 78 78 79 .wpstream-video-container { 80 position: relative; 81 } 82 .wpstream-pre-load-spinner { 83 position: absolute; 84 top: 50%; 85 left: 50%; 86 width: 30px; 87 height: 30px; 88 margin: -25px 0 0 -25px; 89 opacity: 0.85; 90 border-radius: 25px; 91 border: 6px solid rgba(43, 51, 63, 0.7); 92 border-top-color: white; 93 animation: wpstream-spinner-spin 1.1s linear infinite; 94 z-index: 1000; 95 } 96 97 @keyframes wpstream-spinner-spin { 98 0% { transform: rotate(0deg); } 99 100% { transform: rotate(360deg); } 100 } 79 101 80 102 .wpstream_not_live_mess_mess{ … … 229 251 .video-js.vjs-has-started .vjs-logo-content img { 230 252 height: auto; 253 } 254 255 @media only screen and (max-width: 768px) { 256 .vjs-logo-content > img { 257 width: 50%; 258 } 231 259 } 232 260 -
wpstream/trunk/public/js/start_streaming.js
r3394809 r3402264 1 1 /*global $, jQuery, wpstream_start_streaming_vars*/ 2 2 var counters={}; 3 var quotaUpdateInterval = null;4 3 5 4 // post_type can be FTV or PPV channel or VOD … … 24 23 wpstream_adjust_settings_general(); 25 24 26 wpstream_update_quota_data();27 25 }); 28 29 jQuery(window).on('beforeunload', wpstream_cleanup_quota_interval );30 jQuery(window).on('visibilitychange', function() {31 if ( document.hidden ) {32 wpstream_cleanup_quota_interval();33 } else {34 wpstream_update_quota_data();35 }36 })37 38 26 39 27 function wpstream_safe_track_onboarding(action, step, element_type = 'button', element_name = '') { … … 497 485 parent.find('.wpstream_show_settings').addClass('wpstream_inactive_icon'); 498 486 const channelStatus = parent.find('.wpstream_channel_status'); 499 if ( channelStatus.css('display', 'none') ) { 500 channelStatus.text(wpstream_start_streaming_vars.channel_on); 501 channelStatus.fadeIn(200); 502 } 503 487 channelStatus.each(function( index, element ) { 488 if ( !jQuery(element).hasClass('not_ready_to_stream') && jQuery(element).css('display', 'none') ) { 489 console.log('put back channel on'); 490 jQuery(element).text(wpstream_start_streaming_vars.channel_on); 491 jQuery(element).fadeIn(200); 492 } 493 if ( jQuery(element).hasClass('not_ready_to_stream') ) { 494 console.log('hide the element'); 495 jQuery(element).hide(); 496 } 497 }); 498 const stopEventButton = parent.find('.wpstream_stop_event'); 499 if ( stopEventButton.css('display', 'none') ) { 500 stopEventButton.fadeIn(200); 501 } 504 502 var webcasterUrl = parent.find('.start_webcaster').attr('data-webcaster-url'); 505 503 if (webcasterUrl === ""){ … … 1033 1031 } 1034 1032 1035 function wpstream_update_quota_data(){1036 wpstream_cleanup_quota_interval();1037 1038 var ajaxurl = wpstream_start_streaming_vars.admin_url + 'admin-ajax.php';1039 var nonce = jQuery('#wpstream_notice_nonce').val();1040 1041 function updateQuota() {1042 jQuery.ajax({1043 type: 'POST',1044 dataType: 'json',1045 url: ajaxurl,1046 timeout: 3000000,1047 1048 data: {1049 'action': 'wpstream_get_live_quota_data',1050 'security': nonce,1051 },1052 success: function (data) {1053 if (data.success === true) {1054 console.log(data)1055 jQuery('#wpstream_available_data').text(wpstream_convert_mb_to_gb( data.data.available_data_mb ) + ' GB');1056 jQuery('#wpstream_available_storage').text( wpstream_convert_mb_to_gb( data.data.available_storage_mb ) + ' GB');1057 }1058 },1059 error: function (jqXHR, textStatus, errorThrown) {1060 console.log(jqXHR, textStatus, errorThrown);1061 }1062 })1063 }1064 1065 if ( quotaUpdateInterval ) {1066 clearInterval( quotaUpdateInterval );1067 }1068 1069 quotaUpdateInterval = setInterval( updateQuota, 60000 );1070 }1071 1072 1033 function wpstream_convert_mb_to_gb(megabits) { 1073 1034 let gigabit = megabits / 1000; … … 1080 1041 return gigabit; 1081 1042 } 1082 1083 function wpstream_cleanup_quota_interval() {1084 if (quotaUpdateInterval) {1085 clearInterval(quotaUpdateInterval);1086 quotaUpdateInterval = null;1087 }1088 } -
wpstream/trunk/public/js/wpstream-player.js
r3388690 r3402264 139 139 if (data == 0) { 140 140 owner.setState("stopped"); 141 removeSpinner(3); 141 142 } else if (data.started == "no") { 142 143 owner.setState("notstarted"); … … 187 188 this.liveMessage.showMessage('stopped'); 188 189 this.playback.pauseContent(); 190 removeSpinner(1); 189 191 break; 190 192 case "started": … … 1071 1073 }; 1072 1074 this.ws.onmessage = function (message) { 1075 removeSpinner( 2); 1073 1076 console.log("onmessage: ", connectAttempt, message.data); 1074 1077 owner.processMessage(message.data); … … 1470 1473 return /ll[a-z]+\.m3u8/.test(url); 1471 1474 } 1475 1476 function removeSpinner( place ) { 1477 const spinnerId = 'wpstream-pre-load-spinner'; 1478 const spinner = document.getElementById(spinnerId); 1479 spinner.style.display = 'none'; 1480 } -
wpstream/trunk/readme.txt
r3394979 r3402264 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4.9. 17 Stable tag: 4.9.2 8 8 License: GPL 9 9 License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html … … 136 136 == Changelog == 137 137 138 = 4.9.2 = 139 * Enhancement - Add loading spinner to the video player when loading 140 * Enhancement - Improve the quota to periodically update the data 141 * Fix - Channel status on the dashboard 142 * Fix - Logo size on mobile devices 143 138 144 = 4.9.1 = 139 145 * Fix - External Streaming App modal not showing -
wpstream/trunk/wpstream.php
r3394979 r3402264 4 4 * Plugin URI: http://wpstream.net 5 5 * Description: WpStream is a platform that allows you to live stream, create Video-on-Demand, and offer Pay-Per-View videos. We provide an affordable and user-friendly way for businesses, non-profits, and public institutions to broadcast their content and monetize their work. 6 * Version: 4.9. 16 * Version: 4.9.2 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4.9. 1');17 define('WPSTREAM_PLUGIN_VERSION', '4.9.2'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https');
Note: See TracChangeset
for help on using the changeset viewer.