docs: function DataChannel (dataChannel) {
      var api = {};
  
      /// Private Data
  
      var bufferedMessages = [];
  
  
      /// Private API
  
      var bufferMessage = function bufferMessage (data) {
            bufferedMessages.push(data);
            return api;
          },
  
          sendMessage = function sendMessage (data) {
            dataChannel.send(data);
            return api;
          },
  
          flushBufferedMessages = function flushBufferedMessages () {
            var data;
  
            while ( (data = bufferedMessages.shift()) ) {
              api.send(data);
            }
          },
  
          onOpen = function onOpen () {
            api.send = sendMessage;
            flushBufferedMessages();
          },
  
          onClose = function onClose (event) {
            api.send = bufferMessage;
            api.trigger('close', event);
          },
  
          onError = function onError (event) {
            OT.error('Data Channel Error:', event);
          },
  
          onMessage = function onMessage (domEvent) {
            var event = new DataChannelMessageEvent(domEvent);
            api.trigger('message', event);
          };
  
  
      /// Public API
  
      OT.$.eventing(api, true);
  
      api.label = dataChannel.label;
      api.id = dataChannel.id;
      // api.maxRetransmitTime = dataChannel.maxRetransmitTime;
      // api.maxRetransmits = dataChannel.maxRetransmits;
      api.reliable = dataChannel.reliable;
      api.negotiated = dataChannel.negotiated;
      api.ordered = dataChannel.ordered;
      api.protocol = dataChannel.protocol;
      api._channel = dataChannel;
      api.close = function () {
        dataChannel.close();
      };
  
      api.equals = function (label, options) {
        if (api.label !== label) return false;
  
        for (var key in options) {
          if (options.hasOwnProperty(key)) {
            if (api[key] !== options[key]) {
              return false;
            }
          }
        }
  
        return true;
      };
  
      // Send initially just buffers all messages until
      // the channel is open.
      api.send = bufferMessage;
  
  
      /// Init
      dataChannel.addEventListener('open', onOpen, false);
      dataChannel.addEventListener('close', onClose, false);
      dataChannel.addEventListener('error', onError, false);
      dataChannel.addEventListener('message', onMessage, false);
  
      return api;
    }