Repository navigation
chore: reorganize data exported by media-signaling lib #39870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
93f1342
chore: refactor media-signaling lib to avoid exporting members that m…
pierre-lehnen-rc 531adfb
LSP crashed again
pierre-lehnen-rc 858e97f
update mocks
pierre-lehnen-rc c32ef7a
LSP... again.
pierre-lehnen-rc b4187ee
changes from code review
pierre-lehnen-rc 6605250
Delay "contactUpdate" event
pierre-lehnen-rc e95ba51
clone state objects
pierre-lehnen-rc 84ab748
changes from code review
pierre-lehnen-rc 51906c9
Merge branch 'develop' into chore/refactor-media-session-state
pierre-lehnen-rc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
packages/media-signaling/src/definition/call/IClientMediaCallParticipant.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import type { IMediaStreamWrapper } from '../media'; | ||
| import type { CallActorType, CallContact, CallRole } from './common'; | ||
|
|
||
| export interface IClientMediaCallParticipant { | ||
| readonly local: boolean; | ||
|
|
||
| readonly participantId: string; | ||
|
|
||
| readonly actorType: CallActorType; | ||
|
|
||
| readonly actorId: string; | ||
|
|
||
| readonly role: CallRole; | ||
|
|
||
| readonly muted: boolean; | ||
|
|
||
| readonly held: boolean; | ||
|
|
||
| readonly contact: CallContact; | ||
|
|
||
| getMediaStream(tag?: string): IMediaStreamWrapper | null; | ||
| } | ||
|
|
||
| export interface IClientMediaCallLocalParticipant extends IClientMediaCallParticipant { | ||
| readonly local: true; | ||
|
|
||
| setMuted(muted: boolean): void; | ||
| setHeld(onHold: boolean): void; | ||
| } | ||
|
|
||
| export interface IClientMediaCallRemoteParticipant extends IClientMediaCallParticipant { | ||
| readonly local: false; | ||
| } | ||
|
|
||
| export type AnyClientMediaCallParticipant = IClientMediaCallLocalParticipant | IClientMediaCallRemoteParticipant; |
4 changes: 4 additions & 0 deletions
4
packages/media-signaling/src/definition/call/callStates/AnyMediaCallData.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| import type { IDirectMediaCallData } from './IDirectMediaCallData'; | ||
| import type { ITempMediaCallData } from './ITempMediaCallData'; | ||
|
|
||
| export type AnyMediaCallData = ITempMediaCallData | IDirectMediaCallData; |
23 changes: 23 additions & 0 deletions
23
packages/media-signaling/src/definition/call/callStates/IDirectMediaCallData.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| import type { CallFeature, CallFlag, CallService, CallState } from '../IClientMediaCall'; | ||
| import type { IClientMediaCallLocalParticipant, IClientMediaCallRemoteParticipant } from '../IClientMediaCallParticipant'; | ||
| import type { CallContact } from '../common'; | ||
|
|
||
| export interface IDirectMediaCallData { | ||
| readonly confirmed: true; | ||
|
|
||
| readonly callId: string; | ||
| readonly service: CallService | null; | ||
| readonly flags: readonly CallFlag[]; | ||
| readonly features: readonly CallFeature[]; | ||
| readonly state: CallState; | ||
| readonly hidden: boolean; | ||
|
|
||
| readonly transferredBy: CallContact | null; | ||
|
|
||
| readonly activeTimestamp?: Date; | ||
|
|
||
| readonly tempCallId: string; | ||
|
|
||
| readonly localParticipant: IClientMediaCallLocalParticipant; | ||
| readonly remoteParticipant: IClientMediaCallRemoteParticipant; | ||
| } |
13 changes: 13 additions & 0 deletions
13
packages/media-signaling/src/definition/call/callStates/ITempMediaCallData.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| import type { CallState } from '../IClientMediaCall'; | ||
| import type { IClientMediaCallLocalParticipant } from '../IClientMediaCallParticipant'; | ||
|
|
||
| export interface ITempMediaCallData { | ||
| readonly confirmed: false; | ||
| readonly tempCallId: string; | ||
|
|
||
| readonly state: CallState; | ||
|
|
||
| readonly title: string; | ||
|
|
||
| readonly localParticipant: IClientMediaCallLocalParticipant; | ||
| } |
3 changes: 3 additions & 0 deletions
3
packages/media-signaling/src/definition/call/callStates/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export type * from './AnyMediaCallData'; | ||
| export type * from './IDirectMediaCallData'; | ||
| export type * from './ITempMediaCallData'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| export type CallActorType = 'user' | 'sip'; | ||
|
|
||
| export type CallContact = { | ||
| type?: CallActorType; | ||
| id?: string; | ||
| contractId?: string; | ||
|
|
||
| displayName?: string; | ||
| username?: string; | ||
| sipExtension?: string; | ||
| }; | ||
|
|
||
| export type CallRole = 'caller' | 'callee'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| export type * from './CallEvents'; | ||
| export type * from './callStates'; | ||
| export type * from './common'; | ||
| export * from './IClientMediaCall'; | ||
| export type * from './IClientMediaCallParticipant'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.