Skip to content

Commit c29ce29

Browse files
authored
feat(TS) migrated modules/sdp/SDP.ts to TS (#2883)
1 parent 75c1c6f commit c29ce29

File tree

9 files changed

+133
-105
lines changed

9 files changed

+133
-105
lines changed

JitsiParticipant.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import JitsiConference from './JitsiConference';
44
import { JitsiConferenceEvents } from './JitsiConferenceEvents';
55
import JitsiRemoteTrack from './modules/RTC/JitsiRemoteTrack';
66
import { MediaType } from './service/RTC/MediaType';
7+
import { SourceName } from './service/RTC/SignalingLayer';
8+
import { VideoType } from './service/RTC/VideoType';
79

810
export interface ISourceInfo {
911
muted: boolean;
@@ -127,11 +129,11 @@ export default class JitsiParticipant {
127129
* Sets source info.
128130
* @param {MediaType} mediaType The media type, 'audio' or 'video'.
129131
* @param {boolean} muted The new muted state.
130-
* @param {string} sourceName The name of the source.
132+
* @param {SourceName} sourceName The name of the source.
131133
* @param {string} videoType The video type of the source.
132134
* @returns {void}
133135
*/
134-
_setSources(mediaType: MediaType, muted: boolean, sourceName: string, videoType: string): void {
136+
_setSources(mediaType: MediaType, muted: boolean, sourceName: SourceName, videoType: VideoType): void {
135137
let sourceByMediaType = this._sources.get(mediaType);
136138
const sourceInfo: ISourceInfo = {
137139
muted,

modules/RTC/TraceablePeerConnection.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,15 @@ interface ITouchToneRequest {
7373
tones: string;
7474
}
7575

76+
export interface ITPCSourceInfo {
77+
groups?: Array<ISsrcGroupInfo>;
78+
mediaType?: MediaType;
79+
msid?: string;
80+
ssrcList?: Array<string>;
81+
ssrcs?: Array<string>;
82+
videoType?: VideoType;
83+
}
84+
7685
export interface ITPCOptions {
7786
audioQuality: IAudioQuality;
7887
capScreenshareBitrate: boolean;
@@ -85,13 +94,6 @@ export interface ITPCOptions {
8594
videoQuality: IVideoQuality;
8695
}
8796

88-
interface ITPCSourceInfo {
89-
groups: ISsrcGroupInfo;
90-
mediaType?: MediaType;
91-
msid: string;
92-
ssrcList?: Array<string>;
93-
videoType?: VideoType;
94-
}
9597
export interface IAudioQuality {
9698
enableOpusDtx?: boolean;
9799
opusMaxAverageBitrate?: number;

modules/qualitycontrol/CodecSelection.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ISourceInfo } from '../../JitsiParticipant';
21
import { CodecMimeType } from '../../service/RTC/CodecMimeType';
32
import { VideoType } from '../../service/RTC/VideoType';
43
import { MockPeerConnection, MockRTC } from '../RTC/MockClasses';
@@ -7,7 +6,7 @@ import JingleSessionPC from '../xmpp/JingleSessionPC';
76
import { MockChatRoom, MockStropheConnection } from '../xmpp/MockClasses';
87

98
import { MockConference, MockLocalTrack, MockParticipant } from './MockClasses';
10-
import { FixedSizeArray, ISourceStats, QualityController } from './QualityController';
9+
import { FixedSizeArray, QualityController } from './QualityController';
1110

1211
describe('Codec Selection', () => {
1312
let qualityController;

0 commit comments

Comments
 (0)