Bladeren bron

Implement review changes 2

dev1
Mihai-Andrei Uscat 4 jaren geleden
bovenliggende
commit
f2811def85
2 gewijzigde bestanden met toevoegingen van 8 en 3 verwijderingen
  1. 1
    1
      modules/RTC/TraceablePeerConnection.js
  2. 7
    2
      service/RTC/CodecMimeType.js

+ 1
- 1
modules/RTC/TraceablePeerConnection.js Bestand weergeven

2162
 
2162
 
2163
     for (const mLine of mLines) {
2163
     for (const mLine of mLines) {
2164
         if (mLine.type === 'audio') {
2164
         if (mLine.type === 'audio') {
2165
-            const { payload } = mLine.rtp.find(protocol => protocol.codec === 'opus');
2165
+            const { payload } = mLine.rtp.find(protocol => protocol.codec === CodecMimeType.OPUS);
2166
 
2166
 
2167
             if (!payload) {
2167
             if (!payload) {
2168
                 break;
2168
                 break;

+ 7
- 2
service/RTC/CodecMimeType.js Bestand weergeven

1
 /* global module */
1
 /* global module */
2
 /**
2
 /**
3
  * Enumeration of the codec mime types
3
  * Enumeration of the codec mime types
4
- * @type {{H264: string, VP8: string, VP9: string}}
4
+ * @type {{H264: string, OPUS: string, VP8: string, VP9: string}}
5
  */
5
  */
6
 const CodecMimeType = {
6
 const CodecMimeType = {
7
     /**
7
     /**
8
-     * The h264 codec mime type
8
+     * The h264 codec mime type.
9
      */
9
      */
10
     H264: 'h264',
10
     H264: 'h264',
11
 
11
 
12
+    /**
13
+     * The opus codec mime type.
14
+     */
15
+    OPUS: 'opus',
16
+
12
     /**
17
     /**
13
      * The vp8 codec mime type.
18
      * The vp8 codec mime type.
14
      */
19
      */

Laden…
Annuleren
Opslaan