Skip to content

Commit 5a88250

Browse files
authored
Disable publisher offer with join in firefox (#1954)
1 parent 283048f commit 5a88250

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

.changeset/empty-roses-begin.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'livekit-client': patch
3+
---
4+
5+
Disable publisher offer with join in firefox

src/room/RTCEngine.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ import { getTrackPublicationInfo } from './track/utils';
9090
import type { LoggerOptions } from './types';
9191
import {
9292
Future,
93-
isCompressionStreamSupported,
93+
isPublisherOfferWithJoinSupported,
9494
isVideoCodec,
9595
isVideoTrack,
9696
isWeb,
@@ -325,7 +325,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
325325

326326
this.setupSignalClientCallbacks();
327327
let offerProto: SessionDescription | undefined;
328-
if (!useV0Path && isCompressionStreamSupported()) {
328+
if (!useV0Path && isPublisherOfferWithJoinSupported()) {
329329
if (!this.pcManager) {
330330
await this.configure();
331331
this.createDataChannels();
@@ -358,7 +358,7 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
358358
this.participantSid = joinResponse.participant?.sid;
359359

360360
this.subscriberPrimary = joinResponse.subscriberPrimary;
361-
if (!useV0Path && isCompressionStreamSupported()) {
361+
if (!useV0Path && isPublisherOfferWithJoinSupported()) {
362362
this.pcManager?.updateConfiguration(this.makeRTCConfiguration(joinResponse));
363363
} else {
364364
if (!this.pcManager) {

src/room/utils.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,3 +794,8 @@ export function extractMaxAgeFromRequestHeaders(headers: Headers): number | unde
794794
export function isCompressionStreamSupported() {
795795
return typeof CompressionStream !== 'undefined';
796796
}
797+
798+
export function isPublisherOfferWithJoinSupported() {
799+
// we have connectivity issue about publisher offer with join on firefox #1919
800+
return isCompressionStreamSupported() && !isFireFox();
801+
}

0 commit comments

Comments
 (0)