Forums
« Back to Features and enhancements

SDK Jabber Video Call Problem

Combination View Flat View Tree View
Threads [ Previous | Next ]
Hi,Im test the video capabilities example for this page http://developer.cisco.com/web/jabber-developer/add-video-call-capabilities, but don't show the video window, the success method for 'createVideoWindow' never is called.

what's happen? my plataform is windows XP and Internet explorer 8 and try over other such Firefox 18 and Google Chrome Versión 24.0.1312.56 m. and don't work

I downloaded the web plugin for this link http://developer.cisco.com/web/jabber-developer/agreement?doc=/documents/4554576/5d6f9344-9d3a-44f2-9afb-7b7f30604986
----------------------------------------------
$(document.body).ready(function() {
$('#container').cwic('init', {
ready: function() {
alert("registrando video");
$('#remotevideocontainer').cwic('createVideoWindow',{
id: 'videoobject',
success: function(pluginid) {
alert("video habilitado");-------->never is called



//Video object has correctly loaded
}
});

Arianna,
Did you checked the javascript console? I don't see the login/connect been called here. Or, you would like to share more details code here?
Thanks,
Howard

The success callback in createVideoWindows doesn't get called in IE8, because Array objects in IE8 don't have the indexOf() method, and indexOf() is used by cwic.js.  If you add a script tag to include ciscobase.js to your web page, that will solve the problem with indexOf(). ciscobase.js adds the indexOf() method to Array objects if it is not present.  You can find ciscobase.js in the src directory in the CiscoJaberSDK.zip file.

indexOf() is defined on Array object in Firefox, Chrome and IE9, so I'm not sure why it's not working on those browsers.  What does your HTML code look like?  I added the following HTML to your example, and it worked for me.
<div id="container">
    <div id="remotevideocontainer"></div>
</div>
 
 

Hi Ting-Hao Chen

this is my code (I am testing the CiscoJabberSDKDemo_video.html example ) and javascript console (see atach file)
----------------------------
<!DOCTYPE html>
<html>
<head>
<title>Cisco Jabber SDK Demo</title>

<style type="text/css">
body {
font-size: 12px;
}
div#callcontainer {
width:300px;
height:85px;
display:none;
background-color: #F0F8FF;
border:1px solid #aaaaaa;
}

div#callcontainer div.remotename {
float: left;
width: 300px;
height: 30px;
background-color: #D3D3D3;
}

div#callcontainer button.endbtn {
float: right;
}

div#message {
position: absolute;
right: 20px;
top:20px;
font-size: 35px;
color: #0066CC;
}

div#remotevideocontainer {
min-height: 273px;
min-width: 364px;
overflow: hidden;
background-color: #c0c0c0;
resize: both;
padding: 5px;
border: 1px solid #808080;

}
div#remotevideocontainer object {
min-height: 273px;
height: 100%;
width: 100%;
}
</style>

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="cwic.js"></script>

<script type="text/javascript">

$(document.body).ready(function() {
$('#container').cwic('init', {
ready: function() {
$('#remotevideocontainer').cwic('createVideoWindow',{
id: 'videoobject',
success: function(pluginid) {
alert("video ok");<-----never is called
//Video object has correctly loaded
}
});

$(this).cwic('registerPhone', {
user: 'user3',
cucm: '192.168.220.15',
password: '12345',
success: function() {
$('#callbtn').attr('disabled', false);
}
});
}
});

$('#callbtn').click(function() {
var num = $('#numtodial').val();
$('#container').cwic('startConversation', {
participant: { recipient: num },
videoDirection: 'SendRecv',
remoteVideoWindow: 'videoobject'
});
});

$('#container').bind('conversationStart.cwic', function(event, conversation) {
$('#callcontainer .remotename').text(conversation.participant.recipient);
$('#callcontainer').show();
});

$('#callcontainer .endbtn').click(function() {
$('#container').cwic('endConversation');
});

$('#container').bind('conversationEnd.cwic', function(event, conversation) {
$('#callcontainer').hide();
});
});

</script>
</head>

<body>

<label for="numtodial">Number to dial:</label>
<input type="text" id="numtodial">
<button type="button" id="callbtn" disabled="true">Make Call</button>
<div id="container">
<div id="callcontainer">
<div class="remotename"></div>
<button type="button" class="endbtn">End Call</button>
<div id="remotevideocontainer">
</div>
</div>

