Browse Source

feat(TS) Migrate SampleSdpStrings to TS

master
Naman Jain 3 months ago
parent
commit
d0526517ce
No account linked to committer's email address

+ 1
- 2
modules/sdp/LocalSdpMunger.spec.js View File

1
-
2
 import * as transform from 'sdp-transform';
1
 import * as transform from 'sdp-transform';
3
 
2
 
4
 import { MockPeerConnection } from '../RTC/MockClasses';
3
 import { MockPeerConnection } from '../RTC/MockClasses';
5
 
4
 
6
 import LocalSdpMunger from './LocalSdpMunger';
5
 import LocalSdpMunger from './LocalSdpMunger';
7
-import { default as SampleSdpStrings } from './SampleSdpStrings.js';
6
+import { default as SampleSdpStrings } from './SampleSdpStrings';
8
 
7
 
9
 /**
8
 /**
10
  * Returns the associated ssrc lines for a given media type.
9
  * Returns the associated ssrc lines for a given media type.

+ 1
- 1
modules/sdp/RtxModifier.spec.js View File

3
 
3
 
4
 import RtxModifier from './RtxModifier.js';
4
 import RtxModifier from './RtxModifier.js';
5
 import SDPUtil from './SDPUtil';
5
 import SDPUtil from './SDPUtil';
6
-import { default as SampleSdpStrings } from './SampleSdpStrings.js';
6
+import { default as SampleSdpStrings } from './SampleSdpStrings';
7
 
7
 
8
 /**
8
 /**
9
  * Returns the number of video ssrcs in the given sdp
9
  * Returns the number of video ssrcs in the given sdp

+ 1
- 1
modules/sdp/SDPUtil.spec.js View File

1
 import SDPUtil from './SDPUtil';
1
 import SDPUtil from './SDPUtil';
2
-import { default as SampleSdpStrings } from './SampleSdpStrings.js';
2
+import { default as SampleSdpStrings } from './SampleSdpStrings';
3
 
3
 
4
 describe('SDPUtil', () => {
4
 describe('SDPUtil', () => {
5
     it('should parse an ice ufrag correctly', () => {
5
     it('should parse an ice ufrag correctly', () => {

modules/sdp/SampleSdpStrings.js → modules/sdp/SampleSdpStrings.ts View File

1
-/* eslint-disable max-len*/
1
+/* eslint-disable max-len */
2
 import * as transform from 'sdp-transform';
2
 import * as transform from 'sdp-transform';
3
 
3
 
4
 // A generic sdp session block
4
 // A generic sdp session block
571
 const sdpFirefoxP2pStr = baseSessionSdp + baseAudioMLineSdp + videoLineP2pFF;
571
 const sdpFirefoxP2pStr = baseSessionSdp + baseAudioMLineSdp + videoLineP2pFF;
572
 
572
 
573
 export default {
573
 export default {
574
-    get simulcastSdpStr() {
574
+    get simulcastSdpStr(): string {
575
         return simulcastSdpStr;
575
         return simulcastSdpStr;
576
     },
576
     },
577
 
577
 
578
-    get simulcastDifferentSsrcSdpStr() {
578
+    get simulcastDifferentSsrcSdpStr(): string {
579
         return simulcastDifferentSsrcSdpStr;
579
         return simulcastDifferentSsrcSdpStr;
580
     },
580
     },
581
 
581
 
582
-    get simulcastSdp() {
582
+    get simulcastSdp(): transform.SessionDescription {
583
         return transform.parse(simulcastSdpStr);
583
         return transform.parse(simulcastSdpStr);
584
     },
584
     },
585
 
585
 
586
-    get simulcastNoRtxSdp() {
586
+    get simulcastNoRtxSdp(): transform.SessionDescription {
587
         return transform.parse(simulcastNoRtxSdpStr);
587
         return transform.parse(simulcastNoRtxSdpStr);
588
     },
588
     },
589
 
589
 
590
-    get simulcastRtxSdp() {
590
+    get simulcastRtxSdp(): transform.SessionDescription {
591
         return transform.parse(simulcastRtxSdpStr);
591
         return transform.parse(simulcastRtxSdpStr);
592
     },
592
     },
593
 
593
 
594
-    get simulcastRtxSdpReplacedTrack() {
594
+    get simulcastRtxSdpReplacedTrack(): transform.SessionDescription {
595
         return transform.parse(simulcastRtxSdpTrackReplaced);
595
         return transform.parse(simulcastRtxSdpTrackReplaced);
596
     },
596
     },
597
 
597
 
598
-    get plainVideoSdp() {
598
+    get plainVideoSdp(): transform.SessionDescription {
599
         return transform.parse(plainVideoSdpStr);
599
         return transform.parse(plainVideoSdpStr);
600
     },
600
     },
601
 
601
 
602
-    get rtxVideoSdp() {
602
+    get rtxVideoSdp(): transform.SessionDescription {
603
         return transform.parse(rtxVideoSdpStr);
603
         return transform.parse(rtxVideoSdpStr);
604
     },
604
     },
605
 
605
 
606
-    get multiCodecVideoSdp() {
606
+    get multiCodecVideoSdp(): transform.SessionDescription {
607
         return transform.parse(multiCodecVideoSdpStr);
607
         return transform.parse(multiCodecVideoSdpStr);
608
     },
608
     },
609
 
609
 
610
-    get flexFecSdp() {
610
+    get flexFecSdp(): transform.SessionDescription {
611
         return transform.parse(flexFecSdpStr);
611
         return transform.parse(flexFecSdpStr);
612
     },
612
     },
613
 
613
 
614
-    get recvOnlySdpStr() {
614
+    get recvOnlySdpStr(): string {
615
         return recvOnlySdpStr;
615
         return recvOnlySdpStr;
616
     },
616
     },
617
 
617
 
618
-    get recvOnlySdpStrChrome() {
618
+    get recvOnlySdpStrChrome(): string {
619
         return recvOnlySdpStrChrome;
619
         return recvOnlySdpStrChrome;
620
     },
620
     },
621
 
621
 
622
-    get recvOnlySdp() {
622
+    get recvOnlySdp(): transform.SessionDescription {
623
         return transform.parse(recvOnlySdpStr);
623
         return transform.parse(recvOnlySdpStr);
624
     },
624
     },
625
 
625
 
626
-    get firefoxSdp() {
626
+    get firefoxSdp(): transform.SessionDescription {
627
         return transform.parse(sdpFirefoxStr);
627
         return transform.parse(sdpFirefoxStr);
628
     },
628
     },
629
 
629
 
630
-    get firefoxP2pSdp() {
630
+    get firefoxP2pSdp(): transform.SessionDescription {
631
         return transform.parse(sdpFirefoxP2pStr);
631
         return transform.parse(sdpFirefoxP2pStr);
632
     }
632
     }
633
 
633
 
634
 };
634
 };
635
 
635
 
636
-/* eslint-enable max-len*/
636
+/* eslint-enable max-len */

Loading…
Cancel
Save