code: function (file) {
          var self = this;
          this.state = 'pending';
  
          this.pc.isInitiator = true;
  
          this.sender = new FileTransfer.Sender();
          this.sender.on('progress', function (sent, size) {
              self._log('info', 'Send progress ' + sent + '/' + size);
          });
          this.sender.on('sentFile', function (meta) {
              self._log('info', 'Sent file', meta.name);
  
              var content = self.pc.localDescription.contents[0];
              delete content.transport;
  
              content.application = {
                  applicationType: 'filetransfer',
                  offer: {
                      hash: {
                          algo: meta.algo,
                          value: meta.hash
                      }
                  }
              };
  
              self.send('description-info', {
                  contents: [content]
              });
              self.emit('sentFile', self, meta);
          });
  
          var sendChannel = this.pc.createDataChannel('filetransfer');
          sendChannel.onopen = function () {
              self.sender.send(file, sendChannel);
          };
  
          var constraints = {
              mandatory: {
                  OfferToReceiveAudio: false,
                  OfferToReceiveVideo: false
              }
          };
  
          this.pc.offer(constraints, function (err, offer) {
              if (err) {
                  self._log('error', 'Could not create WebRTC offer', err);
                  return self.end('failed-application', true);
              }
  
              offer.jingle.contents[0].application = {
                  applicationType: 'filetransfer',
                  offer: {
                      date: file.lastModifiedDate,
                      name: file.name,
                      size: file.size,
                      hash: {
                          algo: 'sha-1',
                          value: ''
                      }
                  }
              };
  
              self.send('session-initiate', offer.jingle);
          });
      }
docs: ---------------------------------------------------------------- Session control methods ----------------------------------------------------------------