Methods
-
getMediaOptions()
-
Get media options (WebRTC and/or Flash) that are supported by the browser.
Returns:
mediaOptions Object that contains properties flash and webrtc.
Type Definitions
-
ChatConfig
-
A type that represents the configuration for wsc.Chat.
Type:
- Object
- Default Value:
- {'acceptTypes' : ['text/plain']}
Properties:
Name Type Description acceptTypes
Array The "accept-types" attribute contains a list of media types that the endpoint is willing to receive. It may contain zero or more registered media-types, or "*".
acceptWrappedTypes
Array The "accept-wrapped-types" attribute contains a list of media types that the endpoint is willing to receive in an MSRP message with multipart content, but may not be used as the outermost type of the message. It may contain zero or more registered media-types, or "*".
selfMaxSize
Number indicates the largest message self wishes to accept. It may take any whole numeric value, specified in octets.
targetMaxSize
Number indicates the largest message target wished to accept. It may take any whole numeric value, specified in octets.
-
ChatMessage
-
A type that represents the chat message that send/receive by wsc.Chat.
Type:
- Object
Properties:
Name Type Description contentType
String The type of the chat message.
content
String The content of the chat message.
-
ConnectionState
-
A type that represents the connection state for Chat or File Transfer.
Type:
- Object
Properties:
Name Type Description fileTransferId
String Optional, the file transfer ID.
state
wsc.ConnectionStateEnum the current state.
description
String Optional. The description for current state.
-
FileConfig
-
A type that represents the configuration of the file that is to be sent or received by the wsc.FileTransfer package.
Type:
- Object
Properties:
Name Type Description file
window.File The file instance.
props
FileProperty The file properties.
-
FileData
-
A type that represents the data received by wsc.FileTransfer.
Type:
- Object
Properties:
Name Type Description fileTransferId
String The file transfer id.
range
Object The range of the data in the total file.
Properties
Name Type Description start
Number The start byte of the data.
end
Number The end byte of the data.
total
Number The total file data byte number.
content
window.Uint8Array The content.
-
FileProgressData
-
A type that represents the current sending file progress.
Type:
- Object
Properties:
Name Type Description fileTransferId
String The file transfer ID.
range
Object The range of the data in the total file.
Properties
Name Type Description start
Number The start byte of the data.
end
Number The end byte of the data.
total
Number The total file data byte number.
-
FileProperty
-
A type that represents the properties of the file that is to be sent or received by the wsc.FileTransfer package.
Type:
- Object
Properties:
Name Type Description name
String The file name.
size
Number The file size in octets.
type
String The MIME type of the file.
hashes
Array Hash computation of the file, it includes a set of hash algorithm and its value that in format : {algorithmName : '', value : ''}.
disposition
String This is a suggestion to a peer point about how to handle the file. There are 2 options: 'render' indicates that a file should be automatically rendered; 'attachment' indicates to the file receiver that the file should not be rendered at the reception of the file. The default value is 'render', that is, the absence of a 'disposition' attribute has the same semantics as 'render'.
description
String The description of the file.
creationTime
String The file creation time.
modificationTime
String The file modification time.
readTime
String The file read time.
icon
String cid-url for icon of the file (for image files in general).
startOffset
String Start offset of file range, refers to the octet position of the file where the file transfer should start. The first octet of a file is denoted by the ordinal number "1".
stopOffset
String Stop offset of file range, refers to the octet position of the file where the file transfer should stop, inclusive of this octet. The "stop offset" value MAY contain a "*" if the total size of the file is not known in advance.
direction
String Direction of the file transfer. There are two options: 'send' to push file, and 'receive' to pull the file.
-
MessagingMessage
-
A type that represents the message that was sent or received by wsc.Messaging.
Type:
- Object
Properties:
Name Type Description msgId
String the message ID, it is generated by SDK.
initiator
String the sender of the message.
target
String the receiver of the message.
content
String the text message content.
-
Query
-
A type that represents the query information that was sent or received by wsc.CapabilityExchange
Type:
- Object
Properties:
Name Type Description ssid
String the subSession ID; it is generated by SDK.
initiator
String the initiator of the capability enquiry.
target
String the capability enquiry target.
initiatorCapability
String the capability description of the enquiry initiator.
targetCapability
String the capability description of the enquiry target.