Parcourir la source

Implement review changes 2

dev1
Mihai-Andrei Uscat il y a 4 ans
Parent
révision
f2811def85
2 fichiers modifiés avec 8 ajouts et 3 suppressions
  1. 1
    1
      modules/RTC/TraceablePeerConnection.js
  2. 7
    2
      service/RTC/CodecMimeType.js

+ 1
- 1
modules/RTC/TraceablePeerConnection.js Voir le fichier

@@ -2162,7 +2162,7 @@ TraceablePeerConnection.prototype._mungeOpus = function(description) {
2162 2162
 
2163 2163
     for (const mLine of mLines) {
2164 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 2167
             if (!payload) {
2168 2168
                 break;

+ 7
- 2
service/RTC/CodecMimeType.js Voir le fichier

@@ -1,14 +1,19 @@
1 1
 /* global module */
2 2
 /**
3 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 6
 const CodecMimeType = {
7 7
     /**
8
-     * The h264 codec mime type
8
+     * The h264 codec mime type.
9 9
      */
10 10
     H264: 'h264',
11 11
 
12
+    /**
13
+     * The opus codec mime type.
14
+     */
15
+    OPUS: 'opus',
16
+
12 17
     /**
13 18
      * The vp8 codec mime type.
14 19
      */

Chargement…
Annuler
Enregistrer