File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed
packages/core/src/components Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @livekit/components-core " : patch
3+ ---
4+
5+ fix(core): prevent audio output switching on safari based browsers
Original file line number Diff line number Diff line change 44 type LocalVideoTrack ,
55 type Room ,
66 type LocalTrack ,
7+ getBrowser ,
78} from 'livekit-client' ;
89import { BehaviorSubject } from 'rxjs' ;
910import { log } from '../logger' ;
@@ -35,6 +36,11 @@ export function setupDeviceSelector(
3536 id === 'default' && localTrack . mediaStreamTrack . label . startsWith ( 'Default' ) ? id : actualId ,
3637 ) ;
3738 } else if ( room ) {
39+ const browser = getBrowser ( ) ;
40+ if ( kind === 'audiooutput' && ( browser ?. name === 'Safari' || browser ?. os === 'iOS' ) ) {
41+ log . warn ( `Switching audio output device is not supported on Safari and iOS.` ) ;
42+ return ;
43+ }
3844 log . debug ( `Switching active device of kind "${ kind } " with id ${ id } .` ) ;
3945 await room . switchActiveDevice ( kind , id , options . exact ) ;
4046 const actualDeviceId : string | undefined = room . getActiveDevice ( kind ) ?? id ;
You can’t perform that action at this time.
0 commit comments