File tree Expand file tree Collapse file tree
projects/stream-chat-angular/src/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- export const isSafari = / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test (
2- navigator . userAgent
3- ) ;
1+ export const isSafari = ( ) =>
2+ / ^ ( (? ! c h r o m e | a n d r o i d ) .) * s a f a r i / i. test ( navigator . userAgent ) ;
Original file line number Diff line number Diff line change @@ -152,6 +152,7 @@ export class MessageListComponent
152152 private forceRepaintSubject = new Subject < void > ( ) ;
153153 private messageIdToAnchorTo ?: string ;
154154 private anchorMessageTopOffset ?: number ;
155+ private isSafari = isSafari ( ) ;
155156
156157 @HostBinding ( 'class' )
157158 private get class ( ) {
@@ -468,7 +469,7 @@ export class MessageListComponent
468469 scrollToBottom ( ) : void {
469470 this . scrollContainer . nativeElement . scrollTop =
470471 this . scrollContainer . nativeElement . scrollHeight + 0.1 ;
471- if ( isSafari ) {
472+ if ( this . isSafari ) {
472473 this . forceRepaintSubject . next ( ) ;
473474 }
474475 }
@@ -609,7 +610,7 @@ export class MessageListComponent
609610 ( messageToAlignTo ?. getBoundingClientRect ( ) ?. top || 0 ) -
610611 ( this . anchorMessageTopOffset || 0 ) ;
611612 this . anchorMessageTopOffset = undefined ;
612- if ( isSafari ) {
613+ if ( this . isSafari ) {
613614 this . forceRepaintSubject . next ( ) ;
614615 }
615616 }
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export class AudioRecorderService extends MultimediaRecorder<
2222 * - For all other browsers we use audio/webm (which is then transcoded to wav)
2323 */
2424 config : MediaRecorderConfig = {
25- mimeType : isSafari ? 'audio/mp4;codecs=mp4a.40.2' : 'audio/webm' ,
25+ mimeType : isSafari ( ) ? 'audio/mp4;codecs=mp4a.40.2' : 'audio/webm' ,
2626 } ;
2727
2828 constructor (
You can’t perform that action at this time.
0 commit comments