cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
574
Views
0
Helpful
3
Replies

When to pass id string or object to 'addPreviewWindow'?

Hi,

I'm confused as to when should you pass a string or object into 'addPreviewWindow'. 

The API documentation has these examples.

$('#phone').cwic('addPreviewWindow',{previewWindow: 'previewVideoObjectID'});

$('#phone').cwic('addPreviewWindow',{previewWindow: previewVideoObject, window: iFramePinPWindow});

Thanks!

3 Replies 3

dstaudt
Cisco Employee
Cisco Employee

addPreviewWindow takes a 'videoWindow' object (previously created via createVideoWindow), and maps it to the functionality of displaying a user video-preview.  The function can accept either the DOM ID (as a string) of the existing videoWindow object, or a direct object reference (e.g. a variable name pointing to an object of type videoWindow).

Whether the string or object reference is used depends on how your code used createVideoWindow and whether your code kept a reference to the videoWindow object by string DOM ID, or via a variable pointing directly to the videoWindow object.

When I do createVideoWindow, it does not immediately call the success function.

When does that getting called?

Hmm...looking at the documentation, it looks like that can happen if your setup can't do video:

NOTE: This function will just 'do nothing' and the success() callback will never be called if either of the following are true:

Can describe what does happen (does the success come at some later point in time or after some later function?)  Anything interesting in the browser console log?

If the above doesn't help, I would suggest opening a DevNet Developer Support ticket and attaching the Jabber SDK plugin log output (see https://developer.cisco.com/site/jabber-websdk/develop-and-test/voice-and-video/troubleshooting/)

Open a support ticket: https://developer.cisco.com/site/devnet/support/