File tree Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Expand file tree Collapse file tree 4 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ describe('Audio', () => {
246246 it ( 'differentiates between in thread and in channel audio player' , async ( ) => {
247247 const message = generateMessage ( ) ;
248248 render (
249- < WithAudioPlayback >
249+ < WithAudioPlayback allowConcurrentPlayback >
250250 < MessageProvider value = { { message } } >
251251 < Audio og = { audioAttachment } />
252252 </ MessageProvider >
Original file line number Diff line number Diff line change @@ -325,7 +325,7 @@ describe('Card', () => {
325325 render (
326326 < ChatProvider value = { { } } >
327327 < ChannelStateProvider value = { { } } >
328- < WithAudioPlayback >
328+ < WithAudioPlayback allowConcurrentPlayback >
329329 < MessageProvider value = { { message } } >
330330 < Card { ...audioAttachment } />
331331 </ MessageProvider >
@@ -372,7 +372,7 @@ describe('Card', () => {
372372 render (
373373 < ChatProvider value = { { } } >
374374 < ChannelStateProvider value = { { } } >
375- < WithAudioPlayback >
375+ < WithAudioPlayback allowConcurrentPlayback >
376376 < MessageProvider value = { { message } } >
377377 < Card { ...audioAttachment } />
378378 </ MessageProvider >
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ export class AudioPlayerPool {
88 private allowConcurrentPlayback : boolean ;
99
1010 constructor ( config ?: { allowConcurrentPlayback ?: boolean } ) {
11- this . allowConcurrentPlayback = config ?. allowConcurrentPlayback ?? true ;
11+ this . allowConcurrentPlayback = ! ! config ?. allowConcurrentPlayback ;
1212 }
1313
1414 get players ( ) {
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ type ChannelPropsForwardedToComponentContext = Pick<
168168export type ChannelProps = ChannelPropsForwardedToComponentContext & {
169169 /** Custom handler function that runs when the active channel has unread messages and the app is running on a separate browser tab */
170170 activeUnreadHandler ?: ( unread : number , documentTitle : string ) => void ;
171- /** Allows a single audio to be played by any audio player at a time. */
171+ /** Allows multiple audio players to play the audio at the same time. Disabled by default . */
172172 allowConcurrentAudioPlayback ?: boolean ;
173173 /** The connected and active channel */
174174 channel ?: StreamChannel ;
@@ -291,7 +291,7 @@ const ChannelInner = (
291291) => {
292292 const {
293293 activeUnreadHandler,
294- allowConcurrentAudioPlayback = true ,
294+ allowConcurrentAudioPlayback,
295295 channel,
296296 channelQueryOptions : propChannelQueryOptions ,
297297 children,
You can’t perform that action at this time.
0 commit comments