Closed charmingtoad closed 1 year ago
Unfortunately, Client side can't detect invalid stream key in this case. And I have no idea.
I hope, disconnected by live-video.net
server or returns NetStream.Publish.Failed
or NetStream.Publish.BadName
.
Got it. I wasn't sure if I might be doing something wrong. Sounds like it just depends on how the server responds. Thanks for looking!
Describe the bug
If a user enters the wrong stream key, I want to let them know that their stream failed to start.
I'm currently listening to stream events with
Usually if a user enters a bad stream key,
rtmpStatusHandler
is immediately called withNetConnection.Connect.Closed
.However, sometimes it takes 30 or more seconds for the error to arrive. During this time I am not sure how to detect that the stream is not working. Is there a way? Thanks in advance.
To Reproduce
This can be reproduced in the Haishinkit iOS sample app.
rtmpStatusHandler
I added a couple logs that would be easy to filter by like so:rtmp://lax.contribute.live-video.net/app/
abc
Result:
You'll see a cycle like this
But eventually it hangs like this
At this point I am not sure how to detect that the stream is failing to start.
Expected behavior
xx code = NetConnection.Connect.Closed
should log pretty quickly after eachxx code = NetStream.Publish.Start
Version
1.1.5
Smartphone info.
iPhone 14 Pro iOS 16.0.1 (20A371)
Additional context
For log output below, I turned on
Logboard.with(HaishinKitIdentifier).level = .trace
and included logs from the time I tapped stream with an invalid stream key. The last logs repeat infinitely. The NetConnection.Connect.Closed event didn't come in.Screenshots
No response
Relevant log output