If you are getting status_code : 22 when trying to connect to RTMS Media Server, do note that your content_type needs to be 2 for the audio section.
{"msg_type":4,"payload_encrypted":false,"protocol_version":1,"reason":"Invalid audio codec","status_code":22}
audio: {
content_type: 2,
sample_rate: 1,
channel: 1,
codec: 1,
data_opt: 1,
send_rate: 100
},
video: {
content_type: 3,
codec: 7,
data_opt: 3,
resolution: 2,
fps: 25
},
deskshare: {
content_type: 3,
codec: 5,
resolution: 2,
fps: 1
},
chat: {
content_type: 5
},
transcript: {
content_type: 5
}