Skip to content
This repository was archived by the owner on Oct 25, 2024. It is now read-only.

Commit 92d77cb

Browse files
authored
Creating QUIC connection after checking QuicTransport. (#450)
1 parent 560a7f3 commit 92d77cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/sdk/conference/client.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export const ConferenceClient = function(config, signalingImpl) {
416416
}
417417
}
418418
}
419-
if (QuicConnection && token.webTransportUrl) {
419+
if (typeof QuicTransport === 'function' && token.webTransportUrl) {
420420
quicTransportChannel = new QuicConnection(
421421
token.webTransportUrl, resp.webTransportToken,
422422
createSignalingForChannel(), config.webTransportConfiguration);
@@ -479,8 +479,11 @@ export const ConferenceClient = function(config, signalingImpl) {
479479
'Invalid source info. A remote stream is either a data stream or ' +
480480
'a media stream.'));
481481
}
482-
return quicTransportChannel.subscribe(stream);
483-
// TODO
482+
if (quicTransportChannel) {
483+
return quicTransportChannel.subscribe(stream);
484+
} else {
485+
return Promise.reject(new TypeError('WebTransport is not supported.'));
486+
}
484487
}
485488
if (!mainChannel) {
486489
mainChannel = createPeerConnectionChannel();

0 commit comments

Comments
 (0)