Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [Unreleased](https://github.com/MyPureCloud/genesys-cloud-webrtc-sdk/compare/v9.0.5...HEAD)
### Added
* [PCM-2081](https://inindca.atlassian.net/browse/PCM-2081) Add ability to join a video conference using a meeting id

# [v9.0.5](https://github.com/MyPureCloud/genesys-cloud-webrtc-sdk/compare/v9.0.4...v9.0.5)
### Added
Expand Down
81 changes: 58 additions & 23 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"browserama": "^3.1.1",
"core-js": "^3.7.0",
"genesys-cloud-client-logger": "^4.2.10",
"genesys-cloud-streaming-client": "^17.0.3",
"genesys-cloud-streaming-client": "^17.1.0",
"jwt-decode": "^3.1.2",
"lodash": "^4.17.15",
"process-fast": "^1.0.0",
Expand All @@ -80,13 +80,14 @@
"@babel/preset-typescript": "^7.12.1",
"@rollup/plugin-commonjs": "^22.0.0-1",
"@rollup/plugin-node-resolve": "^13.0.6",
"@types/dom-webcodecs": "^0.1.11",
"@types/jest": "^26.0.15",
"@types/lodash": "^4.14.165",
"@types/nock": "^11.1.0",
"@types/node": "^15.12.0",
"@types/node": "^20.11.30",
"@types/safe-json-stringify": "^1.1.0",
"@types/uuid": "^3.4.9",
"@types/webrtc": "^0.0.30",
"@types/webrtc": "^0.0.42",
"@types/ws": "^7.2.9",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.29.3",
Expand All @@ -113,7 +114,7 @@
"stupid-server": "^0.2.5",
"ts-jest": "^26.4.4",
"ts-node": "^10.2.1",
"typescript": "^4.0.5",
"typescript": "^5.4.2",
"uglify-js": "^3.11.5",
"vinyl-buffer": "^1.0.1",
"vinyl-source-stream": "^2.0.0",
Expand Down
19 changes: 19 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,25 @@ export class GenesysCloudWebrtcSdk extends (EventEmitter as { new(): StrictEvent
}
}

/**
* Start a video conference using a meeting id. Not supported for guests.
* Conferences can only be joined by authenticated users
* from the same organization.
*
* `initialize()` must be called first.
*
* @param meetingId meetingId of the conference to join.
*
* @returns a promise with an object with the newly created 'conversationId'
*/
async startVideoMeeting (meetingId: string): Promise<{ conversationId: string }> {
if (!this.isGuest) {
return this.sessionManager.startSession({ meetingId, sessionType: SessionTypes.collaborateVideo });
} else {
throw createAndEmitSdkError.call(this, SdkErrorTypes.not_supported, 'video conferencing not supported for guests');
}
}

/**
* Start a softphone session with the given peer or peers.
* `initialize()` must be called first.
Expand Down
8 changes: 6 additions & 2 deletions src/sessions/session-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
ISessionMuteRequest,
IUpdateOutgoingMedia,
IStartVideoSessionParams,
IStartVideoMeetingSessionParams,
IExtendedMediaSession,
IStartSoftphoneSessionParams,
ISessionIdAndConversationId,
Expand Down Expand Up @@ -174,7 +175,7 @@ export class SessionManager {
return handler;
}

async startSession (startSessionParams: IStartSessionParams | IStartVideoSessionParams | IStartSoftphoneSessionParams): Promise<any> {
async startSession (startSessionParams: IStartSessionParams | IStartVideoSessionParams | IStartVideoMeetingSessionParams | IStartSoftphoneSessionParams): Promise<any> {
if (!this.sdk.connected) {
throw createAndEmitSdkError.call(this.sdk, SdkErrorTypes.session, 'A session cannot be started as streaming client is not yet connected', { sessionType: startSessionParams.sessionType });
}
Expand Down Expand Up @@ -305,7 +306,8 @@ export class SessionManager {
originalRoomJid: sessionInfo.originalRoomJid,
fromUserId: sessionInfo.fromUserId,
toJid: sessionInfo.toJid,
fromJid: sessionInfo.fromJid
fromJid: sessionInfo.fromJid,
meetingId: sessionInfo.meetingId
};

this.pendingSessions.push(pendingSession);
Expand Down Expand Up @@ -396,6 +398,8 @@ export class SessionManager {
return;
}

const frame = new VideoFrame('lskdjf' as any)

session._alreadyAccepted = true;

const sessionHandler = this.getSessionHandler({ jingleSession: session });
Expand Down
Loading