Curated list of episodes, bundled to help you on your learning path!
Videos of tech, infrastructure, hardware and software which non-instructional by nature.
Articles around software and tutorials.
Show your love and support while looking fancy.
Got a question or want to chat about a topic? Let's talk!
apt-get update && apt-get install -y coturn && apt-get clean
# vi /etc/environment
sudo vi /etc/default/coturn
turnadmin -k -u USERNAME -r YOURDOMAINNAME -p PASSWORD
sudo vi /etc/turnserver.conf
sudo service coturn restart
Uncaught (in promise) DOMException: Failed to execute 'createAnswer' on
'RTCPeerConnection': PeerConnection cannot create an answer in a state other than
have-remote-offer or have-local-pranswer.
Uncaught (in promise) DOMException: Failed to execute 'setRemoteDescription' on
'RTCPeerConnection': Failed to set remote answer sdp: Called in wrong state: kStable
<video data-video-chat-target="local_video" playsinline autoplay></video>
Edit the environment file to set some environment variables. Be sure to change as necessary.
Run source to set the variables
Edit the coturn file
And change the value to 1
Generate an encrypted password. Be sure to use the same TURN_REALM name as set in the /etc/environment
Edit the turnserver configuration file
Add the user into the configuration file. The encrypted password would be something like 0x0000000
Any help appreciated...
Then I found Safari has had a bug (which Apple probably calls a "feature" -- lovely -- https://bugs.webkit.org/show_bug.cgi?id=176843) since iOS 11, which requires playsinline to be true on video elements. Which has nothing to do with user permissions, but rather fullscreen video... weird. The following worked for me:
In video_chat_controller.js, around line 158, after const element = document.createElement("video"), add:
Then, in show.html.erb, add playsinline as an attribute on the video tag.
Also, data-video="chat-target.local_video" type of attributes have now been deprecated in Stimulus. The Stimulus error is helpful: just change them to data-video-chat-target="local_video". The full code for that tag would then be:
I could run this app with rails 7 and few modifications in import in video_chat_controoler.js locally without valid TURN server creds. Thought this was only in local.
Then I deployed the app on Render at https://drkiq.onrender.com/rooms and here also it works without valid TURN serve credential?
Hows that possible just with Redis/ActionCable/Stimulus?
Whats the exact role of TURN server here since its running without it?