ajmaseda PRO said about 3 years ago on Video Chat with WebRTC :
Thank you very much. Here's a working example for anyone wanting to use the twilio api for stun and turn servers: https://github.com/TonyMaseda/rails-react-bootstrap .. I personally use the figaro gem for storing the ENV variables (ACCOUNT_SID and AUTH_TOKEN). You can create those credentials when you sign up with twilio.. then look in the Room model and the stimulus controller to see how to dynamically populate the iceServers array. Note: you'll need to unccomment the redis gem to run Action Cable in production (add Heroku Redis dyno if using Heroku)