jmontoya cf9703b2a5 add static assets | 8 жил өмнө | |
---|---|---|
.. | ||
fakekeys | 8 жил өмнө | |
scripts | 8 жил өмнө | |
.bower.json | 8 жил өмнө | |
.gitignore | 8 жил өмнө | |
.jshintignore | 8 жил өмнө | |
.jshintrc | 8 жил өмнө | |
CONTRIBUTING.md | 8 жил өмнө | |
LICENSE | 8 жил өмнө | |
README.md | 8 жил өмнө | |
SECURITY.md | 8 жил өмнө | |
build.js | 8 жил өмнө | |
index.html | 8 жил өмнө | |
latest.js | 8 жил өмнө | |
package.json | 8 жил өмнө | |
server.js | 8 жил өмнө | |
simplewebrtc.bundle.js | 8 жил өмнө | |
simplewebrtc.js | 8 жил өмнө | |
socketioconnection.js | 8 жил өмнө |
Want to see it in action? Check out the demo: https://talky.io/
<!DOCTYPE html>
<html>
<head>
<script src="http://simplewebrtc.com/latest.js"></script>
<style>
#remoteVideos video {
height: 150px;
}
#localVideo {
height: 150px;
}
</style>
</head>
<body>
<video id="localVideo"></video>
<div id="remoteVideos"></div>
</body>
</html>
var webrtc = new SimpleWebRTC({
// the id/element dom element that will hold "our" video
localVideoEl: 'localVideo',
// the id/element dom element that will hold remote videos
remoteVideosEl: 'remoteVideos',
// immediately ask for camera access
autoRequestMedia: true
});
// we have to wait until it's ready
webrtc.on('readyToCall', function () {
// you can name it anything
webrtc.joinRoom('your awesome room name');
});
peerConnectionConfig
- Set this to specify your own STUN and TURN servers. By default, SimpleWebRTC uses Google's public STUN server (stun.l.google.com:19302
), which is intended for public use according to: https://twitter.com/HenrikJoreteg/status/354105684591251456
Note that you will most likely also need to run your own TURN servers. See http://www.html5rocks.com/en/tutorials/webrtc/infrastructure/ for a basic tutorial.
Sometimes you need to do more advanced stuff. See http://simplewebrtc.com/notsosimple.html for some examples.
Join the SimpleWebRTC discussion list:
http://lists.andyet.com/mailman/listinfo/simplewebrtc
or the Gitter channel:
https://gitter.im/HenrikJoreteg/SimpleWebRTC