@signalwire/js
Advanced tools
Comparing version 1.3.0-alpha.11 to 1.3.0-alpha.12
@@ -21,2 +21,3 @@ import BaseSession from './BaseSession'; | ||
incognito: boolean; | ||
conferenceListBootstrap?: () => void; | ||
private _iceServers; | ||
@@ -88,4 +89,4 @@ private _localElement; | ||
protected _onSocketCloseOrError(event: any): void; | ||
watchVertoConferenceList: (params: IVertoConferenceListParams) => Promise<IConferenceInfo[]>; | ||
watchVertoConferenceList: () => Promise<void>; | ||
unwatchVertoConferenceList: () => Promise<void>; | ||
} |
@@ -35,2 +35,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import infoChannelHandler from './webrtc/InfoChannelHandler'; | ||
import ConferenceListChannelHandler, { publicConferenceListMethods } from './webrtc/ConferenceListChannelHandler'; | ||
import Conference from './webrtc/Conference'; | ||
@@ -125,8 +126,4 @@ export default class BrowserSession extends BaseSession { | ||
}; | ||
this.watchVertoConferenceList = (params) => __awaiter(this, void 0, void 0, function* () { | ||
this.watchVertoConferenceList = () => __awaiter(this, void 0, void 0, function* () { | ||
this.conferences = {}; | ||
const currentConfList = yield this.vertoConferenceList(params); | ||
currentConfList.forEach(row => { | ||
this.conferences[row.uuid] = new Conference(this, row); | ||
}); | ||
const listChannel = 'conference-list'; | ||
@@ -142,21 +139,18 @@ const channels = [listChannel]; | ||
if (all.includes(listChannel)) { | ||
const conferenceListHandler = ({ data }) => { | ||
switch (data.action) { | ||
case 'add': | ||
console.debug('conferenceList ADD', data.data); | ||
break; | ||
case 'modify': | ||
console.debug('conferenceList MODIFY', data.data); | ||
break; | ||
case 'del': | ||
console.debug('conferenceList DEL', data.data); | ||
break; | ||
default: | ||
console.debug('conferenceList ?', data.action, data); | ||
break; | ||
} | ||
this._addSubscription(this.relayProtocol, ConferenceListChannelHandler.bind(this, this), listChannel); | ||
const listObject = { | ||
session: this, | ||
nodeId: this.nodeid, | ||
channel: listChannel, | ||
name: listChannel, | ||
}; | ||
this._addSubscription(this.relayProtocol, conferenceListHandler, listChannel); | ||
Object.keys(publicConferenceListMethods).forEach(method => { | ||
Object.defineProperty(this, method, { | ||
configurable: true, | ||
writable: true, | ||
value: publicConferenceListMethods[method].bind(listObject) | ||
}); | ||
}); | ||
this.conferenceListBootstrap(); | ||
} | ||
return currentConfList; | ||
}); | ||
@@ -163,0 +157,0 @@ this.unwatchVertoConferenceList = () => __awaiter(this, void 0, void 0, function* () { |
import { ConferenceAction } from './constants'; | ||
export default function chatChannelHandler(session, { eventChannel, eventSerno, data }) { | ||
console.log('chatChannelHandler', eventChannel, data); | ||
const callIds = session.channelToCallIds.get(eventChannel) || []; | ||
@@ -5,0 +4,0 @@ const { direction, from: participantNumber, fromDisplay: participantName, message: messageText, type: messageType } = data; |
@@ -13,3 +13,3 @@ import BrowserSession from '../BrowserSession'; | ||
isPrivate: boolean; | ||
constructor(session: BrowserSession, params: IConferenceInfo); | ||
constructor(session: BrowserSession, params: Partial<IConferenceInfo>); | ||
} |
@@ -43,3 +43,6 @@ import { CallOptions } from './interfaces'; | ||
DeviceUpdated = "deviceUpdated", | ||
MediaParams = "mediaParams" | ||
MediaParams = "mediaParams", | ||
ConferenceListAdd = "conferenceListAdd", | ||
ConferenceListModify = "conferenceListModify", | ||
ConferenceListDelete = "conferenceListDelete" | ||
} | ||
@@ -46,0 +49,0 @@ export declare const DEFAULT_CALL_OPTIONS: CallOptions; |
@@ -47,2 +47,5 @@ export var PeerType; | ||
Notification["MediaParams"] = "mediaParams"; | ||
Notification["ConferenceListAdd"] = "conferenceListAdd"; | ||
Notification["ConferenceListModify"] = "conferenceListModify"; | ||
Notification["ConferenceListDelete"] = "conferenceListDelete"; | ||
})(Notification || (Notification = {})); | ||
@@ -49,0 +52,0 @@ export const DEFAULT_CALL_OPTIONS = { |
import Relay from './src/SignalWire'; | ||
import Verto from './src/Verto'; | ||
import CantinaAuth from '../common/src/webrtc/CantinaAuth'; | ||
export declare const VERSION = "1.3.0-alpha.11"; | ||
export declare const VERSION = "1.3.0-alpha.12"; | ||
export { Relay, Verto, CantinaAuth }; | ||
@@ -6,0 +6,0 @@ export * from '../common/src/webrtc/deviceHelpers'; |
@@ -5,5 +5,5 @@ import Relay from './src/SignalWire'; | ||
import CantinaAuth from '../common/src/webrtc/CantinaAuth'; | ||
export const VERSION = '1.3.0-alpha.11'; | ||
export const VERSION = '1.3.0-alpha.12'; | ||
setAgentName(`JavaScript SDK/${VERSION}`); | ||
export { Relay, Verto, CantinaAuth }; | ||
export * from '../common/src/webrtc/deviceHelpers'; |
{ | ||
"name": "@signalwire/js", | ||
"version": "1.3.0-alpha.11", | ||
"version": "1.3.0-alpha.12", | ||
"description": "Relay SDK for JavaScript to connect to SignalWire.", | ||
@@ -5,0 +5,0 @@ "author": "SignalWire Team <open.source@signalwire.com>", |
Sorry, the diff of this file is too big to display
400757
88
5891