         self.cachePath      = cachePath
         self.cachingEnabled = cachingEnabled == nil ? false : cachingEnabled!
         super.init()
+
+        let configuration = NSURLSessionConfiguration.defaultSessionConfiguration()
+        configuration.allowsCellularAccess = true
+        configuration.timeoutIntervalForRequest = 30
+        self.session = NSURLSession(configuration: configuration, delegate: self, delegateQueue: NSOperationQueue.mainQueue())
     }
     
     var asset: AVURLAsset {

    }
    
    func resourceLoader(resourceLoader: AVAssetResourceLoader, shouldWaitForLoadingOfRequestedResource loadingRequest: AVAssetResourceLoadingRequest) -> Bool {
    
        if self.connection == nil {
            debug("Starting request to get media URL: \(self.mediaURL)")
            let request = NSURLRequest(URL: replaceUrlScheme(loadingRequest.request.URL!, scheme: "http")!)
            self.connection = NSURLConnection(request: request, delegate: self, startImmediately: false)
            self.connection?.setDelegateQueue(NSOperationQueue.mainQueue())
            self.connection?.start()
        }
        
        self.pendingRequests.append(loadingRequest)

    return urlComponents?.URL
}

class MediaItem: NSObject, NSURLSessionDataDelegate, AVAssetResourceLoaderDelegate {
    var pendingRequests = [AVAssetResourceLoadingRequest]()
    var data: NSMutableData?
    var response: NSURLResponse?
    var session: NSURLSession!
    var connection: NSURLSessionDataTask?
    
    let mediaURL:  NSURL
    let cachePath: String?
