|
|
@@ -35,6 +35,7 @@ export default class SdpConsistency {
|
|
35
|
35
|
*/
|
|
36
|
36
|
clearVideoSsrcCache() {
|
|
37
|
37
|
this.cachedPrimarySsrc = null;
|
|
|
38
|
+ this.injectRecvOnly = false;
|
|
38
|
39
|
}
|
|
39
|
40
|
|
|
40
|
41
|
/**
|
|
|
@@ -81,17 +82,18 @@ export default class SdpConsistency {
|
|
81
|
82
|
|
|
82
|
83
|
return sdpStr;
|
|
83
|
84
|
}
|
|
|
85
|
+
|
|
84
|
86
|
if (videoMLine.direction === 'recvonly') {
|
|
85
|
87
|
// If the mline is recvonly, we'll add the primary
|
|
86
|
88
|
// ssrc as a recvonly ssrc
|
|
87
|
|
- if (this.cachedPrimarySsrc) {
|
|
|
89
|
+ if (this.cachedPrimarySsrc && this.injectRecvOnly) {
|
|
88
|
90
|
videoMLine.addSSRCAttribute({
|
|
89
|
91
|
id: this.cachedPrimarySsrc,
|
|
90
|
92
|
attribute: 'cname',
|
|
91
|
93
|
value: `recvonly-${this.cachedPrimarySsrc}`
|
|
92
|
94
|
});
|
|
93
|
95
|
} else {
|
|
94
|
|
- logger.error(
|
|
|
96
|
+ logger.info(
|
|
95
|
97
|
`${this.logPrefix} no SSRC found for the recvonly video`
|
|
96
|
98
|
+ 'stream!');
|
|
97
|
99
|
}
|
|
|
@@ -129,6 +131,8 @@ export default class SdpConsistency {
|
|
129
|
131
|
`${this.logPrefix} sdp-consistency caching primary ssrc`
|
|
130
|
132
|
+ `${this.cachedPrimarySsrc}`);
|
|
131
|
133
|
}
|
|
|
134
|
+
|
|
|
135
|
+ this.injectRecvOnly = true;
|
|
132
|
136
|
}
|
|
133
|
137
|
|
|
134
|
138
|
return sdpTransformer.toRawSDP();
|