 
 package com.widevine
 {
+	import com.kaltura.kdpfl.view.controls.KTrace;
+	
 	import flash.events.*;
 	import flash.external.ExternalInterface;
 	import flash.net.NetConnection;
 	import flash.net.Responder;
+	import flash.utils.setTimeout;
 	
 	public class WvNetConnection extends NetConnection 
 	{

				command = command.substring(0, command.lastIndexOf("/")+1);
				//trace("(Handling Wv RTMP stream:" + command);
			}
			if (doConnect(command) != 0) {
				//dispatchEvent(new NetStatusEvent("netStatus", obj));
				//throw new Error("doConnect() failed");
				dispatchEvent(new Event(DO_CONNECT_FAILED));
			}
		}		
		///////////////////////////////////////////////////////////////////////////
		private function doConnect(theURL:String):Number
		{
			myOrigURL = theURL;
			if (myOrigURL == null) {
				myErrorText = "url passed in connect() is null";
				return 1;
			}
			

	
				if (myNewURL.toLowerCase().indexOf("error:") != -1) {
					myErrorText = myNewURL;
					KTrace.getInstance().log("doConnect"  + myErrorText);
					
					return 2;
				}
			}
			catch (errObject:Error) {
				
				myErrorText = "WVGetURL() failed. " + errObject.message;
				KTrace.getInstance().log("doConnect"  + myErrorText);
				
			}
			try {
				//trace("Calling super.connect()");
				super.connect(myNewURL);
			}
			catch (errObject:Error) {
				
				myErrorText = "super.connect() failed. " + errObject.message;
				KTrace.getInstance().log("doConnect" + myErrorText);
			}
			myIsConnected = true;
			return 0;
