           else
             sendDataByTCP client.socket, client.videoTCPDataChannel, rtpBuffer
         else
-          videoRTPSocket.send rtpBuffer, 0, rtpBuffer.length, client.clientVideoRTPPort, client.ip, (err, bytes) ->
-            if err
-              console.log "[videoRTPSend] error: #{err.message}"
+          if client.clientVideoRTPPort?
+            videoRTPSocket.send rtpBuffer, 0, rtpBuffer.length, client.clientVideoRTPPort, client.ip, (err, bytes) ->
+              if err
+                console.log "[videoRTPSend] error: #{err.message}"
 
   # last packet
   if ++videoSequenceNumber > 65535

    else
      sendDataByTCP client.socket, client.audioTCPControlChannel, buf
  else
    audioRTCPSocket.send buf, 0, buf.length, client.clientAudioRTCPPort, client.ip, (err, bytes) ->
      if err
        console.error "[audioRTCPSend] error: #{err.message}"

stopSendingRTCP = (client) ->
  if client.timeoutID?

        else
          sendDataByTCP client.socket, client.videoTCPDataChannel, rtpBuffer
      else
        if client.clientVideoRTPPort?
          videoRTPSocket.send rtpBuffer, 0, rtpBuffer.length, client.clientVideoRTPPort, client.ip, (err, bytes) ->
            if err
              console.log "[videoRTPSend] error: #{err.message}"
  return

sendVideoPacketAsSingleNALUnit = (nalUnit, timestamp) ->
