Plugin Directory

Changeset 3448460


Ignore:
Timestamp:
01/28/2026 08:13:38 AM (2 months ago)
Author:
wpstream
Message:

Update to version 4.10 from GitHub

Location:
wpstream
Files:
2 added
14 edited
1 copied

Legend:

Unmodified
Added
Removed
  • wpstream/tags/4.10/admin/js/wpstream-onboarding-page.js

    r3415067 r3448460  
    1212 */
    1313function wpstream_track_onboarding_step(action, step, element_type= '', element_name = '') {
    14     console.log('Tracking onboarding step:', action, step, element_type, element_name);
    1514    fetch( wpstream_onboarding_page_vars.request_url + '/onboarding/index.php', {
    1615        method: 'POST',
  • wpstream/tags/4.10/includes/class-wpstream-player.php

    r3438388 r3448460  
    861861
    862862            $overlay_video_div_id = "random_id_".$now;
    863             print '<div id="'.esc_attr($overlay_video_div_id).'" class="vjs-title-overlay wpstream-video-title-overlay">'.esc_html__('Playing:','wpstream').' '.get_the_title($product_id).'</div>';
     863            $this->wpstream_render_vod_title_overlay(
     864                $overlay_video_div_id,
     865                get_the_title($product_id)
     866            );
    864867
    865868            $thumb_id               =   get_post_thumbnail_id($product_id);
     
    10531056            $now                =   time().rand(0,1000000);
    10541057            $overlay_video_div_id = "random_id_".$now;
    1055             print '<div id="'.esc_attr($overlay_video_div_id).'" class="vjs-title-overlay wpstream-video-title-overlay">'.esc_html__('Playing:','wpstream').' '.get_the_title($product_id).'</div>';
     1058            $this->wpstream_render_vod_title_overlay(
     1059                $overlay_video_div_id,
     1060                get_the_title($product_id)
     1061            );
    10561062
    10571063
     
    11701176            return  get_option('wpstream_api_username_from_token');
    11711177        }
     1178
     1179            /**
     1180             * Render title overlay via action hook.
     1181             *
     1182             * @param string $overlay_id Overlay element id.
     1183             * @param string $title_text Title text.
     1184             */
     1185            private function wpstream_render_vod_title_overlay( $overlay_id, $title_text ) {
     1186                if ( has_action( 'wpstream_vod_title_overlay' ) ) {
     1187                    do_action(
     1188                        'wpstream_vod_title_overlay',
     1189                        $overlay_id,
     1190                        $title_text,
     1191                        esc_html__( 'Playing:', 'wpstream' )
     1192                    );
     1193                }
     1194            }
    11721195       
    11731196    /**
  • wpstream/tags/4.10/public/class-wpstream-public.php

    r3438388 r3448460  
    8181            );
    8282            wp_enqueue_style('wpstream-integrations',   plugin_dir_url( __DIR__ ) .'integrations/css/integrations.css',array(), WPSTREAM_PLUGIN_VERSION, 'all' );
     83
    8384    }
    8485
     
    9394        // Enqueuing is happing directly wherever is used
    9495        wp_register_script('video.min',              'https://vjs.zencdn.net/8.20.0/video.min.js', WPSTREAM_PLUGIN_VERSION, true);
     96
     97        // Quality selector dependency (Video.js plugin)
     98        wp_register_script(
     99            'videojs-contrib-quality-levels',
     100            'https://cdn.jsdelivr.net/npm/videojs-contrib-quality-levels@4.0.0/dist/videojs-contrib-quality-levels.min.js',
     101            array('video.min'),
     102            '4.0.0',
     103            true
     104        );
     105
     106        // WpStream quality selector (Video.js 8 compatible)
     107        wp_register_script(
     108            'wpstream-quality-selector',
     109            plugin_dir_url( __FILE__ ) . 'js/wpstream-quality-selector.js',
     110            array('video.min', 'videojs-contrib-quality-levels'),
     111            WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-quality-selector.js'),
     112            true
     113        );
    95114
    96115        // Enqueue the VideoJS Logo plugin script
     
    102121            true
    103122        );
    104                 wp_register_script('youtube.min',         
     123
     124        // Ensure quality selector scripts are available wherever wpstream-player runs
     125        wp_enqueue_script('videojs-contrib-quality-levels');
     126        wp_enqueue_script('wpstream-quality-selector');
     127
     128                wp_register_script('youtube.min',
    105129                                  plugin_dir_url( __FILE__ ).'js/youtube.min.js',
    106130                                  array('video.min'),
     
    110134                    'wpstream-player',
    111135                    plugin_dir_url( __FILE__ ).'js/wpstream-player.js',
    112                     array('video.min'),
     136                    array('video.min','wpstream-quality-selector'),
    113137                    WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-player.js'),
    114138                    true
    115139                );
    116140
     141                $abr_enabled = false;
     142                $post_meta = get_post_meta( get_the_ID(), 'local_event_options', true );
     143                if ( !empty($post_meta) && isset($post_meta['adaptive_bitrate']) && $post_meta['adaptive_bitrate'] == 1 ) {
     144                    $abr_enabled = true;
     145                }
    117146                wp_localize_script('wpstream-player', 'wpstream_player_vars',
    118147                    array(
     
    134163                        'wpstream_is_streamify_user'        => $this->main->wpstream_player->wpstream_is_streamify_user( get_the_ID() ),
    135164                        'player_check_status_nonce' => wp_create_nonce( 'wpstream_player_check_status_nonce'),
     165                        'is_abr_enabled'                   => $abr_enabled,
    136166                    )
    137167                );
  • wpstream/tags/4.10/public/css/video-js.css

    r3390939 r3448460  
    626626    0% { transform: rotate(0deg); }
    627627    100% { transform: rotate(360deg); }
     628}
     629
     630.vjs-control-bar .vjs-menu-button.vjs-wpstream-quality {
     631    width: 40px;
     632    height: 40px;
     633}
     634
     635.vjs-control-bar .vjs-menu-button.vjs-wpstream-quality .vjs-icon-placeholder::before {
     636    font-family: 'VideoJS', serif;
     637    content: "\f110";
    628638}
    629639
  • wpstream/tags/4.10/public/js/wpstream-player.js

    r3438388 r3448460  
    306306      // muted    : true
    307307    });
     308
     309    // Enable HLS quality selector (Video.js 8 compatible)
     310    try {
     311      if (typeof window.wpstreamInstallQualitySelector === 'function' && wpstream_player_vars.is_abr_enabled == 1) {
     312        window.wpstreamInstallQualitySelector(this.player);
     313      }
     314    } catch (e) {
     315      // optional
     316    }
    308317
    309318      if ( !wpstream_player_vars.wpstream_is_streamify_user ) {
     
    13341343  }
    13351344
     1345  //  Enable HLS quality selector (Video.js 8 compatible)
     1346  // Disable for now on VODs
     1347  // try {
     1348  //   if (typeof window.wpstreamInstallQualitySelector === 'function' ) {
     1349  //     window.wpstreamInstallQualitySelector(player);
     1350  //   }
     1351  // } catch (e) {
     1352  //   // optional
     1353  // }
     1354
    13361355  if (settings.theaterModeButtons) {
    13371356    const Button = videojs.getComponent("Button");
  • wpstream/tags/4.10/readme.txt

    r3438388 r3448460  
    55Tested up to: 6.8
    66Requires PHP: 7.1
    7 Stable tag: 4.9.8
     7Stable tag: 4.10
    88License: GPL
    99License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    136136== Changelog ==
    137137
     138= 4.10 =
     139* Feature - Add quality selector (ABR) option to the player
     140
    138141= 4.9.8 =
    139142* Fix - Watch later option on the Elementor widget
  • wpstream/tags/4.10/wpstream.php

    r3438388 r3448460  
    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.8
     6 * Version:           4.10
    77 * Author:            wpstream
    88 * Author URI:        http://wpstream.net
     
    1515    die;
    1616}
    17 define('WPSTREAM_PLUGIN_VERSION', '4.9.8');
     17define('WPSTREAM_PLUGIN_VERSION', '4.10');
    1818define('WPSTREAM_CLUBLINK', 'wpstream.net');
    1919define('WPSTREAM_CLUBLINKSSL', 'https');
     
    225225require_once plugin_dir_path(__FILE__) . 'integrations/hello-wpstream/theme-import.php';
    226226add_filter('pt-ocdi/import_files', 'ocdi_import_files');
     227add_filter('ocdi/import_files', 'ocdi_import_files');
    227228add_action('pt-ocdi/after_import', 'ocdi_after_import_setup');
     229add_action('ocdi/after_import', 'ocdi_after_import_setup');
     230add_action('ocdi/customizer_import_execution', 'wpstream_ocdi_force_customizer_mods', 20, 1);
    228231add_filter('pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text');
     232add_filter('ocdi/plugin_intro_text', 'ocdi_plugin_intro_text');
    229233
    230234
  • wpstream/trunk/admin/js/wpstream-onboarding-page.js

    r3415067 r3448460  
    1212 */
    1313function wpstream_track_onboarding_step(action, step, element_type= '', element_name = '') {
    14     console.log('Tracking onboarding step:', action, step, element_type, element_name);
    1514    fetch( wpstream_onboarding_page_vars.request_url + '/onboarding/index.php', {
    1615        method: 'POST',
  • wpstream/trunk/includes/class-wpstream-player.php

    r3438388 r3448460  
    861861
    862862            $overlay_video_div_id = "random_id_".$now;
    863             print '<div id="'.esc_attr($overlay_video_div_id).'" class="vjs-title-overlay wpstream-video-title-overlay">'.esc_html__('Playing:','wpstream').' '.get_the_title($product_id).'</div>';
     863            $this->wpstream_render_vod_title_overlay(
     864                $overlay_video_div_id,
     865                get_the_title($product_id)
     866            );
    864867
    865868            $thumb_id               =   get_post_thumbnail_id($product_id);
     
    10531056            $now                =   time().rand(0,1000000);
    10541057            $overlay_video_div_id = "random_id_".$now;
    1055             print '<div id="'.esc_attr($overlay_video_div_id).'" class="vjs-title-overlay wpstream-video-title-overlay">'.esc_html__('Playing:','wpstream').' '.get_the_title($product_id).'</div>';
     1058            $this->wpstream_render_vod_title_overlay(
     1059                $overlay_video_div_id,
     1060                get_the_title($product_id)
     1061            );
    10561062
    10571063
     
    11701176            return  get_option('wpstream_api_username_from_token');
    11711177        }
     1178
     1179            /**
     1180             * Render title overlay via action hook.
     1181             *
     1182             * @param string $overlay_id Overlay element id.
     1183             * @param string $title_text Title text.
     1184             */
     1185            private function wpstream_render_vod_title_overlay( $overlay_id, $title_text ) {
     1186                if ( has_action( 'wpstream_vod_title_overlay' ) ) {
     1187                    do_action(
     1188                        'wpstream_vod_title_overlay',
     1189                        $overlay_id,
     1190                        $title_text,
     1191                        esc_html__( 'Playing:', 'wpstream' )
     1192                    );
     1193                }
     1194            }
    11721195       
    11731196    /**
  • wpstream/trunk/public/class-wpstream-public.php

    r3438388 r3448460  
    8181            );
    8282            wp_enqueue_style('wpstream-integrations',   plugin_dir_url( __DIR__ ) .'integrations/css/integrations.css',array(), WPSTREAM_PLUGIN_VERSION, 'all' );
     83
    8384    }
    8485
     
    9394        // Enqueuing is happing directly wherever is used
    9495        wp_register_script('video.min',              'https://vjs.zencdn.net/8.20.0/video.min.js', WPSTREAM_PLUGIN_VERSION, true);
     96
     97        // Quality selector dependency (Video.js plugin)
     98        wp_register_script(
     99            'videojs-contrib-quality-levels',
     100            'https://cdn.jsdelivr.net/npm/videojs-contrib-quality-levels@4.0.0/dist/videojs-contrib-quality-levels.min.js',
     101            array('video.min'),
     102            '4.0.0',
     103            true
     104        );
     105
     106        // WpStream quality selector (Video.js 8 compatible)
     107        wp_register_script(
     108            'wpstream-quality-selector',
     109            plugin_dir_url( __FILE__ ) . 'js/wpstream-quality-selector.js',
     110            array('video.min', 'videojs-contrib-quality-levels'),
     111            WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-quality-selector.js'),
     112            true
     113        );
    95114
    96115        // Enqueue the VideoJS Logo plugin script
     
    102121            true
    103122        );
    104                 wp_register_script('youtube.min',         
     123
     124        // Ensure quality selector scripts are available wherever wpstream-player runs
     125        wp_enqueue_script('videojs-contrib-quality-levels');
     126        wp_enqueue_script('wpstream-quality-selector');
     127
     128                wp_register_script('youtube.min',
    105129                                  plugin_dir_url( __FILE__ ).'js/youtube.min.js',
    106130                                  array('video.min'),
     
    110134                    'wpstream-player',
    111135                    plugin_dir_url( __FILE__ ).'js/wpstream-player.js',
    112                     array('video.min'),
     136                    array('video.min','wpstream-quality-selector'),
    113137                    WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-player.js'),
    114138                    true
    115139                );
    116140
     141                $abr_enabled = false;
     142                $post_meta = get_post_meta( get_the_ID(), 'local_event_options', true );
     143                if ( !empty($post_meta) && isset($post_meta['adaptive_bitrate']) && $post_meta['adaptive_bitrate'] == 1 ) {
     144                    $abr_enabled = true;
     145                }
    117146                wp_localize_script('wpstream-player', 'wpstream_player_vars',
    118147                    array(
     
    134163                        'wpstream_is_streamify_user'        => $this->main->wpstream_player->wpstream_is_streamify_user( get_the_ID() ),
    135164                        'player_check_status_nonce' => wp_create_nonce( 'wpstream_player_check_status_nonce'),
     165                        'is_abr_enabled'                   => $abr_enabled,
    136166                    )
    137167                );
  • wpstream/trunk/public/css/video-js.css

    r3390939 r3448460  
    626626    0% { transform: rotate(0deg); }
    627627    100% { transform: rotate(360deg); }
     628}
     629
     630.vjs-control-bar .vjs-menu-button.vjs-wpstream-quality {
     631    width: 40px;
     632    height: 40px;
     633}
     634
     635.vjs-control-bar .vjs-menu-button.vjs-wpstream-quality .vjs-icon-placeholder::before {
     636    font-family: 'VideoJS', serif;
     637    content: "\f110";
    628638}
    629639
  • wpstream/trunk/public/js/wpstream-player.js

    r3438388 r3448460  
    306306      // muted    : true
    307307    });
     308
     309    // Enable HLS quality selector (Video.js 8 compatible)
     310    try {
     311      if (typeof window.wpstreamInstallQualitySelector === 'function' && wpstream_player_vars.is_abr_enabled == 1) {
     312        window.wpstreamInstallQualitySelector(this.player);
     313      }
     314    } catch (e) {
     315      // optional
     316    }
    308317
    309318      if ( !wpstream_player_vars.wpstream_is_streamify_user ) {
     
    13341343  }
    13351344
     1345  //  Enable HLS quality selector (Video.js 8 compatible)
     1346  // Disable for now on VODs
     1347  // try {
     1348  //   if (typeof window.wpstreamInstallQualitySelector === 'function' ) {
     1349  //     window.wpstreamInstallQualitySelector(player);
     1350  //   }
     1351  // } catch (e) {
     1352  //   // optional
     1353  // }
     1354
    13361355  if (settings.theaterModeButtons) {
    13371356    const Button = videojs.getComponent("Button");
  • wpstream/trunk/readme.txt

    r3438388 r3448460  
    55Tested up to: 6.8
    66Requires PHP: 7.1
    7 Stable tag: 4.9.8
     7Stable tag: 4.10
    88License: GPL
    99License URI: http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
     
    136136== Changelog ==
    137137
     138= 4.10 =
     139* Feature - Add quality selector (ABR) option to the player
     140
    138141= 4.9.8 =
    139142* Fix - Watch later option on the Elementor widget
  • wpstream/trunk/wpstream.php

    r3438388 r3448460  
    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.8
     6 * Version:           4.10
    77 * Author:            wpstream
    88 * Author URI:        http://wpstream.net
     
    1515    die;
    1616}
    17 define('WPSTREAM_PLUGIN_VERSION', '4.9.8');
     17define('WPSTREAM_PLUGIN_VERSION', '4.10');
    1818define('WPSTREAM_CLUBLINK', 'wpstream.net');
    1919define('WPSTREAM_CLUBLINKSSL', 'https');
     
    225225require_once plugin_dir_path(__FILE__) . 'integrations/hello-wpstream/theme-import.php';
    226226add_filter('pt-ocdi/import_files', 'ocdi_import_files');
     227add_filter('ocdi/import_files', 'ocdi_import_files');
    227228add_action('pt-ocdi/after_import', 'ocdi_after_import_setup');
     229add_action('ocdi/after_import', 'ocdi_after_import_setup');
     230add_action('ocdi/customizer_import_execution', 'wpstream_ocdi_force_customizer_mods', 20, 1);
    228231add_filter('pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text');
     232add_filter('ocdi/plugin_intro_text', 'ocdi_plugin_intro_text');
    229233
    230234
Note: See TracChangeset for help on using the changeset viewer.