I'm not aware of a frontend SDK for transcoding to a RTMP injestion source. For this use case, you'd need to send getUserMedia tracks to a middle-man transcoding server running ffmpeg, and relaying the rtmp output to your input endpoint. You would use a websocket (socket.io) to send chunks from your client to the server for it to receive, transcode, and relay out. Did this in the past and takes some time to build into your application but does work. Latency won't be great. Probably dealing with 5 - 10 second delay based on your transcoding server power / configurations.
You may instead want to look at sending broadcast tracks from the client over webRTC using WHIP client, and send this to Cloudflare Stream. Their service will accept this webRTC source and possibly transcode it in RTMPS relay to use in the output section, so in a way, Cloudflare would be your transcoder. You need to double check if you can mix WHIP (webRTC) input and have RTMPS output work. I may have read somewhere in the CF docs that mixing two types of technology may not yet be supported in the Beta mode.