Skip to content

Commit

Permalink
fix: send the flag value as an array instead of a string
Browse files Browse the repository at this point in the history
  • Loading branch information
psanders committed Sep 27, 2023
1 parent 0d1da54 commit f73a217
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions mods/rtprelay/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,34 @@ export function getRTPEParamsByDirection(dir: Direction) {
return {
ICE: "force",
SDES: "off",
flags: "trust-address replace-origin replace-session-connection"
flags: ["trust-address", "replace-origin", "replace-session-connection"]
}
case Direction.WEB_TO_PHONE:
return {
"transport-protocol": "RTP/AVP",
"rtcp-mux": "demux",
ICE: "remove",
flags: "trust-address replace-origin replace-session-connection"
flags: ["trust-address", "replace-origin", "replace-session-connection"]
}
case Direction.PHONE_TO_WEB:
return {
"transport-protocol": "UDP/TLS/RTP/SAVPF",
"rtcp-mux": "required",
ICE: "force",
SDES: "off",
flags:
"trust-address replace-origin replace-session-connection generate-mid"
flags: [
"trust-address",
"replace-origin",
"replace-session-connection",
"generate-mid"
]
}
case Direction.PHONE_TO_PHONE:
return {
"transport-protocol": "RTP/AVP",
"rtcp-mux": "demux",
ICE: "remove",
flags: "trust-address replace-origin replace-session-connection"
flags: ["trust-address", "replace-origin", "replace-session-connection"]
}
}
}
Expand Down

0 comments on commit f73a217

Please sign in to comment.