I have a project to combine spring-boot and react. I’m using openvidu-js-java to backend and openvidu-insecure-react to frontend. I tried to get a token from backend then sent it to frontend, frontend had token but it didn’t display the camera but my laptop noticed that it displayed camera. How can I fix it?
In my code. I choose the attribute is “publisher1” and logged
Thank for answers
Spring-boot example you are using hasn’t CORS enabled.
Configure CORS in SpringBoot example following this tutorial:
I have a question: I only sent token for the frontend then does it work? Do I need to add connectionId, id, type,… such as data when I only used insecure-react?
You only need the token, and call to the
connect method of the
Session object: Session | OpenVidu Browser - v2.18.0
I tried to do that but it still doesn’t work, when I check in frontend (unsecure-js) I realize it doesn’t setState at here so it doesn’t display screen
Take a look to react sample. It should work. Just replace token generation from frontend to backend. Let the rest of the code exactly the same.