<div id="message">developer.cisco.com/web/jabber-developer/jabber</div>

</body>

</html>
Attachments:

Hi Shawn,
I included ciscobase.js in the example, the success method from createVideoWindow is called now,
but don´t show third party video. I am testing the calls in two diferent computers with web cam,
is this scenary OK ?
Attachments:

A few small changes will make your app work.  In the createViewoWindow success callback, you need to save a reference to the video object.  The argument that gets passed in to the success callback function is the id of the video object, so you can call document.getElementById() to get a reference to the object:

$('#remotevideocontainer').cwic('createVideoWindow',{
    id: 'videoobject',
    success: function(pluginid) {
        alert("video ok");
        //Video object has correctly loaded
        videoObj = document.getElementById(pluginid);
    }
});

Make sure you declare videoObj somewhere where it will be accessible by the conversationStart event handler, because you will need it there.

In the conversationStart event handler, you need to call updateConversation to add the video window to the call.  This is where you use the reference to the video object that you got in the createVideoWindow success callback.  Pass it to updateConversation as the addRemoteVideoWindow parameter:

$('#container').bind('conversationStart.cwic', function(event, conversation) {
    $('#callcontainer .remotename').text(conversation.participant.recipient);
    $('#callcontainer').show();
    $('#container').cwic('updateConversation', {
        addRemoteVideoWindow: videoObj
    });
});

The call to updateConversation will not work if you don't have a reference to a video object (videoObj in this case).  So you need to ensure that the createVideoWindow success callback gets called before the conversationStart event handler.  If the element containing the video object is not visible, the createViewWindow success callback will not get called until it becomes visible.  In your application the callcontainer div is not visible when the page loads because it has the style "display: none".  The video object is inside the remotevideoobject div, which is inside the callcontainer div, so it is not visible either.  So I added a call to $('#callcontainer').show() after createViedeoWindow, to cause the createViewWindow success callback function to get called.

The complete page source is below:
<!DOCTYPE html>
<html>
<head>
<title>Cisco Jabber SDK Demo</title>

<style type="text/css">
body {
    font-size: 12px;
}
div#callcontainer {
    width:300px;
    height:85px;
    display:none;
    background-color: #F0F8FF;
    border:1px solid #aaaaaa;
}

div#callcontainer div.remotename {
    float: left;
    width: 300px;
    height: 30px;
    background-color: #D3D3D3;
}

div#callcontainer button.endbtn {
    float: right;
}

div#message {
    position: absolute;
    right: 20px;
    top:20px;
    font-size: 35px;
    color: #0066CC;
}

div#remotevideocontainer {
    min-height: 273px;
    min-width: 364px;
    overflow: hidden;
    background-color: #c0c0c0;
    resize: both;
    padding: 5px;
    border: 1px solid #808080;

}
div#remotevideocontainer object {
    min-height: 273px;
    height: 100%;
    width: 100%;
}
</style>

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="cwic.js"></script>

<script type="text/javascript">

$(document.body).ready(function() {

    var videoObj;
    $('#container').cwic('init', {
        ready: function() {
            $('#remotevideocontainer').cwic('createVideoWindow',{
                id: 'videoobject',
                success: function(pluginid) {
                    alert("video ok");
                    //Video object has correctly loaded
                    videoObj = document.getElementById(pluginid);
                }
            });
            $('#callcontainer').show();

            $(this).cwic('registerPhone', {
                user: 'user3',
                cucm: '192.168.220.15',
                password: '12345',
                success: function() {
                    $('#callbtn').attr('disabled', false);
                }
            });

        }
    });


    $('#callbtn').click(function() {
        var num = $('#numtodial').val();
        $('#container').cwic('startConversation', {
            participant: { recipient: num },
            videoDirection: 'SendRecv',
            remoteVideoWindow: 'videoobject'
        });
    });

    $('#container').bind('conversationStart.cwic', function(event, conversation) {
        $('#callcontainer .remotename').text(conversation.participant.recipient);
        $('#callcontainer').show();
        $('#container').cwic('updateConversation', {
            addRemoteVideoWindow: videoObj
        });
    });

    $('#callcontainer .endbtn').click(function() {
        $('#container').cwic('endConversation');
    });

    $('#container').bind('conversationEnd.cwic', function(event, conversation) {
        $('#callcontainer').hide();
    });
});

