KallDrexx / rust-media-libs

Rust based libraries for misc media functionality
Apache License 2.0
229 stars 58 forks source link

"onBWDone" in RTMP server session causes some clients to disconnect #41

Closed ghost closed 1 year ago

ghost commented 1 year ago

As part of the initial outbound messages, the RTMP ServerSession sends out an "onBWDone" Amf0Command. I have discovered that the RTMP live streaming application PRISM Live Studio (v3.8.3, Android) disconnects immediately upon receiving this command.

I have collected two Wireshark captures to demonstrate this behavior, first with the offending command included: SS_B And again without the command, displaying normal behavior as expected: SS_A Here 192.168.1.41 is the server and 192.168.1.42 the client.

For my use case it would be great to have the option to not send out this command, although I may have to manually send it out for clients that might wait on "onBWDone" before continuing, should I come across one.

In any case, thank you for your work on such a functional and easy-to-use library for a protocol that is anything but.

KallDrexx commented 1 year ago

That should be a relatively easy change. I probably just assumed this always gets reported back. The only question I have is if this should be a parameter in the new() function or if it should be a value in the config. I'd probably do the latter as that can be done in a non-breaking API change.

If I get some time this weekend I'll do that. Glad people are getting use out of this lib :)

KallDrexx commented 1 year ago

Released 0.8 to crates.io (and source).

ServerSessionConfig has a send_on_bw_done_message_on_start that defaults to true with ServerSessionConfig::new(). Setting this to false will disable that message from creating a new ServerSession.