diff --git a/package.json b/package.json index 2c1c097..c027173 100644 --- a/package.json +++ b/package.json @@ -35,7 +35,6 @@ "@types/mocha": "^9.0.0", "@types/node": "^16.0.1", "@types/sdp-transform": "^2.4.5", - "@types/uuid": "^8.3.4", "@typescript-eslint/eslint-plugin": "^4.28.2", "@typescript-eslint/parser": "^4.28.2", "chai": "^4.3.4", @@ -112,7 +111,6 @@ "events": "^3.3.0", "js-logger": "^1.6.1", "typed-emitter": "^2.1.0", - "uuid": "^8.3.2", "webrtc-adapter": "^8.1.2" }, "lint-staged": { diff --git a/src/media/stream.ts b/src/media/stream.ts index 41941ee..826870c 100644 --- a/src/media/stream.ts +++ b/src/media/stream.ts @@ -1,5 +1,4 @@ import { AddEvents, TypedEvent, WithEventsDummyType } from '@webex/ts-events'; -import { v4 as uuid } from 'uuid'; export enum StreamEventNames { MuteStateChange = 'mute-state-change', @@ -15,8 +14,6 @@ interface StreamEvents { * Base stream class. */ abstract class _Stream { - readonly id = uuid(); - // The output stream should never be reassigned, since it is the stream that is being given out. readonly outputStream: MediaStream; @@ -82,6 +79,15 @@ abstract class _Stream { track.removeEventListener('ended', this.handleTrackEnded); } + /** + * Get the ID of the output stream. + * + * @returns The ID of the output stream. + */ + get id(): string { + return this.outputStream.id; + } + /** * Check whether or not this stream is muted. * diff --git a/yarn.lock b/yarn.lock index dd9a16f..9f2a6c9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2533,11 +2533,6 @@ resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" integrity sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw== -"@types/uuid@^8.3.4": - version "8.3.4" - resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.4.tgz#bd86a43617df0594787d38b735f55c805becf1bc" - integrity sha512-c/I8ZRb51j+pYGAu5CrFMRxqZ2ke4y2grEBO5AUjgSkSk+qT2Ea+OdWElz/OiMf5MNpn2b17kuVBwZLQJXzihw== - "@types/which@^1.3.2": version "1.3.2" resolved "https://registry.yarnpkg.com/@types/which/-/which-1.3.2.tgz#9c246fc0c93ded311c8512df2891fb41f6227fdf" @@ -11238,7 +11233,7 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== -uuid@^8.0.0, uuid@^8.3.2: +uuid@^8.0.0: version "8.3.2" resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==