twilio / twilio-video-app-react

A collaboration application built with the twilio-video.js SDK and React.js
Apache License 2.0
1.8k stars 725 forks source link

Passing Passcode and Room Name via url #756

Open mcacnl opened 1 year ago

mcacnl commented 1 year ago

Is there a way to pass both a passcode and room name via url?

When I follow the instructions here: https://www.twilio.com/blog/set-default-room-name-twilio-video-react-app I get the response "Not found".

Alternatively, if there is a way to automatically populate the room name and manually enter the passcode (room first, name and passcode on next screen) that would also fit my use case.

manjeshbhargav commented 1 year ago

@mcacnl ,

Thanks for writing in. While your local deployment works if you add /room/test to the URL, when you deploy using npm run deploy:twilio-cli, I think the server that is serving the app is different from the local server. So, one way you can achieve what you want is change the app source to accept room name as a URL parameter along with passcode. Does this work for you?

runnermann commented 11 months ago

We are also seeing this issue. Yes, the localhost is a different configuration and allows the /room/test but the deployed configuration does not. Any hints on where to config the App-source for this? So to be sure. Currently this feature ONLY WORKS IN THE LOCAL ENVIRONMENT and NOT in the deployed environment. Reference: (https://www.twilio.com/blog/set-default-room-name-twilio-video-react-app). When deployed, users will either see the /login page, or the roomName with an empty textfield and userName with an empty textfield. Attempting to use '/room/myUniqueRoomName' results in a blank page stating "not found".

We are also using a custom token. Maybe another potential option would be to bypass the preVideo forms and retrieve the required data from the Token. Or pass them in a JsonObject in the body of the request. Has anyone already done this? thanks.