WebRTC API Authentication problem

In Progress

Comments

17 comments

  • Avatar
    kevin

    After creating a new account and enabling digest authentication....help me

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Kevin,

    How do you know this is an authentication issue? What is error code and response? 
    We are happy to help but please provide the necessary information and likely your result in detail.

    Thanks.

    0
    Comment actions Permalink
  • Avatar
    kevin

    After logging into the Nx Web Admin homepage, the WebRTC video on my website works fine.

    However, when the login session on the Nx Web Admin homepage expires, the WebRTC video no longer works.

    so  I suspect that digest authentication is not working

    0
    Comment actions Permalink
  • Avatar
    Maria Smith

    Following....

    But I found I get an auth error using webrtc-tracker, but not if I simply use webrtc.

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Maria Smith , kevin

    Thanks for the information, I will do some investigation and check with our developers if required.
    BTW, I have the same result as Maria at the moment, the HTTP webrtc looks no issue, but on the web socket one likely. 

    If you have any urgency, you are suggested to update the system to latest v5.1.4 and use webrtc via HTTP as of now. 

    I will check and get back to you once there are any findings.
    Thanks.

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Maria Smith , kevin

    May I know what exact the error message you saw in your code?
    I was able to pass the authentication though, can you provide the code to us for investigation? 

     

    0
    Comment actions Permalink
  • Avatar
    kevin

    Could you tell me how to simply use WebRTC?

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Kevin,

    Using WebRTC is quite straightforward. You can obtain the stream via HTTP with the appropriate authentication. There’s an existing tutorial with sample code available in the knowledge base that you can refer to here

    Nx offers the WebRTCStreamManager, which makes handling this task easy. Additionally, please note that it is recommended to update your system to the latest version, 5.1.4. We’ve made several improvements and fixes from version 5.1.1 to 5.1.4 and beyond, which will aid in any future troubleshooting.

     

    Thank you.

    0
    Comment actions Permalink
  • Avatar
    Maria Smith

    We are also attempting wss to the Nx server with 5.1.4 with no luck.

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Maria Smith

    Do you mean the WebRTCStreamManager not working for you? or the websocket one?

    0
    Comment actions Permalink
  • Avatar
    Maria Smith

    The WebRTCStremManager seems to make repeated relay redirects before making a connection.  Sometimes it doesn't make a connection.

    0
    Comment actions Permalink
  • Avatar
    Maria Smith

    Ichiro we are also struggling making the wss connection to the Nx server as the original post above.

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Maria Smith

    Have you got the token from proper source? (cloud:nxcdb-xxx , or local:vms-xxxxx)
    Once you have got the tokens , attach them to the header under x-runtime-guid=<token>

    This should be working.

    0
    Comment actions Permalink
  • Avatar
    Maria Smith

    Hi Ichiro,

    Yes, we are getting a token and able to pass it.  We retrieve footage information this way.  But the request from Nx was to submit through the WebRTCStreamManager and for that we provide the token and it is handled within the dll.  Only it seems to go in circles there.

    Alternatively we would prefer to do a web socket direct to Nx Server but are having the same issues as Kevin above.

    0
    Comment actions Permalink
  • Avatar
    Ichiro

    Hi Maria Smith

    Thanks for your feedback and suggestions.

    I am not sure if you have tried to add x-runtime-guid=<token> in your headers while you are using websocket? BTW, x-runtime-guid=<token> would be applied to both HTTP/Websocket.

    So we kindly ask if you can put the auth_token in your websocket header,(you may refer to this post) and let us know if you can successfully work with it?

    Regarding to your issue about WebRTCManger, it may require more detail, if you have any possible reproduced steps, we are happy to investigate. Thanks.

    0
    Comment actions Permalink
  • Avatar
    Cvasoya

    Hello Ichiro

    Thanks for suggestions.
    I already tried to add token in HTTP connection it's not working for us and I am integrating Websocket from Js side so there is no way to add x-runtime-guid=<token> inside the header.

    I've also referred to a post you mentioned, but unfortunately, it hasn't resolved our issue either.

    Do you happen to have any example codebase or proper documentation that could assist us in establishing a direct connection with NX without using WebRTCManger? If so, could you please share it with us?

    0
    Comment actions Permalink

Please sign in to leave a comment.