code: function createObject(constructor) {
      var mediaObject = new constructor(strict)
  
      mediaObject.on('_describe', describe);
      mediaObject.on('_rpc', encodeRpc);
  
      if (mediaObject instanceof register.abstracts['kurento.Hub'] ||
        mediaObject instanceof register
        .classes['kurento.MediaPipeline'])
        mediaObject.on('_create', encodeCreate);
  
      if (mediaObject instanceof register.classes['kurento.MediaPipeline'])
        mediaObject.on('_transaction', encodeTransaction);
  
      return mediaObject;
    }
docs: @param constructor
  
  @return {module:core/abstracts.MediaObject}