onStreamCreate -- getName()

Hello:

I’d like to take a specific action on my server when a stream is created; as such, I’ve hooked into onStreamCreate(…), but when I try to getName(), it’s empty. I’ve seen another post, IMediaStream stream.getName is empty. How come?, but I’m a little confused as to the answer.

What can I hook into that will allow me to find the stream name?

Thanks.

You should probably use onPublish instead of onStreamCreate. You don’t have the stream name yet in onStreamCreate (too early in the workflow).

You’re welcome, glad I could help. Good luck with your project!

Thank you, SiggDev! It works, and your answer is most appreciated!