Browse Source

- Clean some stuff

- Fix the Popup.open
pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
cb3b08ae7e
  1. 2
      app/widgets/Roster/_roster_contact.tpl
  2. 10
      app/widgets/Visio/visio.js
  3. 3
      app/widgets/Visio/webrtc.js
  4. 39
      app/widgets/VisioExt/visioext.js

2
app/widgets/Roster/_roster_contact.tpl

@ -31,7 +31,7 @@
{if="$value.jingle"}
<div
class="infoicon jingle"
onclick="Popup.open('{$value.jid}/{$value.ressource}')">
onclick="Popup.close(); Popup.open('{$value.jid}/{$value.ressource}')">
</div>
{/if}

10
app/widgets/Visio/visio.js

@ -139,9 +139,9 @@ var Visio = {
movim_add_onload(function()
{
maybeRequestTurn();
document.getElementById("call").onclick = function() { init(true); };
document.getElementById("hang-up").onclick = function() { sendTerminate('success'); terminate(); };
document.getElementById("toggle-screen").onclick = function() { Visio.fullScreen(); };
document.getElementById("toggle-camera").onclick = function() { Visio.toggleVideoMute(); };
document.getElementById("toggle-microphone").onclick = function() { Visio.toggleAudioMute(); };
document.getElementById("call")addEventListener('load', function() { init(true); }, false);
document.getElementById("hang-up").addEventListener('load', function() { sendTerminate('success'); terminate(); }, false);
document.getElementById("toggle-screen").addEventListener('load', function() { Visio.fullScreen(); }, false);
document.getElementById("toggle-camera").addEventListener('load', function() { Visio.toggleVideoMute(); }, false);
document.getElementById("toggle-microphone").addEventListener('load', function() { Visio.toggleAudioMute(); }, false);
});

3
app/widgets/Visio/webrtc.js

@ -245,8 +245,6 @@ function init(isCaller) {
return;
}
console.log(pc);
if(getUserMedia) {
if (getUserMedia) {
getUserMedia = getUserMedia.bind(navigator);
@ -296,7 +294,6 @@ function init(isCaller) {
function terminate() {
// We close the RTCPeerConnection
console.log(pc);
if(pc != null && pc.signalingState != 'closed')
pc.close();

39
app/widgets/VisioExt/visioext.js

@ -1,35 +1,3 @@
// Initialise popup pointer
/*var popupWin = null;
function openPopup(jid) {
var url = BASE_URI + PAGE_KEY_URI + "visio&f="+jid
if( !popupWin || popupWin.closed ) {
popupWin = window.open( url, "popupWin", "height=480,width=640,directories=0,titlebar=0,toolbar=0,location=0,status=0, personalbar=0,menubar=0,resizable=0" );
} else popupWin.focus();
}
function closePopup() {
popupWin.close();
}
function focusPopup() {
popupWin.focus();
}
function popUpEvent(args) {
if( popupWin && !popupWin.closed ) {
// The popup is open so call it
var func = args[0];
args.shift();
var params = args;
window['popupWin'][func](params);
} else {
// The popup is closed so open it
openPopup();
}
}*/
var Popup = {
win : null,
jid : null,
@ -51,7 +19,8 @@ var Popup = {
},
close: function() {
this.win.close();
if(this.win)
this.win.close();
},
focus: function() {
@ -79,9 +48,9 @@ var Popup = {
// The popup is closed so open it
console.log('We open the Popup');
this.open(this.jid);
console.log('We wait a little');
setTimeout(function() {Popup.send(args); }, 1000);
this.win.addEventListener('load', function() { Popup.send(args); }, false);
}
}
}
Loading…
Cancel
Save