Hi ,
We’ve been facing a couple of cross-browser issues in production and wanted to understand whether the solution we’ve implemented is the correct long-term approach or if there’s a better recommendation.
Issues Observed
1. Cross-browser video visibility issues
-
Firefox users cannot see video published from Safari (MacBook).
-
Edge users cannot see video from other participants.
-
Chrome users appear to work normally.
2. Firefox video freezes
-
Firefox participants sometimes get stuck on video streams.
-
The room remains connected, but video does not update correctly.
Environment
-
React + LiveKit Components
-
Adaptive Stream enabled
-
Dynacast enabled
-
VP8 codec
-
E2EE optional
After troubleshooting, we suspected the issue might be related to the experimental singlePeerConnection mode.
Solution Implemented
Instead of enabling singlePeerConnection globally, we only enable it for Chrome/Chromium browsers and fall back to the traditional two PeerConnection model for Firefox, Safari, and Edge.
const supportsSinglePeerConnection = React.useMemo(() => {
if (typeof navigator === 'undefined') return false;
const ua = navigator.userAgent;
if (ua.includes('Edg/') || ua.includes('Edge/')) return false;
if (ua.includes('Firefox')) return false;
if (
ua.includes('Safari') &&
!ua.includes('Chrome') &&
!ua.includes('Chromium')
)
return false;
return ua.includes('Chrome') || ua.includes('Chromium');
}, []);
singlePeerConnection: supportsSinglePeerConnection
Result
After making this change:
-
Firefox ↔ Safari video interoperability appears to be working.
-
Edge users can see participant videos again.
-
Firefox video freeze issues have significantly reduced.
Questions
-
Is
singlePeerConnectioncurrently considered fully production-ready across Chrome, Firefox, Safari, and Edge? -
Has anyone experienced similar Firefox/Safari/Edge interoperability issues when enabling
singlePeerConnectionglobally? -
Is browser-based enablement/disablement of
singlePeerConnectiona reasonable production approach, or is there a better way to handle this? -
Are there known limitations with Safari publishing and Firefox subscribing when using a single PeerConnection?
-
Would LiveKit recommend keeping
singlePeerConnectiondisabled entirely for non-Chromium browsers until browser support matures further?
Any guidance or production experience from the community would be greatly appreciated.
Thanks!