Browse Source

fix(SignalingLayer) sync interface with implementation

dev1
Saúl Ibarra Corretgé 2 years ago
parent
commit
bc3aae02d9

+ 4
- 17
modules/xmpp/SignalingLayerImpl.js View File

@@ -372,10 +372,7 @@ export default class SignalingLayerImpl extends SignalingLayer {
372 372
     }
373 373
 
374 374
     /**
375
-     * Set an SSRC owner.
376
-     * @param {number} ssrc an SSRC to be owned
377
-     * @param {string} endpointId owner's ID (MUC nickname)
378
-     * @throws TypeError if <tt>ssrc</tt> is not a number
375
+     * @inheritDoc
379 376
      */
380 377
     setSSRCOwner(ssrc, endpointId) {
381 378
         if (typeof ssrc !== 'number') {
@@ -393,11 +390,7 @@ export default class SignalingLayerImpl extends SignalingLayer {
393 390
     }
394 391
 
395 392
     /**
396
-     * Adjusts muted status of given track.
397
-     *
398
-     * @param {SourceName} sourceName - the name of the track's source.
399
-     * @param {boolean} muted - the new muted status.
400
-     * @returns {boolean}
393
+     * @inheritDoc
401 394
      */
402 395
     setTrackMuteStatus(sourceName, muted) {
403 396
         if (!this._localSourceState[sourceName]) {
@@ -417,10 +410,7 @@ export default class SignalingLayerImpl extends SignalingLayer {
417 410
     }
418 411
 
419 412
     /**
420
-     * Sets track's video type.
421
-     * @param {SourceName} sourceName - the track's source name.
422
-     * @param {VideoType} videoType - the new video type.
423
-     * @returns {boolean}
413
+     * @inheritDoc
424 414
      */
425 415
     setTrackVideoType(sourceName, videoType) {
426 416
         if (!this._localSourceState[sourceName]) {
@@ -448,10 +438,7 @@ export default class SignalingLayerImpl extends SignalingLayer {
448 438
     }
449 439
 
450 440
     /**
451
-     * Saves the source name for a track identified by it's ssrc.
452
-     * @param {number} ssrc the ssrc of the target track.
453
-     * @param {SourceName} sourceName the track's source name to save.
454
-     * @throws TypeError if <tt>ssrc</tt> is not a number
441
+     * @inheritDoc
455 442
      */
456 443
     setTrackSourceName(ssrc, sourceName) {
457 444
         if (typeof ssrc !== 'number') {

+ 38
- 0
service/RTC/SignalingLayer.js View File

@@ -116,4 +116,42 @@ export default class SignalingLayer extends Listenable {
116 116
     getTrackSourceName(ssrc) { // eslint-disable-line no-unused-vars
117 117
         throw new Error('not implemented');
118 118
     }
119
+
120
+    /**
121
+     * Set an SSRC owner.
122
+     * @param {number} ssrc an SSRC to be owned
123
+     * @param {string} endpointId owner's ID (MUC nickname)
124
+     * @throws TypeError if <tt>ssrc</tt> is not a number
125
+     */
126
+    setSSRCOwner(ssrc, endpointId) { // eslint-disable-line no-unused-vars
127
+    }
128
+
129
+
130
+    /**
131
+     * Adjusts muted status of given track.
132
+     *
133
+     * @param {SourceName} sourceName - the name of the track's source.
134
+     * @param {boolean} muted - the new muted status.
135
+     * @returns {boolean}
136
+     */
137
+    setTrackMuteStatus(sourceName, muted) { // eslint-disable-line no-unused-vars
138
+    }
139
+
140
+    /**
141
+     * Saves the source name for a track identified by it's ssrc.
142
+     * @param {number} ssrc the ssrc of the target track.
143
+     * @param {SourceName} sourceName the track's source name to save.
144
+     * @throws TypeError if <tt>ssrc</tt> is not a number
145
+     */
146
+    setTrackSourceName(ssrc, sourceName) { // eslint-disable-line no-unused-vars
147
+    }
148
+
149
+    /**
150
+     * Sets track's video type.
151
+     * @param {SourceName} sourceName - the track's source name.
152
+     * @param {VideoType} videoType - the new video type.
153
+     * @returns {boolean}
154
+     */
155
+    setTrackVideoType(sourceName, videoType) { // eslint-disable-line no-unused-vars
156
+    }
119 157
 }

+ 0
- 30
types/auto/modules/xmpp/SignalingLayerImpl.d.ts View File

@@ -81,35 +81,5 @@ export default class SignalingLayerImpl extends SignalingLayer {
81 81
      * @private
82 82
      */
83 83
     private _findEndpointSourceInfoForMediaType;
84
-    /**
85
-     * Set an SSRC owner.
86
-     * @param {number} ssrc an SSRC to be owned
87
-     * @param {string} endpointId owner's ID (MUC nickname)
88
-     * @throws TypeError if <tt>ssrc</tt> is not a number
89
-     */
90
-    setSSRCOwner(ssrc: number, endpointId: string): void;
91
-    /**
92
-     * Adjusts muted status of given track.
93
-     *
94
-     * @param {SourceName} sourceName - the name of the track's source.
95
-     * @param {boolean} muted - the new muted status.
96
-     * @returns {boolean}
97
-     */
98
-    setTrackMuteStatus(sourceName: any, muted: boolean): boolean;
99
-    /**
100
-     * Sets track's video type.
101
-     * @param {SourceName} sourceName - the track's source name.
102
-     * @param {VideoType} videoType - the new video type.
103
-     * @returns {boolean}
104
-     */
105
-    setTrackVideoType(sourceName: any, videoType: VideoType): boolean;
106
-    /**
107
-     * Saves the source name for a track identified by it's ssrc.
108
-     * @param {number} ssrc the ssrc of the target track.
109
-     * @param {SourceName} sourceName the track's source name to save.
110
-     * @throws TypeError if <tt>ssrc</tt> is not a number
111
-     */
112
-    setTrackSourceName(ssrc: number, sourceName: any): void;
113 84
 }
114 85
 import SignalingLayer from "../../service/RTC/SignalingLayer";
115
-import { VideoType } from "../../service/RTC/VideoType";

+ 29
- 0
types/auto/service/RTC/SignalingLayer.d.ts View File

@@ -76,6 +76,35 @@ export default class SignalingLayer extends Listenable {
76 76
      * @returns {SourceName | undefined} the track's source name.
77 77
      */
78 78
     getTrackSourceName(ssrc: number): SourceName | undefined;
79
+    /**
80
+     * Set an SSRC owner.
81
+     * @param {number} ssrc an SSRC to be owned
82
+     * @param {string} endpointId owner's ID (MUC nickname)
83
+     * @throws TypeError if <tt>ssrc</tt> is not a number
84
+     */
85
+    setSSRCOwner(ssrc: number, endpointId: string): void;
86
+    /**
87
+     * Adjusts muted status of given track.
88
+     *
89
+     * @param {SourceName} sourceName - the name of the track's source.
90
+     * @param {boolean} muted - the new muted status.
91
+     * @returns {boolean}
92
+     */
93
+    setTrackMuteStatus(sourceName: SourceName, muted: boolean): boolean;
94
+    /**
95
+     * Saves the source name for a track identified by it's ssrc.
96
+     * @param {number} ssrc the ssrc of the target track.
97
+     * @param {SourceName} sourceName the track's source name to save.
98
+     * @throws TypeError if <tt>ssrc</tt> is not a number
99
+     */
100
+    setTrackSourceName(ssrc: number, sourceName: SourceName): void;
101
+    /**
102
+     * Sets track's video type.
103
+     * @param {SourceName} sourceName - the track's source name.
104
+     * @param {VideoType} videoType - the new video type.
105
+     * @returns {boolean}
106
+     */
107
+    setTrackVideoType(sourceName: SourceName, videoType: any): boolean;
79 108
 }
80 109
 export type EndpointId = string;
81 110
 export type SourceName = string;

Loading…
Cancel
Save