</script>
</head>

<body>

<label for="numtodial">Number to dial:</label>
<input type="text" id="numtodial">
<button type="button" id="callbtn" disabled="true">Make Call</button>
<div id="container">
<div id="callcontainer">
<div class="remotename"></div>
<button type="button" class="endbtn">End Call</button>
<div id="remotevideocontainer">
</div>
</div>

<div id="message">developer.cisco.com/web/jabber-developer/jabber</div>

</body>

</html>



 

Hello Shawn
I copy the complete code , but I see new javascript problem, and the make call button isn't available.

I test on XP machine,IE 8
Attachments:

You need to include ciscobase.js if you want to run the code I posted in IE8.  It should work in other browsers without ciscobase.js.

Hi Shawn
I am testing the example, but the window video call don´t work. I try on IE 8 and Firefox 18.0.1
My friend heplp me to try, and he use the sample.html from the new sdk jabber for answer my call and neither can see the video.

how can fix it?

this is my complete code
-----------------------

<!DOCTYPE html>
<html>
<head>
<title>Cisco Jabber SDK Demo</title>

<style type="text/css">
body {
font-size: 12px;
}
div#callcontainer {
width:300px;
height:85px;
display:none;
background-color: #F0F8FF;
border:1px solid #aaaaaa;
}

div#callcontainer div.remotename {
float: left;
width: 300px;
height: 30px;
background-color: #D3D3D3;
}

div#callcontainer button.endbtn {
float: right;
}

div#message {
position: absolute;
right: 20px;
top:20px;
font-size: 35px;
color: #0066CC;
}

div#remotevideocontainer {
min-height: 273px;
min-width: 364px;
overflow: hidden;
background-color: #c0c0c0;
resize: both;
padding: 5px;
border: 1px solid #808080;

}
div#remotevideocontainer object {
min-height: 273px;
height: 100%;
width: 100%;
}
</style>

<script src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script src="cwic/cwic.js"></script>
<script src="ciscobase.js"></script>

<script type="text/javascript">

$(document.body).ready(function() {

var videoObj;
$('#container').cwic('init', {
ready: function() {
$('#remotevideocontainer').cwic('createVideoWindow',{
id: 'videoobject',
success: function(pluginid) {
alert("video ok");
//Video object has correctly loaded
videoObj = document.getElementById(pluginid);
}
});
$('#callcontainer').show();

$(this).cwic('registerPhone', {
user: 'user3',
cucm: '192.168.220.15',
password: '12345',
success: function() {
$('#callbtn').attr('disabled', false);
}
});

}
});


$('#callbtn').click(function() {
var num = $('#numtodial').val();
$('#container').cwic('startConversation', {
participant: { recipient: num },
videoDirection: 'SendRecv',
remoteVideoWindow: 'videoobject'
});
});

$('#container').bind('conversationStart.cwic', function(event, conversation) {
$('#callcontainer .remotename').text(conversation.participant.recipient);
$('#callcontainer').show();
$('#container').cwic('updateConversation', {
addRemoteVideoWindow: videoObj
});
});

$('#callcontainer .endbtn').click(function() {
$('#container').cwic('endConversation');
});

$('#container').bind('conversationEnd.cwic', function(event, conversation) {
$('#callcontainer').hide();
});
});

</script>
</head>

<body>

<label for="numtodial">Number to dial:</label>
<input type="text" id="numtodial">
<button type="button" id="callbtn" disabled="true">Make Call</button>
<div id="container">
<div id="callcontainer">
<div class="remotename"></div>
<button type="button" class="endbtn">End Call</button>
<div id="remotevideocontainer">
</div>
</div>

<div id="message">developer.cisco.com/web/jabber-developer/jabber</div>

</body>

</html>
Attachments:

When you make a call, does the audio work?  We need to collect some information so we can diagnose the problem.  Try this:
Open firefox, then open the web console by pressing Ctrl+Shift+K.  Then open your html file and try to make a video call.  After making the call, copy the contents of the web console and send them to jabbersdk-support@cisco.com.  Also there is a log file called softphone.log under c:\Users\<your user name>\AppData\Local.  Include the softphone.log file in the email, and we'll take a look at it.  Please note the time when you started the test, so we'll know where to look in the log file to troubleshoot the problem.