Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How read in preConnect streamKey #587

Open
thedarkknight197 opened this issue May 13, 2023 · 4 comments
Open

How read in preConnect streamKey #587

thedarkknight197 opened this issue May 13, 2023 · 4 comments

Comments

@thedarkknight197
Copy link

Hello how can access to streamKey in
nms.on('preConnect', async (id, args: any) ?

I receive to my server only this data from OBS:

{
  app: 'live',
  type: 'nonprivate',
  supportsGoAway: true,
  flashVer: 'FMLE/3.0 (compatible; FMSc/1.0)',
  swfUrl: 'rtmp://localhost/live',
  tcUrl: 'rtmp://localhost/live'
}

in postPublish I have as url: '/live/streamKey' why i don't have streamKey access in preConnect?

nms.on('postPublish', (id, streamPath, args) => {
    const streamKey = streamPath.split('/').pop();
    createMediaFile(streamKey!);
});
@basemkhirat
Copy link

any updates?

@thedarkknight197
Copy link
Author

No 😔

@basemkhirat
Copy link

When I made custom authentication, client should not able to create the connection.
Library should prevent the connection within creation. making the authentication done on prePublish make the client connected!

@JoshuasStudio-official
Copy link

All I did was I just made the server connect to my postgresql database then read in a array all the keys that are in that database then generate the keys from the client side aka the website and then if the key is not valid it kinda just stalls I am looking around for documentation on how to have obs or any streaming platform have custom errors besides the ones built in.
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants