         # remove fingerprint, we add our own above
         remove_line()
 
+      else if m = line.match(/a=group:BUNDLE .*/)
+        # this is disabled for now because of datachannels
+        # TODO: figure out how to handle this correctly ...
+        remove_line()
+
       i++
 
     for id, stream of @streams
       stream.nice.setRemoteCredentials(stream.ufrag ? global.ufrag, stream.pwd ? global.pwd)
       stream.nice.gatherCandidates()
 
-      stream.dtls_srtp.setRtpPayloads(rtp_types)
+      stream.transport.setRtpPayloads?(rtp_types)
 
     answer = lines.join('\r\n')
 

    console.log 'closing echo'
    for _, stream of @streams
      stream.nice.close()
      stream.dtls_srtp.close()


        lines.splice i, 0, data
        i++

      if stream.needs_ice_cred and line.match(/a=.*/) and not line.match(/a=crypto.*/)
        credentials = stream.nice.getLocalCredentials()
        insert_line 'a=ice-ufrag:' + credentials.ufrag
        insert_line 'a=ice-pwd:' + credentials.pwd
        insert_line 'a=fingerprint:' + stream.transport.fingerprint()
        delete stream.needs_ice_cred

      if m = line.match(/m=(\w+) \S+ (\S+) (.*)/)
        # m-lines describe a media stream, create nice connections for them


        [_, id, profile, types] = m

        index = mline

        mline++

        nice_stream = nice.createStream(2)

        stream = {
          id: id
          index: index
          nice: nice_stream
          needs_ice_cred: true
        }

