diff --git a/src/domain/Phone/WebRTCPhone.ts b/src/domain/Phone/WebRTCPhone.ts index 34e4b753..90cd3fdf 100644 --- a/src/domain/Phone/WebRTCPhone.ts +++ b/src/domain/Phone/WebRTCPhone.ts @@ -8,7 +8,7 @@ import { Inviter, Invitation, Session, SessionDescriptionHandlerOptions } from ' import { SessionDescriptionHandler } from 'sip.js/lib/platform/web'; import CallSession from '../CallSession'; import type { Phone, AvailablePhoneOptions } from './Phone'; -import WazoWebRTCClient from '../../web-rtc-client'; +import WebRTCClient from '../../web-rtc-client'; import Emitter from '../../utils/Emitter'; import IssueReporter from '../../service/IssueReporter'; import { PeerConnection, WazoSession } from '../types'; @@ -60,7 +60,7 @@ export const MESSAGE_TYPE_SIGNAL = 'message/TYPE_SIGNAL'; export const events = [ON_USER_AGENT, ON_REGISTERED, ON_UNREGISTERED, ON_PROGRESS, ON_CALL_ACCEPTED, ON_CALL_ANSWERED, ON_CALL_INCOMING, ON_CALL_OUTGOING, ON_CALL_MUTED, ON_CALL_UNMUTED, ON_CALL_RESUMED, ON_CALL_HELD, ON_CALL_UNHELD, ON_CAMERA_DISABLED, ON_CALL_FAILED, ON_CALL_ENDED, ON_CALL_REJECTED, ON_MESSAGE, ON_REINVITE, ON_TRACK, ON_AUDIO_STREAM, ON_VIDEO_STREAM, ON_REMOVE_STREAM, ON_SHARE_SCREEN_ENDED, ON_TERMINATE_SOUND, ON_PLAY_RING_SOUND, ON_PLAY_INBOUND_CALL_SIGNAL_SOUND, ON_PLAY_HANGUP_SOUND, ON_PLAY_PROGRESS_SOUND, ON_VIDEO_INPUT_CHANGE, ON_SHARE_SCREEN_STARTED, ON_CALL_ERROR, ON_CHAT, ON_SIGNAL, ON_NETWORK_STATS, ON_DISCONNECTED, ON_EARLY_MEDIA]; const logger = IssueReporter.loggerFor('webrtc-phone'); export default class WebRTCPhone extends Emitter implements Phone { - client: WazoWebRTCClient; + client: WebRTCClient; allowVideo: boolean; @@ -94,7 +94,7 @@ export default class WebRTCPhone extends Emitter implements Phone { shouldSendReinvite: boolean; - constructor(client: WazoWebRTCClient, audioOutputDeviceId: string | undefined, allowVideo = false, audioRingDeviceId?: string) { + constructor(client: WebRTCClient, audioOutputDeviceId: string | undefined, allowVideo = false, audioRingDeviceId?: string) { super(); this.client = client; this.allowVideo = allowVideo; diff --git a/src/simple/Phone.ts b/src/simple/Phone.ts index c41b2f92..05f7bcd2 100644 --- a/src/simple/Phone.ts +++ b/src/simple/Phone.ts @@ -6,7 +6,7 @@ import type CallSession from '../domain/CallSession'; import AdHocAPIConference from '../domain/AdHocAPIConference'; import WebRTCPhone, * as PHONE_EVENTS from '../domain/Phone/WebRTCPhone'; import { MESSAGE_TYPE_CHAT, MESSAGE_TYPE_SIGNAL } from '../domain/Phone/WebRTCPhone'; -import WazoWebRTCClient, { events as clientEvents, transportEvents } from '../web-rtc-client'; +import WebRTCClient, { events as clientEvents, transportEvents } from '../web-rtc-client'; import IssueReporter from '../service/IssueReporter'; import Emitter from '../utils/Emitter'; import Wazo from './index'; @@ -19,7 +19,7 @@ const protocolLogger = IssueReporter.loggerFor('sip'); const protocolDebugMessages = ['Received WebSocket text message:', 'Sending WebSocket message:']; export class Phone extends Emitter { - client: WazoWebRTCClient; + client: WebRTCClient; phone: WebRTCPhone | null | undefined; @@ -186,7 +186,7 @@ export class Phone extends Emitter { options.log.connector = this._logConnector; } - this.client = new WazoWebRTCClient({ + this.client = new WebRTCClient({ host, port: typeof port === 'string' ? parseInt(port, 10) : port, displayName,