Namespace: FlashphonerSFUExtended

FlashphonerSFUExtended

Namespaces

SFU_OPERATIONS

Methods

(static) addCalendarEvent(event) → {Promise.<(void|error)>}

Add event to the calendar
Parameters:
Name Type Description
event FlashphonerSFUExtended.UserCalendarEvent
Source:
Returns:
Type
Promise.<(void|error)>

(static) connect(options) → {Promise.<(void|Error)>}

Connect to server.
Parameters:
Name Type Description
options Object SFU options
Properties
Name Type Attributes Description
url String Server url
username String Username
password String Password
nickname String <optional>
Participant's nickname
Source:
Throws:
Error if no options provided
Type
TypeError
Returns:
Promise which resolves upon connect
Type
Promise.<(void|Error)>

(static) disconnect()

Disconnect sfu from the server
Source:

(static) getUserCalendar() → {Promise.<Array.<FlashphonerSFUExtended.UserCalendar>>}

Fetch available calendar from server
Source:
Returns:
Type
Promise.<Array.<FlashphonerSFUExtended.UserCalendar>>

(static) getUserList() → {Promise.<Array.<FlashphonerSFUExtended.UserListEntry>>}

Fetch available user list from server
Source:
Throws:
error if api isn't connected
Type
Error
Returns:
Type
Promise.<Array.<FlashphonerSFUExtended.UserListEntry>>

(static) on(event, callback) → {FlashphonerSFUExtended}

Add session event callback.
Parameters:
Name Type Description
event String One of FlashphonerSFU.SFU_EVENT events
callback FlashphonerSFUExtended~eventCallback Callback function
Source:
Throws:
  • Error if event is not specified
    Type
    TypeError
  • Error if callback is not a valid function
    Type
    Error
Returns:
SDK instance callback was attached to
Type
FlashphonerSFUExtended

(static) removeCalendarEvent(event) → {Promise.<(void|error)>}

Remove event from the calendar
Parameters:
Name Type Description
event FlashphonerSFUExtended.UserCalendarEvent
Source:
Returns:
Type
Promise.<(void|error)>

(static) room(options) → {FlashphonerSFU.Room}

Create room
Parameters:
Name Type Description
options Object Room options
Properties
Name Type Description
name String Room name
pin String Room's pin
pc Object Peer connection
Source:
Throws:
  • Error if no options provided
    Type
    TypeError
  • error if api isn't connected
    Type
    Error
Returns:
Room
Type
FlashphonerSFU.Room

(static) sendMessage(msg) → {Promise}

Send message
Parameters:
Name Type Description
msg Object Message
Properties
Name Type Description
to String Recipient's id
body String Message body
Source:
Throws:
error if api isn't connected
Type
Error
Returns:
Promise will resolve upon message delivery and reject if delivery was unsuccessful
Type
Promise

(static) sfu.server() → {String}

Get hostname of the server in use
Source:
Returns:
Current server's hostname
Type
String

(static) sfu.user() → {FlashphonerSFUExtended.SFUUser}

Get current user
Source:
Returns:
Returns current logged in user
Type
FlashphonerSFUExtended.SFUUser

Type Definitions

Message

Properties:
Name Type Description
id String message id
from String username of the sender
to String username of the recipient
body String message payload
Source:

SFUUser

Type:
  • Object
Properties:
Name Type Description
username String username
nickname String nickname
Source:

UserCalendar

Type:
  • Object
Properties:
Name Type Description
events UserCalendarEvents object with events
Source:

UserCalendarEvent

Type:
  • Object
Properties:
Name Type Description
id String Unique event id
start Number event start time in unix epoch
end Number event end time in unix epoch
title String Event title
description String Event description
accessCode String meeting access code
usePMI Boolean PMI flag
ownerVideo Boolean
participantVideo Boolean
waitingRoom Boolean
recurring Boolean
Source:

UserCalendarEvents

Type:
  • Object.<String, UserCalendarEvent>
Source:

UserListEntry

Type:
  • Object
Properties:
Name Type Description
id String username
nickname String nickname
state String ONLINE or OFFLINE
Source:

eventCallback(sdk)

FlashphonerSFUExtended event callback.
Parameters:
Name Type Description
sdk FlashphonerSFUExtended instance FlashphonerSFUExtended
Source: