WebRTC namespace for jsxc.
- Source:
Members
-
<static> AUTO_ACCEPT
-
should we auto accept incoming calls?
- Source:
-
<static> chatJids
-
bare jid to current jid mapping
- Source:
-
<static> conn
-
strophe connection
- Source:
-
<static> last_caller
-
jid of the last caller
- Source:
-
<static> localStream
-
local video stream
- Source:
-
<static> remoteStream
-
remote video stream
- Source:
-
<static> reqFileFeatures
-
required disco features for file transfer
- Source:
-
<static> reqVideoFeatures
-
required disco features for video call
- Source:
Methods
-
<static> attachMediaStream(element, stream)
-
Attach media stream to element.
Parameters:
Name Type Description element
Element | jQuery stream
mediastream - Source:
-
<static> getCapableRes(jid, features) → {Array}
-
Return list of capable resources.
Parameters:
Name Type Description jid
features
string | Array.<string> list of required features - Source:
Returns:
- Type
- Array
-
<static> getTurnCrendentials(url)
-
Checks if cached configuration is valid and if necessary update it.
Parameters:
Name Type Argument Description url
string <optional>
- Source:
-
<static> hangUp()
-
Hang up the current call.
- Source:
-
<private, static> init()
-
Initialize webrtc plugin.
- Source:
-
<private, static> initWindow(event, win)
-
Add "video" button to window menu.
Parameters:
Name Type Description event
win
jQuery window object - Source:
-
<private, static> onCallRinging()
-
Remote station is ringing.
- Source:
-
<private, static> onCallTerminated(event, sid, reason, text)
-
Called if call is terminated.
Parameters:
Name Type Argument Description event
sid
Session id reason
Reason for termination text
<optional>
Optional explanation - Source:
-
<private, static> onCaps(event, jid)
-
Update "video" button if we receive cap information.
Parameters:
Name Type Description event
jid
- Source:
-
<private, static> onIceConnectionStateChanged(event, sid, sess)
-
Extracts local and remote ip and display it to the user.
Parameters:
Name Type Description event
sid
session id sess
- Source:
-
<private, static> onIncomingCall(event, sid)
-
Called on incoming call.
Parameters:
Name Type Description event
sid
Session id - Source:
-
<private, static> onMediaFailure()
-
Called if media failes.
- Source:
-
<private, static> onMediaReady(event, stream)
-
Called if video/audio is ready. Open window and display some messages.
Parameters:
Name Type Description event
stream
- Source:
-
<private, static> onMessage(e, from)
-
Check if full jid changed.
Parameters:
Name Type Description e
from
full jid - Source:
-
<private, static> onPresence(ev, status)
-
Update icon on presence.
Parameters:
Name Type Description ev
status
- Source:
-
<static> onReceivedFile(sess, file, metadata)
-
Display received file.
Parameters:
Name Type Description sess
object file
File metadata
object file metadata - Source:
-
<private, static> onRemoteStreamAdded(event, data, sid)
-
Called if we receive a remote stream.
Parameters:
Name Type Description event
data
sid
Session id - Source:
-
<private, static> onRemoteStreamRemoved(event, data, sid)
-
Called if the remote stream was removed.
Parameters:
Name Type Description event
data
sid
Session id - Source:
-
<static> reqUserMedia()
-
Request video and audio from local user.
- Source:
-
<static> sendFile(jid, file) → {object}
-
Send file to full jid.
Parameters:
Name Type Description jid
string full jid file
file - Source:
Returns:
session- Type
- object
-
<static> setStatus(txt, d)
-
Display status message to user.
Parameters:
Name Type Description txt
message d
duration in ms - Source:
-
<static> snapshot(video)
-
Make a snapshot from a video stream and display it.
Parameters:
Name Type Description video
Video stream - Source:
-
<static> startCall(jid, um)
-
Start a call to the specified jid.
Parameters:
Name Type Description jid
full jid um
requested user media - Source:
-
<static> updateIcon(bid)
-
Enable or disable "video" icon and assign full jid.
Parameters:
Name Type Description bid
CSS conform jid - Source: