Skip to content

Commit 418a8b1

Browse files
committed
Enable WebAudio routing on iOS 26 for speaker selection
1 parent 67e9da5 commit 418a8b1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

examples/demo/demo.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ import {
4646
import PTWorker from '../../src/packetTrailer/worker/packetTrailer.worker?worker';
4747
import type { DataTrackFrame } from '../../src/room/data-track/frame';
4848
import { TrackEvent } from '../../src/room/events';
49-
import { isSVCCodec, sleep, supportsH265 } from '../../src/room/utils';
49+
import {
50+
isSafariSpeakerSelectionSupported,
51+
isSVCCodec,
52+
sleep,
53+
supportsH265,
54+
} from '../../src/room/utils';
5055

5156
setLogLevel(LogLevel.debug);
5257

@@ -182,6 +187,9 @@ const appActions = {
182187
audioOutput: {
183188
deviceId: audioOutputId,
184189
},
190+
// Route remote audio through AudioContext on iOS 26 so the shared relay element
191+
// handles setSinkId — without this, iOS silently ignores setSinkId on WebRTC tracks.
192+
webAudioMix: isSafariSpeakerSelectionSupported(),
185193
publishDefaults: {
186194
simulcast,
187195
videoSimulcastLayers: [VideoPresets.h180, VideoPresets.h360],

0 commit comments

Comments
 (0)