@@ -47,6 +47,7 @@ function ableplayer_enqueue_scripts() {
4747 // Register/enqueue other dependencies.
4848 wp_enqueue_script ( 'js-cookie ' , plugins_url ( 'thirdparty ' , __FILE__ ) . '/js.cookie.js ' , array ( 'jquery ' ), ABLEPLAYER_VERSION , true );
4949 wp_enqueue_script ( 'vimeo ' , 'https://player.vimeo.com/api/player.js ' , array (), ABLEPLAYER_VERSION , true );
50+ wp_register_script ( 'ableplayer-video ' , plugins_url ( 'assets ' , __FILE__ ) . '/js/video.js ' , array (), ABLEPLAYER_VERSION , true );
5051
5152 // if the environment is production, use minified files. Otherwise, inherit the value of SCRIPT_DEBUG.
5253 $ is_production = ( function_exists ( 'wp_get_environment_type ' ) && wp_get_environment_type () === 'production ' ) ? true : SCRIPT_DEBUG ;
@@ -77,7 +78,7 @@ function ableplayer_enqueue_scripts() {
7778 $ css_dir = apply_filters ( 'able_player_css ' , plugins_url ( 'build ' , __FILE__ ) . '/ ' . $ css_file , $ is_production );
7879
7980 // Enqueue Able Player script and CSS.
80- wp_enqueue_script ( 'ableplayer ' , $ js_dir , array ( 'jquery ' ), ABLEPLAYER_VERSION , true );
81+ wp_enqueue_script ( 'ableplayer ' , $ js_dir , array ( 'jquery ' , ' ableplayer-video ' ), ABLEPLAYER_VERSION , true );
8182 wp_enqueue_style ( 'ableplayer ' , $ css_dir , array (), ABLEPLAYER_VERSION );
8283}
8384add_action ( 'wp_enqueue_scripts ' , 'ableplayer_enqueue_scripts ' );
0 commit comments