|
|
@@ -70,12 +70,17 @@ export class CodecSelection {
|
|
70
|
70
|
// Push VP9 to the end of the list so that the client continues to decode VP9 even if its not
|
|
71
|
71
|
// preferable to encode VP9 (because of browser bugs on the encoding side or added complexity on mobile
|
|
72
|
72
|
// devices).
|
|
73
|
|
- if (!browser.supportsVP9()) {
|
|
|
73
|
+ if (!browser.supportsVP9() || this.conference.isE2EEEnabled()) {
|
|
74
|
74
|
const index = selectedOrder.findIndex(codec => codec === CodecMimeType.VP9);
|
|
75
|
75
|
|
|
76
|
76
|
if (index !== -1) {
|
|
77
|
77
|
selectedOrder.splice(index, 1);
|
|
78
|
|
- selectedOrder.push(CodecMimeType.VP9);
|
|
|
78
|
+
|
|
|
79
|
+ // Remove VP9 from the list when E2EE is enabled since it is not supported.
|
|
|
80
|
+ // TODO - remove this check when support for VP9-E2EE is introduced.
|
|
|
81
|
+ if (!this.conference.isE2EEEnabled()) {
|
|
|
82
|
+ selectedOrder.push(CodecMimeType.VP9);
|
|
|
83
|
+ }
|
|
79
|
84
|
}
|
|
80
|
85
|
}
|
|
81
|
86
|
|
|
|
@@ -110,6 +115,20 @@ export class CodecSelection {
|
|
110
|
115
|
.some(supportedCodec => supportedCodec.mimeType.toLowerCase() === `${MediaType.VIDEO}/${codec}`));
|
|
111
|
116
|
}
|
|
112
|
117
|
|
|
|
118
|
+ /**
|
|
|
119
|
+ * Filters VP9 from the list of the preferred video codecs for JVB if E2EE is enabled.
|
|
|
120
|
+ *
|
|
|
121
|
+ * @returns {Array}
|
|
|
122
|
+ */
|
|
|
123
|
+ _maybeFilterJvbCodecs() {
|
|
|
124
|
+ // TODO - remove this check when support for VP9-E2EE is introduced.
|
|
|
125
|
+ if (this.conference.isE2EEEnabled()) {
|
|
|
126
|
+ return this.codecPreferenceOrder.jvb.filter(codec => codec !== CodecMimeType.VP9);
|
|
|
127
|
+ }
|
|
|
128
|
+
|
|
|
129
|
+ return this.codecPreferenceOrder.jvb;
|
|
|
130
|
+ }
|
|
|
131
|
+
|
|
113
|
132
|
/**
|
|
114
|
133
|
* Sets the codec on the media session based on the codec preference order configured in config.js and the supported
|
|
115
|
134
|
* codecs published by the remote participants in their presence.
|
|
|
@@ -124,7 +143,7 @@ export class CodecSelection {
|
|
124
|
143
|
}
|
|
125
|
144
|
const currentCodecOrder = session.peerconnection.getConfiguredVideoCodecs();
|
|
126
|
145
|
const localPreferredCodecOrder = session === this.conference.jvbJingleSession
|
|
127
|
|
- ? this.codecPreferenceOrder.jvb
|
|
|
146
|
+ ? this._maybeFilterJvbCodecs()
|
|
128
|
147
|
: this.codecPreferenceOrder.p2p;
|
|
129
|
148
|
|
|
130
|
149
|
const remoteParticipants = this.conference.getParticipants().map(participant => participant.getId());
|