Changeset 3448460
- Timestamp:
- 01/28/2026 08:13:38 AM (2 months ago)
- Location:
- wpstream
- Files:
-
- 2 added
- 14 edited
- 1 copied
-
tags/4.10 (copied) (copied from wpstream/trunk)
-
tags/4.10/admin/js/wpstream-onboarding-page.js (modified) (1 diff)
-
tags/4.10/includes/class-wpstream-player.php (modified) (3 diffs)
-
tags/4.10/public/class-wpstream-public.php (modified) (5 diffs)
-
tags/4.10/public/css/video-js.css (modified) (1 diff)
-
tags/4.10/public/js/wpstream-player.js (modified) (2 diffs)
-
tags/4.10/public/js/wpstream-quality-selector.js (added)
-
tags/4.10/readme.txt (modified) (2 diffs)
-
tags/4.10/wpstream.php (modified) (3 diffs)
-
trunk/admin/js/wpstream-onboarding-page.js (modified) (1 diff)
-
trunk/includes/class-wpstream-player.php (modified) (3 diffs)
-
trunk/public/class-wpstream-public.php (modified) (5 diffs)
-
trunk/public/css/video-js.css (modified) (1 diff)
-
trunk/public/js/wpstream-player.js (modified) (2 diffs)
-
trunk/public/js/wpstream-quality-selector.js (added)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/wpstream.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpstream/tags/4.10/admin/js/wpstream-onboarding-page.js
r3415067 r3448460 12 12 */ 13 13 function wpstream_track_onboarding_step(action, step, element_type= '', element_name = '') { 14 console.log('Tracking onboarding step:', action, step, element_type, element_name);15 14 fetch( wpstream_onboarding_page_vars.request_url + '/onboarding/index.php', { 16 15 method: 'POST', -
wpstream/tags/4.10/includes/class-wpstream-player.php
r3438388 r3448460 861 861 862 862 $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 ); 864 867 865 868 $thumb_id = get_post_thumbnail_id($product_id); … … 1053 1056 $now = time().rand(0,1000000); 1054 1057 $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 ); 1056 1062 1057 1063 … … 1170 1176 return get_option('wpstream_api_username_from_token'); 1171 1177 } 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 } 1172 1195 1173 1196 /** -
wpstream/tags/4.10/public/class-wpstream-public.php
r3438388 r3448460 81 81 ); 82 82 wp_enqueue_style('wpstream-integrations', plugin_dir_url( __DIR__ ) .'integrations/css/integrations.css',array(), WPSTREAM_PLUGIN_VERSION, 'all' ); 83 83 84 } 84 85 … … 93 94 // Enqueuing is happing directly wherever is used 94 95 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 ); 95 114 96 115 // Enqueue the VideoJS Logo plugin script … … 102 121 true 103 122 ); 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', 105 129 plugin_dir_url( __FILE__ ).'js/youtube.min.js', 106 130 array('video.min'), … … 110 134 'wpstream-player', 111 135 plugin_dir_url( __FILE__ ).'js/wpstream-player.js', 112 array('video.min' ),136 array('video.min','wpstream-quality-selector'), 113 137 WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-player.js'), 114 138 true 115 139 ); 116 140 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 } 117 146 wp_localize_script('wpstream-player', 'wpstream_player_vars', 118 147 array( … … 134 163 'wpstream_is_streamify_user' => $this->main->wpstream_player->wpstream_is_streamify_user( get_the_ID() ), 135 164 'player_check_status_nonce' => wp_create_nonce( 'wpstream_player_check_status_nonce'), 165 'is_abr_enabled' => $abr_enabled, 136 166 ) 137 167 ); -
wpstream/tags/4.10/public/css/video-js.css
r3390939 r3448460 626 626 0% { transform: rotate(0deg); } 627 627 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"; 628 638 } 629 639 -
wpstream/tags/4.10/public/js/wpstream-player.js
r3438388 r3448460 306 306 // muted : true 307 307 }); 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 } 308 317 309 318 if ( !wpstream_player_vars.wpstream_is_streamify_user ) { … … 1334 1343 } 1335 1344 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 1336 1355 if (settings.theaterModeButtons) { 1337 1356 const Button = videojs.getComponent("Button"); -
wpstream/tags/4.10/readme.txt
r3438388 r3448460 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4. 9.87 Stable tag: 4.10 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.10 = 139 * Feature - Add quality selector (ABR) option to the player 140 138 141 = 4.9.8 = 139 142 * Fix - Watch later option on the Elementor widget -
wpstream/tags/4.10/wpstream.php
r3438388 r3448460 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.86 * Version: 4.10 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4. 9.8');17 define('WPSTREAM_PLUGIN_VERSION', '4.10'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https'); … … 225 225 require_once plugin_dir_path(__FILE__) . 'integrations/hello-wpstream/theme-import.php'; 226 226 add_filter('pt-ocdi/import_files', 'ocdi_import_files'); 227 add_filter('ocdi/import_files', 'ocdi_import_files'); 227 228 add_action('pt-ocdi/after_import', 'ocdi_after_import_setup'); 229 add_action('ocdi/after_import', 'ocdi_after_import_setup'); 230 add_action('ocdi/customizer_import_execution', 'wpstream_ocdi_force_customizer_mods', 20, 1); 228 231 add_filter('pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text'); 232 add_filter('ocdi/plugin_intro_text', 'ocdi_plugin_intro_text'); 229 233 230 234 -
wpstream/trunk/admin/js/wpstream-onboarding-page.js
r3415067 r3448460 12 12 */ 13 13 function wpstream_track_onboarding_step(action, step, element_type= '', element_name = '') { 14 console.log('Tracking onboarding step:', action, step, element_type, element_name);15 14 fetch( wpstream_onboarding_page_vars.request_url + '/onboarding/index.php', { 16 15 method: 'POST', -
wpstream/trunk/includes/class-wpstream-player.php
r3438388 r3448460 861 861 862 862 $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 ); 864 867 865 868 $thumb_id = get_post_thumbnail_id($product_id); … … 1053 1056 $now = time().rand(0,1000000); 1054 1057 $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 ); 1056 1062 1057 1063 … … 1170 1176 return get_option('wpstream_api_username_from_token'); 1171 1177 } 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 } 1172 1195 1173 1196 /** -
wpstream/trunk/public/class-wpstream-public.php
r3438388 r3448460 81 81 ); 82 82 wp_enqueue_style('wpstream-integrations', plugin_dir_url( __DIR__ ) .'integrations/css/integrations.css',array(), WPSTREAM_PLUGIN_VERSION, 'all' ); 83 83 84 } 84 85 … … 93 94 // Enqueuing is happing directly wherever is used 94 95 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 ); 95 114 96 115 // Enqueue the VideoJS Logo plugin script … … 102 121 true 103 122 ); 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', 105 129 plugin_dir_url( __FILE__ ).'js/youtube.min.js', 106 130 array('video.min'), … … 110 134 'wpstream-player', 111 135 plugin_dir_url( __FILE__ ).'js/wpstream-player.js', 112 array('video.min' ),136 array('video.min','wpstream-quality-selector'), 113 137 WPSTREAM_PLUGIN_VERSION . '.' . filemtime(plugin_dir_path(__FILE__) . 'js/wpstream-player.js'), 114 138 true 115 139 ); 116 140 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 } 117 146 wp_localize_script('wpstream-player', 'wpstream_player_vars', 118 147 array( … … 134 163 'wpstream_is_streamify_user' => $this->main->wpstream_player->wpstream_is_streamify_user( get_the_ID() ), 135 164 'player_check_status_nonce' => wp_create_nonce( 'wpstream_player_check_status_nonce'), 165 'is_abr_enabled' => $abr_enabled, 136 166 ) 137 167 ); -
wpstream/trunk/public/css/video-js.css
r3390939 r3448460 626 626 0% { transform: rotate(0deg); } 627 627 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"; 628 638 } 629 639 -
wpstream/trunk/public/js/wpstream-player.js
r3438388 r3448460 306 306 // muted : true 307 307 }); 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 } 308 317 309 318 if ( !wpstream_player_vars.wpstream_is_streamify_user ) { … … 1334 1343 } 1335 1344 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 1336 1355 if (settings.theaterModeButtons) { 1337 1356 const Button = videojs.getComponent("Button"); -
wpstream/trunk/readme.txt
r3438388 r3448460 5 5 Tested up to: 6.8 6 6 Requires PHP: 7.1 7 Stable tag: 4. 9.87 Stable tag: 4.10 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.10 = 139 * Feature - Add quality selector (ABR) option to the player 140 138 141 = 4.9.8 = 139 142 * Fix - Watch later option on the Elementor widget -
wpstream/trunk/wpstream.php
r3438388 r3448460 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.86 * Version: 4.10 7 7 * Author: wpstream 8 8 * Author URI: http://wpstream.net … … 15 15 die; 16 16 } 17 define('WPSTREAM_PLUGIN_VERSION', '4. 9.8');17 define('WPSTREAM_PLUGIN_VERSION', '4.10'); 18 18 define('WPSTREAM_CLUBLINK', 'wpstream.net'); 19 19 define('WPSTREAM_CLUBLINKSSL', 'https'); … … 225 225 require_once plugin_dir_path(__FILE__) . 'integrations/hello-wpstream/theme-import.php'; 226 226 add_filter('pt-ocdi/import_files', 'ocdi_import_files'); 227 add_filter('ocdi/import_files', 'ocdi_import_files'); 227 228 add_action('pt-ocdi/after_import', 'ocdi_after_import_setup'); 229 add_action('ocdi/after_import', 'ocdi_after_import_setup'); 230 add_action('ocdi/customizer_import_execution', 'wpstream_ocdi_force_customizer_mods', 20, 1); 228 231 add_filter('pt-ocdi/plugin_intro_text', 'ocdi_plugin_intro_text'); 232 add_filter('ocdi/plugin_intro_text', 'ocdi_plugin_intro_text'); 229 233 230 234
Note: See TracChangeset
for help on using the changeset viewer.