def kaltura_player_embed(entry_id,options={})
      player_conf_parameter = "/ui_conf_id/"
      options[:div_id] ||= "kplayer"
      options[:size] ||= []
      options[:use_url] ||= false
      width = PLAYER_WIDTH
      height = PLAYER_HEIGHT
      source_type = "entryId"

      unless options[:size].empty?
	      width = options[:size].first
	      height = options[:size].last
      end
        
      if options[:use_url] == true
        source_type = "url"
      end
    
      unless options[:player_conf_id].nil?
        player_conf_parameter += "#{options[:player_conf_id]}"
      else
        unless KalturaFu.config.player_conf_id.nil?
          player_conf_parameter += "#{KalturaFu.config.player_conf_id}"
	      else
	        player_conf_parameter += "#{DEFAULT_KPLAYER}"
        end
      end
      
      "<div id=\"#{options[:div_id]}\"></div>
      <script type=\"text/javascript\">
      	var params= {
      		allowscriptaccess: \"always\",
      		allownetworking: \"all\",
      		allowfullscreen: \"true\",
      		wmode: \"opaque\",
      		bgcolor: \"#000000\"
      	};
      	var flashVars = {};
      	flashVars.sourceType = \"#{source_type}\";      	  
      	flashVars.entryId = \"#{entry_id}\";
      	flashVars.emptyF = \"onKdpEmpty\";
    		flashVars.readyF = \"onKdpReady\";
      		
      	var attributes = {
          id: \"#{options[:div_id]}\",
          name: \"#{options[:div_id]}\"
      	};

      	swfobject.embedSWF(\"#{KalturaFu.config.service_url}/kwidget/wid/_#{KalturaFu.config.partner_id}" + player_conf_parameter + "\",\"#{options[:div_id]}\",\"#{width}\",\"#{height}\",\"10.0.0\",\"http://ttv.mit.edu/swfs/expressinstall.swf\",flashVars,params,attributes);
      </script>"
    end
def kaltura_player_embed(entry_id,options={})
      player_conf_parameter = "/ui_conf_id/"
      options[:div_id] ||= "kplayer"
      options[:size] ||= []
      options[:use_url] ||= false
      width = PLAYER_WIDTH
      height = PLAYER_HEIGHT
      source_type = "entryId"

      unless options[:size].empty?
	      width = options[:size].first
	      height = options[:size].last
      end
        
      if options[:use_url] == true
        source_type = "url"
      end
    
      unless options[:player_conf_id].nil?
        player_conf_parameter += "#{options[:player_conf_id]}"
      else
        unless KalturaFu.config.player_conf_id.nil?
          player_conf_parameter += "#{KalturaFu.config.player_conf_id}"
	      else
	        player_conf_parameter += "#{DEFAULT_KPLAYER}"
        end
      end
      
      "<div id=\"#{options[:div_id]}\"></div>
      <script type=\"text/javascript\">
      	var params= {
      		allowscriptaccess: \"always\",
      		allownetworking: \"all\",
      		allowfullscreen: \"true\",
      		wmode: \"opaque\",
      		bgcolor: \"#000000\"
      	};
      	var flashVars = {};
      	flashVars.sourceType = \"#{source_type}\";      	  
      	flashVars.entryId = \"#{entry_id}\";
      	flashVars.emptyF = \"onKdpEmpty\";
    		flashVars.readyF = \"onKdpReady\";
      		
      	var attributes = {
          id: \"#{options[:div_id]}\",
          name: \"#{options[:div_id]}\"
      	};

      	swfobject.embedSWF(\"#{KalturaFu.config.service_url}/kwidget/wid/_#{KalturaFu.config.partner_id}" + player_conf_parameter + "\",\"#{options[:div_id]}\",\"#{width}\",\"#{height}\",\"10.0.0\",\"http://ttv.mit.edu/swfs/expressinstall.swf\",flashVars,params,attributes);
      </script>"
    end
Returns the code needed to embed a KDPv3 player.

 @param [String] entry_id Kaltura entry_id
 @param [Hash] options the embed code options.
 @option options [String] :div_id ('kplayer') The div element that the flash object will be inserted into.
 @option options [Array] :size ([]) The [width,wight] of the player.
 @option options [Boolean] :use_url (false) flag to determine whether entry_id is an entry or a URL of a flash file.
 @option options [String] :player_conf_id (KalturaFu.config(:player_conf_id)) A UI Conf ID to override the player with.

 @return [String] returns a string representation of the html/javascript necessary to play a Kaltura entry.