Stop voice messages that are playing when starting a recording
Fixes https://github.com/vector-im/element-web/issues/18410pull/21833/head
							parent
							
								
									570c2b3292
								
							
						
					
					
						commit
						17a3dc5e6d
					
				|  | @ -35,6 +35,7 @@ import NotificationBadge from "./NotificationBadge"; | |||
| import { StaticNotificationState } from "../../../stores/notifications/StaticNotificationState"; | ||||
| import { NotificationColor } from "../../../stores/notifications/NotificationColor"; | ||||
| import InlineSpinner from "../elements/InlineSpinner"; | ||||
| import { PlaybackManager } from "../../../audio/PlaybackManager"; | ||||
| 
 | ||||
| interface IProps { | ||||
|     room: Room; | ||||
|  | @ -177,6 +178,9 @@ export default class VoiceRecordComposerTile extends React.PureComponent<IProps, | |||
|         } | ||||
| 
 | ||||
|         try { | ||||
|             // stop any noises which might be happening
 | ||||
|             await PlaybackManager.instance.playOnly(null); | ||||
| 
 | ||||
|             const recorder = VoiceRecordingStore.instance.startRecording(); | ||||
|             await recorder.start(); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Travis Ralston
						Travis Ralston