Permalink
Browse files

now firefox to firefox works. It looks like there is a conection betw…

…een firefox and chrome to but I have not gotten the media to play back. I dont know why the video is not playing back in the video tag... any one please have a look
  • Loading branch information...
1 parent 8bd941d commit e9b831374d87c7beb5e28d6e4746fc3f3367a21a Dennis Mårtensson committed Mar 17, 2013
Showing with 224 additions and 86 deletions.
  1. +3 −2 site/script.js
  2. +0 −13 site/server.js
  3. +221 −71 site/webrtc.io.js
View
@@ -1,5 +1,5 @@
var videos = [];
-var PeerConnection = window.PeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection;
+var PeerConnection = window.PeerConnection || window.webkitPeerConnection00 || window.webkitRTCPeerConnection || window.mozRTCPeerConnection || window.RTCPeerConnection;
function getNumPerRow() {
var len = videos.length;
@@ -164,10 +164,11 @@ function initChat() {
function init() {
if(PeerConnection) {
rtc.createStream({
- "video": true,
+ "video": {"mandatory": {}, "optional": []},
"audio": true
}, function(stream) {
document.getElementById('you').src = URL.createObjectURL(stream);
+ document.getElementById('you').play();
videos.push(document.getElementById('you'));
//rtc.attachStream(stream, 'you');
subdivideVideos();
View
@@ -27,19 +27,6 @@ app.get('/webrtc.io.js', function(req, res) {
res.sendfile(__dirname + '/webrtc.io.js');
});
-
-webRTC.rtc.on('connect', function(rtc) {
- //Client connected
-});
-
-webRTC.rtc.on('send answer', function(rtc) {
- //answer sent
-});
-
-webRTC.rtc.on('disconnect', function(rtc) {
- //Client disconnect
-});
-
webRTC.rtc.on('chat_msg', function(data, socket) {
var roomList = webRTC.rtc.rooms[data.room] || [];
Oops, something went wrong.

0 comments on commit e9b8313

Please sign in to comment.