add support for custom AMF object in streaming clients#1912
add support for custom AMF object in streaming clients#1912pedroSG94 merged 3 commits intopedroSG94:masterfrom
Conversation
|
Hello, Thank you for the PR, but It will need a refactor because the way you did to insert new methods to RtmpClient is not correct.
Let me know if you have any question or even if you prefer let me do this modifications. |
|
Thank you for the review. I’ve updated the PR according to your suggestions, though there may still be issues. If you consider the feature valuable and are willing to make further changes, I’d really appreciate it. Please feel free to modify or close the PR at your discretion.Maybe I should start with an issue🤔 |
|
Hello, Now, the code is close to be fine but I feel that the last commit is not necessary:
|
|
My code suggestion is this: If you are fine with this, let me know it and I can do the merge |
|
LGTM. Thanks for the patient guidance and fixes—feel free to merge. |
|
Merged, thank you for the PR |
Summary
This PR adds an optional custom AMF object that is injected during the RTMP connect handshake. It’s designed for large CDN deployments to run targeted stream connectivity checks and diagnostics against specific IPs/nodes by tagging probe metadata in the handshake. Non-RTMP clients safely ignore this parameter.
Changes
• Add customAmfObject to StreamBase.startStream(...) and propagate to clients.
• RTMP: RtmpClient/CommandsManager merge the custom AMF into the connect object (supports optional tcUrl override).
• AmfObject supports dynamic properties.
• MultiStream updated; RTSP/SRT/UDP are no-ops.
Compatibility
• Backward-compatible: when customAmfObject is null, behavior is unchanged; non-RTMP paths ignore it.