Plugin Directory

Changeset 3402264


Ignore:
Timestamp:
11/25/2025 07:33:00 AM (4 months ago)
Author:
wpstream
Message:

Update to version 4.9.2 from GitHub

Location:
wpstream
Files:
2 added
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpstream/tags/4.9.2/admin/class-wpstream-admin.php

    r3394979 r3402264  
    308308                        );
    309309                    }
     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                    }
    310317
    311318        // Add localized variables for broadcaster
     
    31243131                    $days_since_release = ( time() - strtotime( $release_date ) ) / DAY_IN_SECONDS;
    31253132
    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;
    31283136                    }
    31293137                }
     
    31343142
    31353143                echo '<div class="notice notice-warning is-dismissible">';
    3136                 echo '<p><strong>' . __('WPStream Plugin Update Available', 'wpstream') . '</strong></p>';
     3144                echo '<p><strong>' . __('WpStream Plugin Update Available', 'wpstream') . '</strong></p>';
    31373145                echo '<p>' . sprintf(
    31383146                    __('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  
    480480            }
    481481                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>';
    485487                if ($video_trailer){
    486488                    print '<div class="wpstream_theme_trailer_wrapper">';
  • wpstream/tags/4.9.2/public/css/wpstream_style.css

    r3390939 r3402264  
    7777}
    7878
     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}
    79101
    80102.wpstream_not_live_mess_mess{
     
    229251.video-js.vjs-has-started .vjs-logo-content img {
    230252    height: auto;
     253}
     254
     255@media only screen and (max-width: 768px) {
     256    .vjs-logo-content > img {
     257        width: 50%;
     258    }
    231259}
    232260
  • wpstream/tags/4.9.2/public/js/start_streaming.js

    r3394809 r3402264  
    11/*global $, jQuery, wpstream_start_streaming_vars*/
    22var counters={};
    3 var quotaUpdateInterval = null;
    43
    54// post_type can be FTV or PPV channel or VOD
     
    2423    wpstream_adjust_settings_general();
    2524
    26     wpstream_update_quota_data();
    2725});
    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 
    3826
    3927function wpstream_safe_track_onboarding(action, step, element_type = 'button', element_name = '') {
     
    497485    parent.find('.wpstream_show_settings').addClass('wpstream_inactive_icon');
    498486    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    }
    504502    var webcasterUrl = parent.find('.start_webcaster').attr('data-webcaster-url');
    505503    if (webcasterUrl === ""){
     
    10331031}
    10341032
    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 
    10721033function wpstream_convert_mb_to_gb(megabits) {
    10731034    let gigabit = megabits / 1000;
     
    10801041    return gigabit;
    10811042}
    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  
    139139        if (data == 0) {
    140140          owner.setState("stopped");
     141          removeSpinner(3);
    141142        } else if (data.started == "no") {
    142143          owner.setState("notstarted");
     
    187188        this.liveMessage.showMessage('stopped');
    188189        this.playback.pauseContent();
     190        removeSpinner(1);
    189191        break;
    190192      case "started":
     
    10711073      };
    10721074      this.ws.onmessage = function (message) {
     1075        removeSpinner( 2);
    10731076        console.log("onmessage: ", connectAttempt, message.data);
    10741077        owner.processMessage(message.data);
     
    14701473  return /ll[a-z]+\.m3u8/.test(url);
    14711474}
     1475
     1476function 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  
    55Tested up to: 6.8
    66Requires PHP: 7.1
    7 Stable tag: 4.9.1
     7Stable tag: 4.9.2
    88License: GPL
    99License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    136136== Changelog ==
    137137
     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
    138144= 4.9.1 =
    139145* Fix - External Streaming App modal not showing
  • wpstream/tags/4.9.2/wpstream.php

    r3394979 r3402264  
    44 * Plugin URI:        http://wpstream.net
    55 * 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.1
     6 * Version:           4.9.2
    77 * Author:            wpstream
    88 * Author URI:        http://wpstream.net
     
    1515    die;
    1616}
    17 define('WPSTREAM_PLUGIN_VERSION', '4.9.1');
     17define('WPSTREAM_PLUGIN_VERSION', '4.9.2');
    1818define('WPSTREAM_CLUBLINK', 'wpstream.net');
    1919define('WPSTREAM_CLUBLINKSSL', 'https');
  • wpstream/trunk/admin/class-wpstream-admin.php

    r3394979 r3402264  
    308308                        );
    309309                    }
     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                    }
    310317
    311318        // Add localized variables for broadcaster
     
    31243131                    $days_since_release = ( time() - strtotime( $release_date ) ) / DAY_IN_SECONDS;
    31253132
    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;
    31283136                    }
    31293137                }
     
    31343142
    31353143                echo '<div class="notice notice-warning is-dismissible">';
    3136                 echo '<p><strong>' . __('WPStream Plugin Update Available', 'wpstream') . '</strong></p>';
     3144                echo '<p><strong>' . __('WpStream Plugin Update Available', 'wpstream') . '</strong></p>';
    31373145                echo '<p>' . sprintf(
    31383146                    __('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  
    480480            }
    481481                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>';
    485487                if ($video_trailer){
    486488                    print '<div class="wpstream_theme_trailer_wrapper">';
  • wpstream/trunk/public/css/wpstream_style.css

    r3390939 r3402264  
    7777}
    7878
     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}
    79101
    80102.wpstream_not_live_mess_mess{
     
    229251.video-js.vjs-has-started .vjs-logo-content img {
    230252    height: auto;
     253}
     254
     255@media only screen and (max-width: 768px) {
     256    .vjs-logo-content > img {
     257        width: 50%;
     258    }
    231259}
    232260
  • wpstream/trunk/public/js/start_streaming.js

    r3394809 r3402264  
    11/*global $, jQuery, wpstream_start_streaming_vars*/
    22var counters={};
    3 var quotaUpdateInterval = null;
    43
    54// post_type can be FTV or PPV channel or VOD
     
    2423    wpstream_adjust_settings_general();
    2524
    26     wpstream_update_quota_data();
    2725});
    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 
    3826
    3927function wpstream_safe_track_onboarding(action, step, element_type = 'button', element_name = '') {
     
    497485    parent.find('.wpstream_show_settings').addClass('wpstream_inactive_icon');
    498486    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    }
    504502    var webcasterUrl = parent.find('.start_webcaster').attr('data-webcaster-url');
    505503    if (webcasterUrl === ""){
     
    10331031}
    10341032
    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 
    10721033function wpstream_convert_mb_to_gb(megabits) {
    10731034    let gigabit = megabits / 1000;
     
    10801041    return gigabit;
    10811042}
    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  
    139139        if (data == 0) {
    140140          owner.setState("stopped");
     141          removeSpinner(3);
    141142        } else if (data.started == "no") {
    142143          owner.setState("notstarted");
     
    187188        this.liveMessage.showMessage('stopped');
    188189        this.playback.pauseContent();
     190        removeSpinner(1);
    189191        break;
    190192      case "started":
     
    10711073      };
    10721074      this.ws.onmessage = function (message) {
     1075        removeSpinner( 2);
    10731076        console.log("onmessage: ", connectAttempt, message.data);
    10741077        owner.processMessage(message.data);
     
    14701473  return /ll[a-z]+\.m3u8/.test(url);
    14711474}
     1475
     1476function 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  
    55Tested up to: 6.8
    66Requires PHP: 7.1
    7 Stable tag: 4.9.1
     7Stable tag: 4.9.2
    88License: GPL
    99License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    136136== Changelog ==
    137137
     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
    138144= 4.9.1 =
    139145* Fix - External Streaming App modal not showing
  • wpstream/trunk/wpstream.php

    r3394979 r3402264  
    44 * Plugin URI:        http://wpstream.net
    55 * 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.1
     6 * Version:           4.9.2
    77 * Author:            wpstream
    88 * Author URI:        http://wpstream.net
     
    1515    die;
    1616}
    17 define('WPSTREAM_PLUGIN_VERSION', '4.9.1');
     17define('WPSTREAM_PLUGIN_VERSION', '4.9.2');
    1818define('WPSTREAM_CLUBLINK', 'wpstream.net');
    1919define('WPSTREAM_CLUBLINKSSL', 'https');
Note: See TracChangeset for help on using the changeset viewer.