public static function admin_enqueue_scripts()
 {
     global $wp_version;
     global $bc_accounts;
     // Use minified libraries if SCRIPT_DEBUG is turned off.
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     $player_api = new BC_Player_Management_API();
     $players = $player_api->all_player_by_account();
     $js_variable = array('path' => esc_url(BRIGHTCOVE_URL . 'assets/js/src/'), 'preload' => BC_Setup::preload_params(), 'wp_version' => $wp_version, 'languages' => BC_Utility::languages(), 'players' => $players, 'str_badformat' => esc_html__('This file is not the proper format. Please use .vtt files, for more information visit', 'brightcove'), 'badformat_link' => esc_url('https://support.brightcove.com/en/video-cloud/docs/adding-captions-videos#captionsfile'), 'str_addcaption' => esc_html__('Add Another Caption', 'brightcove'), 'str_addremote' => esc_html__('Add another remote file', 'brightcove'), 'str_selectfile' => esc_html__('Select File', 'brightcove'), 'str_useremote' => esc_html__('Use a remote file instead', 'brightcove'), 'str_apifailure' => esc_html__("Sorry! We weren't able to reach the Brightcove API even after trying a few times. Please try refreshing the page.", 'brightcove'), 'posts_per_page' => absint(apply_filters('brightcove_posts_per_page', 100)));
     wp_register_script('brightcove', '//sadmin.brightcove.com/js/BrightcoveExperiences.js');
     $playlist_enabled_players_for_accounts = array();
     $accounts = $bc_accounts->get_sanitized_all_accounts();
     foreach ($accounts as $account) {
         $playlist_enabled_players_for_accounts[$account['account_id']] = get_option('_bc_player_playlist_ids_' . $account['account_id']);
     }
     wp_enqueue_script('tinymce_preview', esc_url(BRIGHTCOVE_URL . 'assets/js/src/tinymce.js'), array('mce-view'));
     wp_localize_script('tinymce_preview', 'bctiny', array('wp_version' => $wp_version, 'playlistEnabledPlayers' => $playlist_enabled_players_for_accounts));
     $dependencies = array('jquery', 'backbone', 'wp-backbone', 'media', 'media-editor', 'media-grid', 'media-models', 'media-upload', 'media-views', 'plupload-all', 'brightcove', 'wp-mediaelement', 'tinymce_preview');
     wp_register_script('brightcove-admin', esc_url(BRIGHTCOVE_URL . 'assets/js/brightcove-admin' . $suffix . '.js'), $dependencies);
     wp_localize_script('brightcove-admin', 'wpbc', $js_variable);
     wp_enqueue_script('brightcove-admin');
     wp_enqueue_media();
     wp_register_style('brightcove-video-connect', esc_url(BRIGHTCOVE_URL . 'assets/css/brightcove_video_connect' . $suffix . '.css'), array());
     wp_enqueue_style('brightcove-video-connect');
 }
 public static function admin_enqueue_scripts()
 {
     global $wp_version;
     global $bc_accounts;
     // Use minified libraries if SCRIPT_DEBUG is turned off.
     $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
     $js_variable = array('path' => esc_url(BRIGHTCOVE_URL . 'assets/js/src/'), 'preload' => BC_Setup::preload_params(), 'wp_version' => $wp_version);
     wp_register_script('brightcove', '//sadmin.brightcove.com/js/BrightcoveExperiences.js');
     $playlist_enabled_players_for_accounts = array();
     $accounts = $bc_accounts->get_sanitized_all_accounts();
     foreach ($accounts as $account) {
         $playlist_enabled_players_for_accounts[$account['account_id']] = get_option('_bc_player_playlist_ids_' . $account['account_id']);
     }
     wp_enqueue_script('tinymce_preview', esc_url(BRIGHTCOVE_URL . 'assets/js/src/tinymce.js'), array('mce-view'));
     wp_localize_script('tinymce_preview', 'bctiny', array('wp_version' => $wp_version, 'playlistEnabledPlayers' => $playlist_enabled_players_for_accounts));
     $dependencies = array('jquery', 'backbone', 'wp-backbone', 'media', 'media-editor', 'media-grid', 'media-models', 'media-upload', 'media-views', 'plupload-all', 'brightcove', 'wp-mediaelement', 'tinymce_preview');
     wp_register_script('brightcove-admin', esc_url(BRIGHTCOVE_URL . 'assets/js/brightcove-admin' . $suffix . '.js'), $dependencies);
     wp_localize_script('brightcove-admin', 'wpbc', $js_variable);
     wp_enqueue_script('brightcove-admin');
     wp_enqueue_media();
     wp_register_style('brightcove-video-connect', esc_url(BRIGHTCOVE_URL . 'assets/css/brightcove_video_connect' . $suffix . '.css'), array());
     wp_enqueue_style('brightcove-video-connect');
 }