code: function(file) {
  
        var defer = new $.Deferred(),
          size = file.size,
          $media = file.type === 'VIDEO' ? $('<video>') : $('<audio>'),
          onMediaLoaded = function() {
            log('File Loaded:' + file.source);
  
            _bytesLoaded += size;
  
            onElementLoaded(file, $media[0]);
  
            _files[_currentSegment].splice(0, 1);
  
            $media.off();
            $media = null;
  
            updatePercentage();
            defer.resolve();
          };
  
        // if it is a mobile or an iPad we avoid the media preloading
        if (!_isMobile && !_isTablet) {
  
          $media.on('loadstart', function() {
            if (this.networkState === 3) {
              onMediaError(file, this);
              onMediaLoaded();
            }
          });
  
          $media.on('error stalled', function() {
            onMediaError(file, this);
            onMediaLoaded();
          });
  
          // on Media Progress
          $media.on('loadedmetadata', function() {
            $media.on('progress', function() {
              var bytesTmpLoaded = 0;
              log('loading in progress file:' + file.source);
              if (this.buffered.length > 0) {
                bytesTmpLoaded = (size / this.duration) * this.buffered.end(0);
                size -= bytesTmpLoaded;
                _bytesLoaded += bytesTmpLoaded;
                updatePercentage();
                // Check if the video has been buffered enough to be considered preloaded
                if (1 / size * bytesTmpLoaded > mediaBufferSizeToPreload && !forceMediaPreload)
                  onMediaLoaded();
              }
            });
          });
  
          $media.attr({
            preload: 'auto',
            src: file.source,
            controls: 'controls'
          });
  
          // let the browser decide when the media file has been buffered enough
          // to be played
          if (forceMediaPreload)
            $media.on('canplaythrough', onMediaLoaded);
  
        } else {
          //  that means that media is loaded by default
          onMediaLoaded();
        }
  
  
        return defer.promise();
      }
docs: /*
  
  @description Load video or audio files
  @param file: object