code: function encodeAMF3Cmd(opt) {
      var data = amf0EncodeOne(opt.cmd);
  
      if (rtmpCmdDecode[opt.cmd]) {
          rtmpCmdDecode[opt.cmd].forEach(function (n) {
              if (opt.hasOwnProperty(n))
                  data = Buffer.concat([data, amf3EncodeOne(opt[n])]);
          });
      } else {
          console.log('Unknown command', opt);
      }
      return data
  }
docs: Encode AMF3 Command
  @param opt
  @returns {*}