Browse Source

All files updated

pull/26/head
Amir 7 years ago
parent
commit
73131464f0
  1. 6
      js/comm.js
  2. 10
      js/config.js
  3. 7
      nbproject/project.properties
  4. 9
      nbproject/project.xml

6
js/comm.js

@ -473,7 +473,7 @@ function initCall(){ @@ -473,7 +473,7 @@ function initCall(){
//start calling tone
document.getElementById('callerTone').play();
//notify callee that we're calling. Don't call startCall yet
//notify callee that we're calling. Don't call startCall() yet
wsChat.send(JSON.stringify({
action: 'initCall',
msg: callType === 'Video' ? "Video call from remote" : "Audio call from remote",
@ -571,7 +571,7 @@ function startCall(isCaller){ @@ -571,7 +571,7 @@ function startCall(isCaller){
//When remote stream becomes available
myPC.ontrack = function(e){
document.getElementById("peerVid").src = window.URL.createObjectURL(e.streams[0]);
// document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]);
// document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]);
};
@ -637,7 +637,7 @@ function setLocalMedia(streamConstraints, isCaller){ @@ -637,7 +637,7 @@ function setLocalMedia(streamConstraints, isCaller){
streamConstraints
).then(function(myStream){
document.getElementById("myVid").src = window.URL.createObjectURL(myStream);
// document.getElementById("myVid").src = window.HTMLMediaElement.srcObject(myStream);
// document.getElementById("peerVid").src = window.HTMLMediaElement.srcObject(e.streams[0]);
myPC.addStream(myStream);//add my stream to RTCPeerConnection

10
js/config.js

@ -22,11 +22,15 @@ function setAppRoot(devFolderName, prodFolderName){ @@ -22,11 +22,15 @@ function setAppRoot(devFolderName, prodFolderName){
var devFolder = devFolderName ? devFolderName+"/" : "";
var prodFolder = prodFolderName ? prodFolderName+"/" : "";
if((hostname.search("localhost") !== -1) || (hostname.search("192.168.") !== -1) || (hostname.search("127.0.0.") !== -1)){
return window.location.origin+"/"+devFolder;
var appRoot = "";
if(hostname === "localhost" || (hostname.search("192.168.") !== -1) || (hostname.search("127.0.0.") !== -1)){
appRoot = window.location.origin+"/"+devFolder;
}
else{
return window.location.origin+"/"+prodFolder;
appRoot = window.location.origin+"/"+prodFolder;
}
return appRoot;
}

7
nbproject/project.properties

@ -1,7 +0,0 @@ @@ -1,7 +0,0 @@
include.path=${php.global.include.path}
php.version=PHP_70
source.encoding=UTF-8
src.dir=.
tags.asp=false
tags.short=false
web.root=.

9
nbproject/project.xml

@ -1,9 +0,0 @@ @@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://www.netbeans.org/ns/project/1">
<type>org.netbeans.modules.php.project</type>
<configuration>
<data xmlns="http://www.netbeans.org/ns/php-project/1">
<name>webrtc-ratchet-chat-app</name>
</data>
</configuration>
</project>
Loading…
Cancel
Save